159 lines
13 KiB
XML
159 lines
13 KiB
XML
<Page x:Class="Common.GUI.Pages.Eregister.ManualProgrammingPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:Controls="clr-namespace:Common.GUI.Controls"
|
|
xmlns:VM="clr-namespace:Common.GUI.ViewModels.Eregister">
|
|
<Controls:MainLayout>
|
|
<Grid DataContext="{Binding EregisterManualProgrammingVM, Source={StaticResource VMLocator}}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<ScrollViewer Grid.Column="0">
|
|
<ItemsControl ItemsSource="{Binding ItemsSource}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureItemVM}" >
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock FontWeight="Bold"
|
|
Grid.Row="0"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
<ItemsControl Grid.Row="1" ItemsSource="{Binding ItemsSource}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureItemVM}" >
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0"
|
|
Margin="20 0 0 0"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
<ItemsControl Grid.Row="1" ItemsSource="{Binding ItemsSource}" Margin="40 0 0 0">
|
|
<ItemsControl.Resources>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureBooleanValueVM}">
|
|
<CheckBox Background="WhiteSmoke"
|
|
Content="{Binding Header}"
|
|
Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
IsChecked="{Binding Value}"
|
|
Margin="0 0 10 2"/>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureByteValueVM}">
|
|
<StackPanel Orientation="Horizontal"
|
|
FlowDirection="LeftToRight"
|
|
Margin="0 0 10 2">
|
|
<TextBox Background="WhiteSmoke"
|
|
BorderThickness="0 0 1 1"
|
|
HorizontalAlignment="Right"
|
|
Padding="10 3"
|
|
Text="{Binding Value}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureInt32ValueVM}">
|
|
<StackPanel Orientation="Horizontal"
|
|
FlowDirection="LeftToRight"
|
|
Margin="0 0 10 2">
|
|
<TextBox Background="WhiteSmoke"
|
|
BorderThickness="0 0 1 1"
|
|
HorizontalAlignment="Right"
|
|
Padding="10 3"
|
|
Text="{Binding Value}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureUInt16ValueVM}">
|
|
<StackPanel Orientation="Horizontal"
|
|
FlowDirection="LeftToRight"
|
|
Margin="0 0 10 2">
|
|
<TextBox Background="WhiteSmoke"
|
|
BorderThickness="0 0 1 1"
|
|
HorizontalAlignment="Right"
|
|
Padding="10 3"
|
|
Text="{Binding Value}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureUInt32ValueVM}">
|
|
<StackPanel Orientation="Horizontal"
|
|
FlowDirection="LeftToRight"
|
|
Margin="0 0 10 2">
|
|
<TextBox Background="WhiteSmoke"
|
|
BorderThickness="0 0 1 1"
|
|
HorizontalAlignment="Right"
|
|
Padding="10 3"
|
|
Text="{Binding Value}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureOptionValueVM}">
|
|
<StackPanel FlowDirection="LeftToRight"
|
|
Orientation="Horizontal"
|
|
Margin="0 0 10 2">
|
|
<ComboBox Background="WhiteSmoke"
|
|
BorderThickness="0"
|
|
HorizontalAlignment="Right"
|
|
ItemsSource="{Binding Options}"
|
|
Padding="10 3"
|
|
SelectedValue="{Binding Value}"
|
|
SelectedValuePath="{Binding Content}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type VM:EregisterFeatureStringValueVM}">
|
|
<StackPanel FlowDirection="LeftToRight"
|
|
Orientation="Horizontal"
|
|
Margin="0 0 10 2">
|
|
<TextBox Background="WhiteSmoke"
|
|
BorderThickness="0 0 1 1"
|
|
HorizontalAlignment="Right"
|
|
Padding="10 3"
|
|
Text="{Binding Value}"
|
|
Width="150" />
|
|
<TextBlock Foreground="DimGray"
|
|
HorizontalAlignment="Stretch"
|
|
Padding="10 3"
|
|
Text="{Binding Header}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.Resources>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Controls:MainLayout>
|
|
</Page>
|