6dd2abf95d
- Altri nomi modificati. - Eliminato namespace.
53 lines
2.7 KiB
XML
53 lines
2.7 KiB
XML
<UserControl x:Class="FixtureParametersV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5">
|
|
|
|
<StackPanel>
|
|
|
|
<ListBox Name="FixtureListBox" ItemsSource="{Binding FixtureTypeList}"
|
|
Height="150" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedFixtureType}">
|
|
<ListBox.Resources>
|
|
<DataTemplate DataType="{x:Type EgtCAM5:FixtureType}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="4*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="0,0,5,0"/>
|
|
<TextBlock Grid.Column="2" Text="{Binding UsedTotalRatio}" TextAlignment="Right"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type EgtCAM5:FixtureListItem}">
|
|
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}" FocusVisualStyle="{x:Null}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Name}" Foreground="White" Margin="5,0,0,0"
|
|
FontSize="15" FontWeight="SemiBold"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.Resources>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem" BasedOn="{StaticResource FixtureTypeListBoxItem}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=OneWay}"/>
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected}"/>
|
|
<Setter Property="Focusable" Value="{Binding Focusable, Mode=OneWay}"/>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
</ListBox>
|
|
|
|
<TextBlock Text="{Binding FixtureErrorMsg,Mode=OneWay}" Margin="5,5,5,5"
|
|
Style="{StaticResource ValidationErrorTextBlock}"/>
|
|
|
|
<UniformGrid Columns="2">
|
|
<Button Content="Add" Height="30" Command="{Binding AddCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/>
|
|
<Button Content="Remove" Height="30" Command="{Binding RemoveCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=FixtureListBox}"/>
|
|
</UniformGrid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|