121 lines
5.5 KiB
XML
121 lines
5.5 KiB
XML
<UserControl x:Class="ModifyPartPanelV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Icarus"
|
|
Width="150"
|
|
Margin="5,0,0,0">
|
|
<Grid DockPanel.Dock="Left">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Style="{StaticResource LeftPanelTitle_Border}">
|
|
<TextBlock Text="Part entity list"
|
|
FontWeight="DemiBold"
|
|
FontSize="14"/>
|
|
</Border>
|
|
<!--<DockPanel Grid.Row="1">
|
|
<Button DockPanel.Dock="Left"
|
|
Content="+"
|
|
FontSize="20"
|
|
Command="{Binding AddPart_Command}"
|
|
Style="{StaticResource LeftPanel_Button}"/>
|
|
<Button DockPanel.Dock="Left"
|
|
Content="-"
|
|
FontSize="20"
|
|
Command="{Binding RemovePart_Command}"
|
|
Style="{StaticResource LeftPanel_Button}"/>
|
|
<Button Content="Reference"
|
|
Command="{Binding SetReference_Command}"
|
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
</DockPanel>-->
|
|
<TreeView Grid.Row="2"
|
|
ItemsSource="{Binding ModifyPartList}"
|
|
MinHeight="300">
|
|
<TreeView.Resources>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ModifyPart}"
|
|
ItemsSource="{Binding LayerList}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Resources/TreeView/Folder.png"
|
|
Height="15"/>
|
|
<TextBlock Text="{Binding ghName}" />
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ModifyLayer}"
|
|
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Resources/TreeView/Folder.png"
|
|
Height="15"/>
|
|
<TextBlock Text="{Binding sName}" />
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ModifyEntity}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<!--<Image Source="/WpfTutorialSamples;component/Images/user.png" Margin="0,0,5,0" />-->
|
|
<TextBlock Text="{Binding ghName}" />
|
|
<TextBlock Text="{Binding ghReference, UpdateSourceTrigger=PropertyChanged}"/>
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<!-- Menu' tasto destro -->
|
|
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
|
|
<ContextMenu.ItemContainerStyle>
|
|
<Style TargetType="MenuItem">
|
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
|
<Setter Property="CommandParameter" Value="{Binding MenuItem_Command}"/>
|
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
|
</Style>
|
|
</ContextMenu.ItemContainerStyle>
|
|
</ContextMenu>
|
|
</TreeView.Resources>
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Setter Property="IsExpanded" Value="True" />
|
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
</TreeView>
|
|
<!--<Border Grid.Row="3"
|
|
Style="{StaticResource LeftPanelTitle_Border}">
|
|
<TextBlock Text="Lista entità importate"
|
|
FontWeight="DemiBold"
|
|
FontSize="14"/>
|
|
</Border>
|
|
<ListBox Grid.Row="4"
|
|
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedItem="{Binding SelImportedEntity}"
|
|
MinHeight="200">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid HorizontalAlignment="Stretch">
|
|
<Grid.InputBindings>
|
|
<MouseBinding Gesture="LeftDoubleClick"
|
|
Command="{Binding ImportedEntity_DoubleClick}"/>
|
|
</Grid.InputBindings>
|
|
<TextBlock Text="{Binding ghName}">
|
|
</TextBlock>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>-->
|
|
<UniformGrid Grid.Row="5"
|
|
Rows="1">
|
|
<Button Content="Ok"
|
|
Command="{Binding Ok_Command}"
|
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
<!--<Button Content="Cancel"
|
|
Command="{Binding Cancel_Command}"
|
|
Style="{StaticResource LeftPanel_TextButton}"/>-->
|
|
</UniformGrid>
|
|
</Grid>
|
|
</UserControl>
|