-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
59 lines (53 loc) · 4.35 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<Window x:Class="BiuBiuClick.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:BiuBiuClick"
xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
Background="{DynamicResource MaterialDesignPaper}"
TextElement.FontWeight="Medium"
TextElement.FontSize="14"
FontFamily="Microsoft YaHei"
Title="BiuBiuClick" Height="Auto" Width="250" MinHeight="300" MaxHeight="400" Topmost="True" ResizeMode="CanMinimize"
WindowStyle="None" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Name="mainWindow">
<DockPanel Height="Auto" LastChildFill="False">
<StackPanel Height="30" DockPanel.Dock="Top" Background="{DynamicResource PrimaryHueLightBrush}" Margin="0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
<DockPanel LastChildFill="True">
<materialDesign:PopupBox
DockPanel.Dock="Left"
ToggleContent="{materialDesign:PackIcon Menu}"
Margin="5 0 0 0"
PlacementMode="BottomAndAlignRightEdges">
<ListBox Name="listbox_Menu" SelectionMode="Single">
<ListBoxItem Name="item_windows_info_tool" Content="窗口信息工具"/>
<ListBoxItem Name="item_help" Content="帮助"/>
<ListBoxItem Name="item_about" Content="关于"/>
<ListBoxItem Name="item_exit" Content="退出"/>
</ListBox>
</materialDesign:PopupBox>
<Button Name="button_WindowClose" DockPanel.Dock="Right" Content="{materialDesign:PackIcon WindowClose}"
Foreground="{DynamicResource MaterialDesignBody}" Background="Transparent" BorderBrush="Transparent"
Margin="0" Padding="5" Click="button_WindowClose_Click"/>
<Button Name="button_WindowMinimize" DockPanel.Dock="Right" Content="{materialDesign:PackIcon WindowMinimize}"
Foreground="{DynamicResource MaterialDesignBody}" Background="Transparent" BorderBrush="Transparent"
Margin="0" Padding="5" Click="button_WindowMinimize_Click"/>
<Label DockPanel.Dock="Left" Content="BiuBiuClick" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold"/>
</DockPanel>
</StackPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Height="Auto" MinHeight="50" Width="210" >
<ComboBox materialDesign:HintAssist.Hint="选择按钮配置" x:Name="comboBox" HorizontalAlignment="Left" Margin="21,10,0,0" VerticalAlignment="Top" Width="120" SelectionChanged="comboBox_SelectionChanged" />
<Button x:Name="button_refresh" Content="{materialDesign:PackIcon Refresh}" ToolTip="重新加载配置" HorizontalAlignment="Left" Click="refresh_click" Margin="10 0 10 0"/>
</StackPanel>
<ListView DockPanel.Dock="Top" Name="button_list" MinHeight="50" Height="Auto" SelectionMode="Single"></ListView>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Margin="0" Height="100" Width="210" VerticalAlignment="Center" HorizontalAlignment="Center">
<Button x:Name="button_align_1" CommandParameter="SingleScreen" Content="窗口同屏" Width="90" Height="40" Style="{DynamicResource MaterialDesignRaisedButton}" Click="align_button_Click" Margin="10 0 0 0"/>
<Button x:Name="button_align_2" CommandParameter="TwoScreen" Content="窗口分屏" Width="90" Height="40" Style="{DynamicResource MaterialDesignRaisedButton}" Click="align_button_Click" Margin="10 0 0 0"/>
<Label Visibility="Hidden" Content=""/>
</StackPanel>
<Rectangle DockPanel.Dock="Bottom" Margin="0 0 0 10" Width="220" Height="1" Fill="{DynamicResource MaterialDesignDivider}"/>
</DockPanel>
</Window>