Files
EgtDOORCreator/AssemblyManager/AssemblyManagerV.xaml
T
Nicola Pievani cedcf1dd4f EgtDOORCreator 1.9k3 :
- aggiunta di nuovo parametro ( ActiveBox);
- possibilità di selezionare l'ultimo ddf letto ( in modalità singola porta);
- elimino l'errore dopo la modifica dei parametri;
- porto il focus sul ddf selezionato ( in modalità progetto).
2018-11-13 14:20:44 +00:00

80 lines
3.7 KiB
XML

<UserControl x:Class="AssemblyManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator"
Height="30">
<UserControl.Resources>
<EgtDOORCreator:PathConverter x:Key="PathConverter"/>
<!--<EgtDOORCreator:CurrentNameConverter x:Key="CurrentNameConverter"/>-->
<EgtDOORCreator:ProjectVisibilityConverter x:Key="ProjectVisibilityConverter"/>
</UserControl.Resources>
<Grid
Visibility="{Binding CurrProject.Name, Converter={StaticResource ProjectVisibilityConverter}, UpdateSourceTrigger=PropertyChanged}">
<Grid.RowDefinitions>
<RowDefinition Height="18*"/>
<RowDefinition Height="18*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ListBox ItemsSource="{Binding CurrProject.AssemblyList}"
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
<Interactivity:Interaction.Behaviors>
<EgtDOORCreator:ScrollIntoViewForListBox/>
</Interactivity:Interaction.Behaviors>
<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>
<EventSetter Event="PreviewMouseLeftButtonUp" Handler="Door_MouseLeftButtonUp"/>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="DoorGroup"
Height="28" MaxWidth="150" Margin="0,0,2,0" Padding="5,0,5,0"
Style="{StaticResource {x:Type ToggleButton}}"
IsChecked="{Binding Path=IsSelected, RelativeSource={
RelativeSource AncestorType={x:Type ListBoxItem}}}">
<RadioButton.Content>
<TextBlock Text="{Binding GraphicName}"/>
</RadioButton.Content>
</RadioButton>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Grid.Column="1"
Height="20" Width="20" VerticalAlignment="Center"
Margin="3,5,5,5.4" Command="{Binding AddAssembly_Command}"
ToolTip="{Binding AddNewDoorToolTip}"
Focusable="False" Grid.RowSpan="2">
<Image Source="/Resources/TopCommandBar/Add.png" Stretch="Uniform"/>
</Button>
<Button Grid.Column="2"
Height="20" Width="20" VerticalAlignment="Center"
Margin="0,5,4.8,5.4" Command="{Binding RemoveAssembly_Command}"
ToolTip="{Binding RemoveDoorToolTip}"
Focusable="False" Grid.RowSpan="2">
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
</Button>
</Grid>
</UserControl>