SettingsView.xaml
3.2 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
<!--
/***********************************************
* CONFIDENTIAL AND PROPRIETARY
*
* The source code and other information contained herein is the confidential and exclusive property of
* ZIH Corp. and is subject to the terms and conditions in your end user license agreement.
* This source code, and any other information contained herein, shall not be copied, reproduced, published,
* displayed or distributed, in whole or in part, in any medium, by any means, for any purpose except as
* expressly permitted under such license agreement.
*
* Copyright ZIH Corp. 2018
*
* ALL RIGHTS RESERVED
***********************************************/
-->
<UserControl x:Class="Zebra.Windows.DevDemo.Demos.Settings.SettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Zebra.Windows.DevDemo.Demos.Settings"
xmlns:usercontrols="clr-namespace:Zebra.Windows.DevDemo.UserControls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.DataContext>
<local:SettingsViewModel />
</UserControl.DataContext>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource ZebraHeader}" Margin="0,0,0,10">Settings</TextBlock>
<usercontrols:ConnectionSelectorView x:Name="connectionSelector" Grid.Row="1" Margin="0,0,0,15" />
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="saveSettingsButton" Margin="0,0,5,0" Click="SaveSettingsButton_Click">Save Settings and Refresh</Button>
<Button x:Name="getSettingsButton" Grid.Column="1" Margin="5,0,0,0" Click="GetSettingsButton_Click">Get Settings</Button>
</Grid>
<Separator Grid.Row="3" Margin="0,15,0,15" />
<TextBlock Style="{StaticResource ZebraHeader}" Grid.Row="4" Margin="0,0,0,10">Printer Settings</TextBlock>
<DataGrid x:Name="printerSettingsGrid" ItemsSource="{Binding Settings}" Grid.Row="5" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CellEditEnding="PrinterSettingsGrid_CellEditEnding">
<DataGrid.Columns>
<DataGridTextColumn Header="Key" Binding="{Binding Key}" IsReadOnly="True" Width="140" />
<DataGridTextColumn Header="Value" Binding="{Binding Value}" Width="*" />
<DataGridTextColumn Header="Range" Binding="{Binding Range}" IsReadOnly="True" Width="140" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>