-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
44 lines (42 loc) · 2.85 KB
/
MainWindow.xaml
File metadata and controls
44 lines (42 loc) · 2.85 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
<mah:MetroWindow x:Class="SmartPixel.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:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vms="clr-namespace:SmartPixel"
mc:Ignorable="d"
SaveWindowPosition="True"
ResizeMode="CanResizeWithGrip"
Title="SmartPixel" Width="960" Height="525" WindowTitleBrush="DarkSlateBlue" Icon="SmartPixelIcon.ico">
<Window.DataContext>
<vms:FormModel/>
</Window.DataContext>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="146*"/>
<ColumnDefinition Width="675*"/>
</Grid.ColumnDefinitions>
<Image Width="720" Height="480" Margin="10,10,10,10" Source="{Binding Path}" Grid.Column="1"/>
<Button Grid.Column="0" Content="Start" Command="{Binding StartSmartPixelCommand}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="50" />
<Button Grid.Column="0" Content="Convert" Command="{Binding ConvertCommand}" HorizontalAlignment="Left" Margin="65,10,0,0" VerticalAlignment="Top" />
<Button Grid.Column="0" Content="Generate Palette" Command="{Binding GeneratePaletteCommand}" HorizontalAlignment="Left" Margin="10,40,0,0" VerticalAlignment="Top" Width="113"/>
<Button Grid.Column="0" Content="Generate Grays" Command="{Binding GenerateGrayPaletteCommand}" HorizontalAlignment="Left" Margin="10,70,0,0" VerticalAlignment="Top" Width="113"/>
<ItemsControl Grid.Column="0" ItemsSource="{Binding VisualColorPalette}" Margin="10,159,10,159">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="5"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Rectangle Fill="{Binding}"></Rectangle>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBox Grid.Column="0" HorizontalAlignment="Left" Margin="63,102,0,0" Text="{Binding Colors}" TextWrapping="Wrap" VerticalAlignment="Top" Width="48"/>
<Label Grid.Column="0" Content="Colors:" HorizontalAlignment="Left" Margin="12,102,0,0" VerticalAlignment="Top" Width="46"/>
<Label Grid.Column="0" Content="Elapsed:" HorizontalAlignment="Left" Margin="7,133,0,0" VerticalAlignment="Top" Width="56"/>
<Label Grid.Column="0" Content="{Binding ElapsedSeconds}" HorizontalAlignment="Left" Margin="66,133,0,0" VerticalAlignment="Top" Width="42"/>
</Grid>
</mah:MetroWindow>