Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3498 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
22 changed files with 457 additions and 444 deletions
@ -1,29 +0,0 @@
@@ -1,29 +0,0 @@
|
||||
<UserControl x:Class="ICSharpCode.XamlDesigner.Outline" |
||||
x:Name="root" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner" |
||||
xmlns:Converters="clr-namespace:ICSharpCode.XamlDesigner.Converters"> |
||||
|
||||
<UserControl.Resources> |
||||
|
||||
<HierarchicalDataTemplate DataType="{x:Type Default:OutlineNode}" |
||||
ItemsSource="{Binding Children}"> |
||||
<Default:IconItem Icon="Images/Tag.png" |
||||
Text="{Binding Name}" /> |
||||
</HierarchicalDataTemplate> |
||||
|
||||
</UserControl.Resources> |
||||
|
||||
<Default:OutlineTreeView Root="{Binding Root, ElementName=root}"> |
||||
<ItemsControl.ItemContainerStyle> |
||||
<Style TargetType="{x:Type Default:DragTreeViewItem}"> |
||||
<Setter Property="IsSelected" |
||||
Value="{Binding IsSelected}" /> |
||||
<Setter Property="IsExpanded" |
||||
Value="{Binding IsExpanded, Mode=TwoWay}" /> |
||||
</Style> |
||||
</ItemsControl.ItemContainerStyle> |
||||
</Default:OutlineTreeView> |
||||
|
||||
</UserControl> |
||||
@ -1,25 +1,26 @@
@@ -1,25 +1,26 @@
|
||||
<UserControl x:Class="ICSharpCode.XamlDesigner.ToolboxView" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Outline="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView;assembly=ICSharpCode.WpfDesign.Designer" |
||||
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner"> |
||||
<UserControl.Resources> |
||||
|
||||
<HierarchicalDataTemplate DataType="{x:Type Default:AssemblyNode}" |
||||
ItemsSource="{Binding Controls}"> |
||||
<Default:IconItem Icon="Images/Reference.png" |
||||
Text="{Binding Name}" |
||||
ToolTip="{Binding Path}" /> |
||||
</HierarchicalDataTemplate> |
||||
<UserControl.Resources> |
||||
|
||||
<HierarchicalDataTemplate DataType="{x:Type Default:AssemblyNode}" |
||||
ItemsSource="{Binding Controls}"> |
||||
<Outline:IconItem Icon="Images/Reference.png" |
||||
Text="{Binding Name}" |
||||
ToolTip="{Binding Path}" /> |
||||
</HierarchicalDataTemplate> |
||||
|
||||
<DataTemplate DataType="{x:Type Default:ControlNode}"> |
||||
<Outline:IconItem Icon="Images/Tag.png" |
||||
Text="{Binding Type.Name}" /> |
||||
</DataTemplate> |
||||
|
||||
</UserControl.Resources> |
||||
|
||||
<TreeView x:Name="uxTreeView" |
||||
ItemsSource="{Binding AssemblyNodes}" |
||||
BorderThickness="0"/> |
||||
|
||||
<DataTemplate DataType="{x:Type Default:ControlNode}"> |
||||
<Default:IconItem Icon="Images/Tag.png" |
||||
Text="{Binding Type.Name}" /> |
||||
</DataTemplate> |
||||
|
||||
</UserControl.Resources> |
||||
|
||||
<TreeView x:Name="uxTreeView" |
||||
ItemsSource="{Binding AssemblyNodes}" |
||||
BorderThickness="0"/> |
||||
|
||||
</UserControl> |
||||
|
||||
|
After Width: | Height: | Size: 389 B |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
<UserControl x:Class="ICSharpCode.WpfDesign.Designer.OutlineView.Outline" |
||||
x:Name="root" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Default="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView"> |
||||
|
||||
<UserControl.Resources> |
||||
|
||||
<HierarchicalDataTemplate DataType="{x:Type Default:OutlineNode}" |
||||
ItemsSource="{Binding Children}"> |
||||
<Default:IconItem Icon="../Images/Tag.png" |
||||
Text="{Binding Name}" /> |
||||
</HierarchicalDataTemplate> |
||||
|
||||
</UserControl.Resources> |
||||
|
||||
<Default:OutlineTreeView Root="{Binding Root, ElementName=root}"> |
||||
<ItemsControl.ItemContainerStyle> |
||||
<Style TargetType="{x:Type Default:DragTreeViewItem}"> |
||||
<Setter Property="IsSelected" |
||||
Value="{Binding IsSelected}" /> |
||||
<Setter Property="IsExpanded" |
||||
Value="{Binding IsExpanded, Mode=TwoWay}" /> |
||||
</Style> |
||||
</ItemsControl.ItemContainerStyle> |
||||
</Default:OutlineTreeView> |
||||
|
||||
</UserControl> |
||||
@ -0,0 +1,151 @@
@@ -0,0 +1,151 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:Default="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView" |
||||
xmlns:Converters="clr-namespace:ICSharpCode.WpfDesign.Designer.Converters" |
||||
> |
||||
<Converters:LevelConverter x:Key="LevelConverter" /> |
||||
|
||||
<Style TargetType="{x:Type Default:IconItem}"> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type Default:IconItem}"> |
||||
<StackPanel Orientation="Horizontal"> |
||||
<Image Source="{TemplateBinding Icon}" |
||||
Stretch="None" /> |
||||
<TextBlock Text="{TemplateBinding Text}" |
||||
VerticalAlignment="Center" |
||||
Margin="5 0 0 0" /> |
||||
</StackPanel> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
|
||||
<Style x:Key="ExpandButtonStyle" |
||||
TargetType="ToggleButton"> |
||||
<Setter Property="Focusable" |
||||
Value="False" /> |
||||
<Setter Property="ClickMode" |
||||
Value="Press" /> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="ToggleButton"> |
||||
<Border Background="Transparent"> |
||||
<Border Width="9" |
||||
Height="9" |
||||
SnapsToDevicePixels="true" |
||||
BorderBrush="#FF7898B5" |
||||
BorderThickness="1" |
||||
CornerRadius="1"> |
||||
<Border.Background> |
||||
<LinearGradientBrush EndPoint="1,1" |
||||
StartPoint="0,0"> |
||||
<GradientStop Color="White" |
||||
Offset=".2" /> |
||||
<GradientStop Color="#FFC0B7A6" |
||||
Offset="1" /> |
||||
</LinearGradientBrush> |
||||
</Border.Background> |
||||
<Path Margin="1,1,1,1" |
||||
x:Name="ExpandPath" |
||||
Fill="Black" |
||||
Data="M 0 2 L 0 3 L 2 3 L 2 5 L 3 5 L 3 3 L 5 3 L 5 2 L 3 2 L 3 0 L 2 0 L 2 2 Z" /> |
||||
</Border> |
||||
</Border> |
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsChecked" |
||||
Value="True"> |
||||
<Setter Property="Data" |
||||
TargetName="ExpandPath" |
||||
Value="M 0 2 L 0 3 L 5 3 L 5 2 Z" /> |
||||
</Trigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
|
||||
<Brush x:Key="InsertBrush">#FFC73C</Brush> |
||||
|
||||
<Style TargetType="{x:Type Default:DragTreeView}"> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type Default:DragTreeView}"> |
||||
<Grid Background="White"> |
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" |
||||
VerticalScrollBarVisibility="Auto"> |
||||
<ItemsPresenter /> |
||||
</ScrollViewer> |
||||
<Border x:Name="PART_InsertLine" |
||||
Background="{StaticResource InsertBrush}" |
||||
Height="2" |
||||
Width="50" |
||||
HorizontalAlignment="Left" |
||||
VerticalAlignment="Top" |
||||
Visibility="Collapsed" |
||||
IsHitTestVisible="False" /> |
||||
</Grid> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
|
||||
<Style TargetType="{x:Type Default:DragTreeViewItem}"> |
||||
<Setter Property="Foreground" |
||||
Value="{x:Static SystemColors.ControlTextBrush}" /> |
||||
<Setter Property="Template"> |
||||
<Setter.Value> |
||||
<ControlTemplate TargetType="{x:Type Default:DragTreeViewItem}"> |
||||
|
||||
<DockPanel Background="White"> |
||||
<DockPanel x:Name="bg" |
||||
DockPanel.Dock="Top" |
||||
Background="{TemplateBinding Background}"> |
||||
<ToggleButton x:Name="expandButton" |
||||
Style="{StaticResource ExpandButtonStyle}" |
||||
DockPanel.Dock="Left" |
||||
Margin="{TemplateBinding Level, Converter={StaticResource LevelConverter}}" |
||||
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" /> |
||||
<Border x:Name="contentBorder" |
||||
HorizontalAlignment="Left"> |
||||
<ContentPresenter x:Name="PART_Header" |
||||
ContentSource="Header" /> |
||||
</Border> |
||||
</DockPanel> |
||||
<ItemsPresenter x:Name="itemsHost" /> |
||||
</DockPanel> |
||||
|
||||
<ControlTemplate.Triggers> |
||||
<Trigger Property="IsExpanded" |
||||
Value="False"> |
||||
<Setter TargetName="itemsHost" |
||||
Property="Visibility" |
||||
Value="Collapsed" /> |
||||
</Trigger> |
||||
<Trigger Property="HasItems" |
||||
Value="False"> |
||||
<Setter TargetName="expandButton" |
||||
Property="Visibility" |
||||
Value="Hidden" /> |
||||
</Trigger> |
||||
<Trigger Property="IsSelected" |
||||
Value="True"> |
||||
<Setter TargetName="bg" |
||||
Property="Background" |
||||
Value="{x:Static SystemColors.HighlightBrush}" /> |
||||
<Setter Property="Foreground" |
||||
Value="{x:Static SystemColors.HighlightTextBrush}" /> |
||||
</Trigger> |
||||
<Trigger Property="IsDragHover" |
||||
Value="True"> |
||||
<Setter TargetName="contentBorder" |
||||
Property="Background" |
||||
Value="{StaticResource InsertBrush}" /> |
||||
</Trigger> |
||||
</ControlTemplate.Triggers> |
||||
</ControlTemplate> |
||||
</Setter.Value> |
||||
</Setter> |
||||
</Style> |
||||
|
||||
</ResourceDictionary> |
||||
@ -1,6 +1,7 @@
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||
<ResourceDictionary.MergedDictionaries> |
||||
<ResourceDictionary Source="/ICSharpCode.WpfDesign.Designer;component/Controls/ControlStyles.xaml" /> |
||||
</ResourceDictionary.MergedDictionaries> |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||
<ResourceDictionary.MergedDictionaries> |
||||
<ResourceDictionary Source="/ICSharpCode.WpfDesign.Designer;component/Controls/ControlStyles.xaml" /> |
||||
<ResourceDictionary Source="/ICSharpCode.WpfDesign.Designer;component/OutlineView/OutlineView.xaml" /> |
||||
</ResourceDictionary.MergedDictionaries> |
||||
</ResourceDictionary> |
||||
|
||||
Loading…
Reference in new issue