-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
74 lines (69 loc) · 3 KB
/
MainWindow.xaml
File metadata and controls
74 lines (69 loc) · 3 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<Window x:Class="HexCalculator.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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:viewmodels="clr-namespace:HexCalculator.ViewModels"
mc:Ignorable="d"
Title="Hex Calculator"
Height="700"
Width="700"
ResizeMode="CanMinimize"
WindowStartupLocation="CenterScreen"
Background="{DynamicResource MaterialDesignPaper}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
FontFamily="{DynamicResource MaterialDesignFont}"
Icon="code-128.ico">
<Window.DataContext>
<viewmodels:MainViewModel />
</Window.DataContext>
<Grid Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title/Header -->
<TextBlock Grid.Row="0"
Text="Dat54 Sound Header Calculator"
Style="{StaticResource MaterialDesignHeadline6TextBlock}"
Margin="0,0,0,16"/>
<!-- Output Hex Value TextBox -->
<TextBox Grid.Row="1"
Text="{Binding OutputHexValue, Mode=OneWay}"
IsReadOnly="True"
Style="{StaticResource MaterialDesignOutlinedTextBox}"
materialDesign:HintAssist.Hint="Combined Hex Value"
FontSize="16"
FontFamily="Consolas, Courier New"
Margin="0,0,0,16"
materialDesign:TextFieldAssist.HasClearButton="False"/>
<!-- Checked List of Flags -->
<Border Grid.Row="2"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderThickness="1"
CornerRadius="4"
Padding="8">
<ItemsControl ItemsSource="{Binding AudioFlags}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding DisplayText}"
IsChecked="{Binding IsChecked}"
Margin="4,3"
Style="{StaticResource MaterialDesignCheckBox}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
</Grid>
</Window>