40 lines
2.5 KiB
XML
40 lines
2.5 KiB
XML
<UserControl x:Class="AuroraUIComponent.UserControls.UCSetAllButtons"
|
|
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:AuroraUIComponent.UserControls" xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
|
|
d:DataContext="{d:DesignInstance Type=local:UCSetAllButtonsViewModel}"
|
|
mc:Ignorable="d" x:Name="uc"
|
|
d:DesignHeight="60" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<view:BoolConverter x:Key="convHiddenVisible" TrueValue="Hidden" FalseValue="Visible"/>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<ItemsControl ItemsSource="{Binding ItemList}" x:Name="itemList">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Margin="2" Visibility="{Binding IsHidden, Converter={StaticResource convHiddenVisible}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="auto"/>
|
|
<!-- <RowDefinition Height="{Binding DataContext.SetButtonHeight, ElementName=uc, FallbackValue=30}"/> -->
|
|
</Grid.RowDefinitions>
|
|
<Border>
|
|
<local:UCKeyValueAutoVertical DataType="{Binding ValueType}" KeyText="{Binding LabelToken, FallbackValue=LabelToken}" DecimalPlaces="3"
|
|
Value="{Binding NumberValue}" ValueText="{Binding StringValue}" ValueBool="{Binding BoolValue}" KeyTextWidth="Auto"/>
|
|
</Border>
|
|
<Button Grid.Row="1" Grid.Column="0" Margin="2" MinHeight="30" Style="{StaticResource StButtonAccentBlue}" Command="{Binding DataContext.CMD_SetAll, ElementName=uc}"
|
|
CommandParameter="{Binding}" Content="{Binding [Set], Source={StaticResource langTokens}, FallbackValue=Set}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Rows="1"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl>
|