|
|
@ -2,7 +2,8 @@ |
|
|
|
x:Name="root" |
|
|
|
x:Name="root" |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:Default="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView"> |
|
|
|
xmlns:Default="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView" |
|
|
|
|
|
|
|
xmlns:Controls="clr-namespace:ICSharpCode.WpfDesign.Designer.Controls"> |
|
|
|
|
|
|
|
|
|
|
|
<UserControl.Resources> |
|
|
|
<UserControl.Resources> |
|
|
|
|
|
|
|
|
|
|
@ -34,9 +35,38 @@ |
|
|
|
</Setter> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="ToggleButton" x:Key="lockedStyle"> |
|
|
|
|
|
|
|
<Setter Property="Template"> |
|
|
|
|
|
|
|
<Setter.Value> |
|
|
|
|
|
|
|
<ControlTemplate TargetType="ToggleButton"> |
|
|
|
|
|
|
|
<Grid Background="Transparent" IsHitTestVisible="True"> |
|
|
|
|
|
|
|
<VisualStateManager.VisualStateGroups> |
|
|
|
|
|
|
|
<VisualStateGroup x:Name="CheckStates"> |
|
|
|
|
|
|
|
<VisualState x:Name="Checked"> |
|
|
|
|
|
|
|
<Storyboard> |
|
|
|
|
|
|
|
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="locked" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|
|
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/> |
|
|
|
|
|
|
|
</ObjectAnimationUsingKeyFrames> |
|
|
|
|
|
|
|
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="unlocked" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|
|
|
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/> |
|
|
|
|
|
|
|
</ObjectAnimationUsingKeyFrames> |
|
|
|
|
|
|
|
</Storyboard> |
|
|
|
|
|
|
|
</VisualState> |
|
|
|
|
|
|
|
<VisualState x:Name="Unchecked"/> |
|
|
|
|
|
|
|
</VisualStateGroup> |
|
|
|
|
|
|
|
</VisualStateManager.VisualStateGroups> |
|
|
|
|
|
|
|
<Image Width="16" Height="16" x:Name="locked" Stretch="Uniform" Visibility="Hidden" Source="pack://application:,,,/ICSharpCode.WpfDesign.Designer;component/Images/lock.png" /> |
|
|
|
|
|
|
|
<Ellipse x:Name="unlocked" Width="6" Height="6" Stroke="Black" StrokeThickness="1" /> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</ControlTemplate> |
|
|
|
|
|
|
|
</Setter.Value> |
|
|
|
|
|
|
|
</Setter> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate DataType="{x:Type Default:OutlineNode}" |
|
|
|
<HierarchicalDataTemplate DataType="{x:Type Default:OutlineNode}" |
|
|
|
ItemsSource="{Binding Children}"> |
|
|
|
ItemsSource="{Binding Children}"> |
|
|
|
<DockPanel> |
|
|
|
<DockPanel> |
|
|
|
|
|
|
|
<ToggleButton Style="{StaticResource lockedStyle}" DockPanel.Dock="Right" Width="20" Margin="0,0,5,0" IsChecked="{Binding IsDesignTimeLocked}" /> |
|
|
|
<ToggleButton Style="{StaticResource eyeStyle}" DockPanel.Dock="Right" Width="20" Margin="0,0,5,0" IsChecked="{Binding IsDesignTimeVisible}" /> |
|
|
|
<ToggleButton Style="{StaticResource eyeStyle}" DockPanel.Dock="Right" Width="20" Margin="0,0,5,0" IsChecked="{Binding IsDesignTimeVisible}" /> |
|
|
|
<Default:IconItem Icon="../Images/Tag.png" Text="{Binding Name}" /> |
|
|
|
<Default:IconItem Icon="../Images/Tag.png" Text="{Binding Name}" /> |
|
|
|
</DockPanel> |
|
|
|
</DockPanel> |
|
|
@ -44,15 +74,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
</UserControl.Resources> |
|
|
|
</UserControl.Resources> |
|
|
|
|
|
|
|
|
|
|
|
<Default:OutlineTreeView Root="{Binding Root, ElementName=root}"> |
|
|
|
|
|
|
|
<ItemsControl.ItemContainerStyle> |
|
|
|
<DockPanel LastChildFill="True"> |
|
|
|
<Style TargetType="{x:Type Default:DragTreeViewItem}"> |
|
|
|
<Controls:ClearableTextBox DockPanel.Dock="Top" Height="20" Text="{Binding Filter, ElementName=OutlineTreeView}" /> |
|
|
|
<Setter Property="IsSelected" |
|
|
|
|
|
|
|
Value="{Binding IsSelected}" /> |
|
|
|
<Default:OutlineTreeView x:Name="OutlineTreeView" Root="{Binding Root, ElementName=root}"> |
|
|
|
<Setter Property="IsExpanded" |
|
|
|
<ItemsControl.ItemContainerStyle> |
|
|
|
Value="{Binding IsExpanded, Mode=TwoWay}" /> |
|
|
|
<Style TargetType="{x:Type Default:DragTreeViewItem}"> |
|
|
|
</Style> |
|
|
|
<Setter Property="IsSelected" |
|
|
|
</ItemsControl.ItemContainerStyle> |
|
|
|
Value="{Binding IsSelected}" /> |
|
|
|
</Default:OutlineTreeView> |
|
|
|
<Setter Property="IsExpanded" |
|
|
|
|
|
|
|
Value="{Binding IsExpanded, Mode=TwoWay}" /> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
</ItemsControl.ItemContainerStyle> |
|
|
|
|
|
|
|
</Default:OutlineTreeView> |
|
|
|
|
|
|
|
</DockPanel> |
|
|
|
|
|
|
|
|
|
|
|
</UserControl> |
|
|
|
</UserControl> |
|
|
|