RGBController/RGBController2/Views/MainWindow.xaml

54 lines
2.4 KiB
XML

<Window x:Class="RGBController2.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:RGBController2"
xmlns:tabsviewmodels="clr-namespace:RGBController2.ViewModels.Tabs"
xmlns:tabsviews="clr-namespace:RGBController2.Views.Tabs"
xmlns:viewmodels="clr-namespace:RGBController2.ViewModels"
mc:Ignorable="d"
Title="RGB Controller"
ResizeMode="CanMinimize"
Height="344"
Width="715"
d:DataContext="{d:DesignInstance viewmodels:MainViewModel}">
<Grid>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_Options">
<MenuItem Header="_Run on Startup" IsCheckable="True" IsChecked="{Binding RunOnStartUp}" />
<MenuItem Header="_Flux" IsCheckable="True" IsChecked="False" />
<Separator />
<MenuItem Header="_Exit" />
</MenuItem>
<MenuItem Header="_Tabs">
<MenuItem Header="_New Tab" Command="{Binding NewTabCommand}"/>
<MenuItem Header="_Delete Current Tab"/>
</MenuItem>
</Menu>
</DockPanel>
<TabControl Name="tabcontrol" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,25,0,0" Width="700" Height="280" ItemsSource="{Binding Tabs}">
<TabControl.Resources>
<DataTemplate DataType="{x:Type tabsviewmodels:ArduinoTab}">
<tabsviews:ArduinoTabView/>
</DataTemplate>
<DataTemplate DataType="{x:Type tabsviewmodels:CueDeviceTab}">
<tabsviews:CUEDeviceTabView/>
</DataTemplate>
</TabControl.Resources>
<TabControl.ItemTemplate>
<DataTemplate DataType="{x:Type local:ITab}">
<TextBlock>
<Run Text="{Binding Name}"/>
<Hyperlink Command="{Binding CloseCommand}">X</Hyperlink>
</TextBlock>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</Grid>
</Window>