a4b5cd4834
- Cambiati nomi classi e file.
59 lines
2.6 KiB
XML
59 lines
2.6 KiB
XML
<UserControl x:Class="MachGroupPanelV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
|
|
|
<Grid IsEnabled="{Binding MachGroupPanelIsEnabled}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ListBox ItemsSource="{Binding MachGroupList}" SelectedItem="{Binding SelectedMachGroup}"
|
|
Style="{StaticResource MachiningGroupListBox}">
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<ContentPresenter/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<RadioButton GroupName="MachiningGroups"
|
|
Height="30" MaxWidth="150" Margin="0,0,2,0" Padding="5,0,5,0" ToolTip="{Binding}"
|
|
Style="{StaticResource MachGroupButton}"
|
|
Command="{Binding DataContext.SetCurrMachGroupCommand,
|
|
RelativeSource={RelativeSource FindAncestor,
|
|
AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding}"
|
|
IsChecked="{Binding Path=IsSelected, RelativeSource={
|
|
RelativeSource AncestorType={x:Type ListBoxItem}},Mode=TwoWay}">
|
|
<RadioButton.Content>
|
|
<TextBlock Text="{Binding}"/>
|
|
</RadioButton.Content>
|
|
|
|
</RadioButton>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<Button Content="+" Height="20" Width="20" VerticalAlignment="Center" Focusable="False"
|
|
Margin="3,0,5,0" Command="{Binding AddMachGroupCommand}" Grid.Column="1"/>
|
|
<Button Content="-" Height="20" Width="20" VerticalAlignment="Center" Focusable="False"
|
|
Margin="0,0,5,0" Command="{Binding RemoveMachGroupCommand}" Grid.Column="2"/>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|