-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
34 lines (34 loc) · 1.75 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<Window x:Class="WellCom.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:WellCom"
mc:Ignorable="d"
Title="串口调试工具" Height="600" Width="1000" Loaded="Window_Loaded">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="编辑" >
<MenuItem Command="ApplicationCommands.Copy"/>
<MenuItem Command="ApplicationCommands.Cut"/>
<MenuItem Command="ApplicationCommands.Paste"/>
<MenuItem Header="{Binding SelectActionTabItem.Content.PortName}"/>
</MenuItem>
</Menu>
<TabControl x:Name="actionTabs" DockPanel.Dock="Right" Background="White" SelectedItem="{Binding SelectActionTabItem}" ItemsSource="{Binding Tabs}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="21" Width="100">
<TextBlock Width="80" Text="{Binding Header}"/>
<TextBlock Width="20" Height="20" Text="x" MouseUp="TextBlock_MouseUp"/>
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<UserControl Content="{Binding Content}" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</DockPanel>
</Window>