1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 06:00:45 +00:00
msfs-popout-panel-manager/MainApp/AppWindow/NumPad.xaml
2024-07-27 20:12:07 -04:00

176 lines
6.1 KiB
XML

<Window
x:Class="MSFSPopoutPanelManager.MainApp.AppWindow.NumPad"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModel="clr-namespace:MSFSPopoutPanelManager.MainApp.ViewModel"
Title="Virtual NumPad"
Width="300"
Height="400"
ResizeMode="CanResize"
WindowStyle="None"
mc:Ignorable="d">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="Gray"
BorderThickness="1">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<EventSetter Event="Click" Handler="Button_Click" />
</Style>
</Window.Resources>
<materialDesign:ColorZone
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Mode="Dark">
<Grid d:DataContext="{d:DesignInstance viewModel:NumPadViewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Foreground="White">
Virtual NumPad
</TextBlock>
<Button
x:Name="BtnClose"
Grid.Row="0"
Grid.Column="3"
Width="28"
Height="28"
Margin="5,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="BtnClose_Click"
Foreground="White"
Style="{StaticResource MaterialDesignIconButton}"
ToolTip="Close NumPad">
<materialDesign:PackIcon Kind="Close" />
</Button>
<Button
x:Name="BtnTab"
Grid.Row="1"
Grid.Column="0"
Content="Tab" />
<Button
x:Name="BtnDivide"
Grid.Row="1"
Grid.Column="1"
Content="/" />
<Button
x:Name="BtnMultiply"
Grid.Row="1"
Grid.Column="2"
Padding="0,8,0,0"
Content="*" />
<Button
x:Name="BtnSubtract"
Grid.Row="1"
Grid.Column="3"
Content="-" />
<Button
x:Name="Btn7"
Grid.Row="2"
Grid.Column="0"
Content="7" />
<Button
x:Name="Btn8"
Grid.Row="2"
Grid.Column="1"
Content="8" />
<Button
x:Name="Btn9"
Grid.Row="2"
Grid.Column="2"
Content="9" />
<Button
x:Name="BtnAdd"
Grid.Row="2"
Grid.RowSpan="2"
Grid.Column="3"
Content="+" />
<Button
x:Name="Btn4"
Grid.Row="3"
Grid.Column="0"
Content="4" />
<Button
x:Name="Btn5"
Grid.Row="3"
Grid.Column="1"
Content="5" />
<Button
x:Name="Btn6"
Grid.Row="3"
Grid.Column="2"
Content="6" />
<Button
x:Name="Btn1"
Grid.Row="4"
Grid.Column="0"
Content="1" />
<Button
x:Name="Btn2"
Grid.Row="4"
Grid.Column="1"
Content="2" />
<Button
x:Name="Btn3"
Grid.Row="4"
Grid.Column="2"
Content="3" />
<Button
x:Name="BtnEnter"
Grid.Row="4"
Grid.RowSpan="2"
Grid.Column="3"
Content="Ent" />
<Button
x:Name="Btn0"
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="2"
Content="0" />
<Button
x:Name="BtnDecimal"
Grid.Row="5"
Grid.Column="2"
Content="." />
</Grid>
</materialDesign:ColorZone>
</Window>