d24641a0b2
- Migliorie varie.
48 lines
2.4 KiB
XML
48 lines
2.4 KiB
XML
<UserControl x:Class="ManageLayerExpanderView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:EgtCAM5">
|
|
<Expander Header="Layers">
|
|
<StackPanel>
|
|
|
|
<TextBox/>
|
|
|
|
<UniformGrid Rows="1">
|
|
<Button Content="New Part" Command="{Binding NewPartCommand}" Width="40" Height="40"/>
|
|
<Button Content="New Layer" Command="{Binding NewLayerCommand}" Width="40" Height="40"/>
|
|
<Button Content="Color" Command="{Binding LayerColorCommand}" Width="40" Height="40"/>
|
|
</UniformGrid>
|
|
<TreeView Name="LayerTreeView"
|
|
ItemsSource="{Binding Path=LayerList}">
|
|
<TreeView.Resources>
|
|
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
|
<DataTemplate DataType="{x:Type local:LayerTreeViewItem}">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Height="18" FontSize="15" Margin="10"/>
|
|
<Ellipse Height="10" Width="10" Fill="{Binding LayerColor}" />
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
</TreeView.Resources>
|
|
|
|
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia -->
|
|
<!--che si presenta quando la categoria rimane vuota (ombra causata dal multibinding). -->
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
|
|
</TreeView>
|
|
</StackPanel>
|
|
</Expander>
|
|
</UserControl>
|