102 changed files with 3606 additions and 402 deletions
@ -0,0 +1,49 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Windows; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for DockingManagerPropertiesView.xaml |
|||
/// </summary> |
|||
public partial class AvalonDockPropertiesView : DemoView |
|||
{ |
|||
public AvalonDockPropertiesView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
|
|||
public class GenericResourceDictionary : ResourceDictionary |
|||
{ |
|||
public GenericResourceDictionary() |
|||
{ |
|||
this.Source = new Uri( @"/" + |
|||
#if NET5 |
|||
"Xceed.Wpf.AvalonDock.NET5" + |
|||
#elif NETCORE |
|||
"Xceed.Wpf.AvalonDock.NETCore" + |
|||
#else |
|||
"Xceed.Wpf.AvalonDock" + |
|||
#endif |
|||
";component/Themes/generic.xaml", UriKind.Relative ); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,664 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views.AvalonDockPropertiesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:localView="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views" |
|||
Title="DockingManager Properties"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
The DockingManager is the core control of AvalonDock. The class provides several "Template" properties (e.g., AnchorableTitleTemplate/DocumentTitleTemplate, AnchorableHeaderTemplate/DocumentHeaderTemplate, etc.) that allow designers and developers to specify the template for the elements contained in the layout. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<localView:GenericResourceDictionary /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
|
|||
<xcad:LayoutRoot x:Key="DefaultLayout" x:Name="layoutRoot1"> |
|||
<xcad:LayoutPanel Orientation="Horizontal"> |
|||
<xcad:LayoutAnchorablePane DockWidth="160"> |
|||
<xcad:LayoutAnchorable ContentId="properties" |
|||
Title="Properties" |
|||
CanHide="False" |
|||
CanClose="False" |
|||
AutoHideWidth="240" |
|||
IconSource="../Images/property-blue.png"> |
|||
<xctk:PropertyGrid x:Name="propertyGrid" |
|||
NameColumnWidth="110" |
|||
AutoGenerateProperties="False"> |
|||
</xctk:PropertyGrid> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutDocumentPaneGroup> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="document1" |
|||
Title="Document 1" |
|||
IconSource="../Images/document.png"> |
|||
<Button Content="Document 1 Content" |
|||
HorizontalAlignment="Center" |
|||
VerticalAlignment="Center" /> |
|||
</xcad:LayoutDocument> |
|||
<xcad:LayoutDocument ContentId="document2" |
|||
Title="Document 2" |
|||
IconSource="../Images/document.png"> |
|||
<TextBox Text="Document 2 Content" |
|||
AcceptsReturn="True" /> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
<xcad:LayoutAnchorablePaneGroup DockWidth="125"> |
|||
<xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutAnchorable ContentId="alarms" |
|||
Title="Alarms" |
|||
IconSource="../Images/alarm-clock-blue.png" |
|||
CanClose="True"> |
|||
<ListBox> |
|||
<s:String>Alarm 1</s:String> |
|||
<s:String>Alarm 2</s:String> |
|||
<s:String>Alarm 3</s:String> |
|||
</ListBox> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable ContentId="journal" |
|||
Title="Journal"> |
|||
<RichTextBox> |
|||
<FlowDocument> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
This is the content of the Journal Pane. |
|||
<LineBreak /> |
|||
A |
|||
<Bold>RichTextBox</Bold> has been added here |
|||
</Paragraph> |
|||
</FlowDocument> |
|||
</RichTextBox> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
</xcad:LayoutAnchorablePaneGroup> |
|||
</xcad:LayoutPanel> |
|||
<xcad:LayoutRoot.LeftSide> |
|||
<xcad:LayoutAnchorSide> |
|||
<xcad:LayoutAnchorGroup> |
|||
<xcad:LayoutAnchorable Title="Agenda" |
|||
ContentId="agenda" |
|||
IconSource="../Images/address-book-open.png"> |
|||
<TextBlock Text="Agenda Content" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable Title="Contacts" |
|||
ContentId="contacts" |
|||
IconSource="../Images/address-book--pencil.png"> |
|||
<TextBlock Text="Contacts Content" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorGroup> |
|||
</xcad:LayoutAnchorSide> |
|||
</xcad:LayoutRoot.LeftSide> |
|||
</xcad:LayoutRoot> |
|||
|
|||
<xcad:LayoutRoot x:Key="CustomLayout" x:Name="layoutRoot2"> |
|||
<xcad:LayoutPanel x:Name="layoutPanel" Orientation="Horizontal"> |
|||
<xcad:LayoutAnchorablePane DockWidth="200"> |
|||
<xcad:LayoutAnchorable ContentId="explorer" |
|||
Title="Explorer" |
|||
CanHide="False" |
|||
CanClose="False" |
|||
AutoHideWidth="240" |
|||
IconSource="../Images/property-blue.png"> |
|||
<TreeView> |
|||
<TreeViewItem Header="Level 1" IsExpanded="True"> |
|||
<TreeViewItem Header="Level 2.1" /> |
|||
<TreeViewItem Header="Level 2.2" IsExpanded="True"> |
|||
<TreeViewItem Header="Level 3.1" /> |
|||
<TreeViewItem Header="Level 3.2" /> |
|||
</TreeViewItem> |
|||
<TreeViewItem Header="Level 2.3" /> |
|||
</TreeViewItem> |
|||
</TreeView> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
|
|||
<xcad:LayoutDocumentPaneGroup Orientation="Horizontal"> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="docs" Title="Documents" > |
|||
<TextBox>Simple text doc.</TextBox> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="files" Title="Files" > |
|||
<DockPanel Margin="10"> |
|||
<WrapPanel HorizontalAlignment="Center" DockPanel.Dock="Top" Margin="0,0,0,10"> |
|||
<Button x:Name="OpenFile">Open files</Button> |
|||
</WrapPanel> |
|||
<ListBox Name="lbFiles"> |
|||
<TextBox>File 1</TextBox> |
|||
<TextBox>File 2</TextBox> |
|||
<TextBox>File 3</TextBox> |
|||
</ListBox> |
|||
</DockPanel> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
|
|||
</xcad:LayoutPanel> |
|||
|
|||
<xcad:LayoutRoot.RightSide> |
|||
<xcad:LayoutAnchorSide> |
|||
<xcad:LayoutAnchorGroup> |
|||
<xcad:LayoutAnchorable Title="Options" |
|||
ContentId="options"> |
|||
<TextBlock Text="Options" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable Title="Tools" |
|||
ContentId="Tools"> |
|||
<TextBlock Text="Items" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorGroup> |
|||
</xcad:LayoutAnchorSide> |
|||
</xcad:LayoutRoot.RightSide> |
|||
</xcad:LayoutRoot> |
|||
|
|||
<Style x:Key="DefaultDocumentPaneControlStyle" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="Transparent" /> |
|||
</Style> |
|||
|
|||
<Style x:Key="DocumentPaneControlStyle1" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="LightSlateGray" /> |
|||
|
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type xcad:LayoutDocumentPaneControl}"> |
|||
<Grid> |
|||
<TabControl x:Name="leftMaterialTabs" |
|||
TabStripPlacement="Left"> |
|||
<TabItem Header="First" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #1" /> |
|||
<TabItem Header="Second" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #2" /> |
|||
<TabItem Header="Third" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #3" /> |
|||
<TabItem Header="Fourth" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #4" /> |
|||
<TabItem Header="Fifth" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #5" /> |
|||
</TabControl> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style x:Key="DocumentPaneControlStyle2" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="DarkGray" /> |
|||
<Style.Triggers> |
|||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Model.ChildrenCount}" |
|||
Value="0"> |
|||
<!-- New template when no more LayoutDocument in LayoutDocumentPane --> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type xcad:LayoutDocumentPaneControl}"> |
|||
<Grid> |
|||
<Button Content="Button" |
|||
VerticalAlignment="Center" |
|||
HorizontalAlignment="Center" /> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</DataTrigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
|
|||
<ControlTemplate x:Key="DefaultAnchorSideTemplate" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="{TemplateBinding Background}"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorSideTemplate1" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="LightCyan"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorSideTemplate2" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="Beige" BorderThickness="2"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="DefaultAnchorTemplate" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Gray" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorTemplate1" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="BlueViolet" |
|||
BorderThickness="2" |
|||
CornerRadius="1" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Gray" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorTemplate2" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="Black" |
|||
BorderThickness="4" |
|||
CornerRadius="3" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3" |
|||
Width="32"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Beige" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<DataTemplate x:Key="DefaultDocumentHeaderTemplate"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}" |
|||
TextTrimming="WordEllipsis" /> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate x:Key="DocumentHeaderTemplate1"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}"> |
|||
<TextBlock.Style> |
|||
<Style TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Background"> |
|||
<Setter.Value> |
|||
<SolidColorBrush Color="SlateGray"/> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</TextBlock.Style> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate x:Key="DocumentHeaderTemplate2"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Border Background="Blue" Margin="5,4" /> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}"> |
|||
<TextBlock.Style> |
|||
<Style TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Foreground"> |
|||
<Setter.Value> |
|||
<SolidColorBrush Color="OrangeRed"/> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</TextBlock.Style> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<ContextMenu x:Key="DefaultDocumentContextMenu"> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_Close}" |
|||
Command="{Binding Path=CloseCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_CloseAllButThis}" |
|||
Command="{Binding Path=CloseAllButThisCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_CloseAll}" |
|||
Command="{Binding Path=CloseAllCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_Float}" |
|||
Command="{Binding Path=FloatCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_DockAsDocument}" |
|||
Command="{Binding Path=DockAsDocumentCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_NewHorizontalTabGroup}" |
|||
Command="{Binding Path=NewHorizontalTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_NewVerticalTabGroup}" |
|||
Command="{Binding Path=NewVerticalTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_MoveToNextTabGroup}" |
|||
Command="{Binding Path=MoveToNextTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_MoveToPreviousTabGroup}" |
|||
Command="{Binding Path=MoveToPreviousTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
</ContextMenu> |
|||
|
|||
<ContextMenu x:Key="DocumentContextMenu1"> |
|||
<MenuItem Header="Menu item 1" /> |
|||
<MenuItem Header="Menu item 2" /> |
|||
<Separator /> |
|||
<MenuItem Header="Menu item 3" /> |
|||
</ContextMenu> |
|||
|
|||
<ContextMenu x:Key="DocumentContextMenu2"> |
|||
<MenuItem Header="Option 1" /> |
|||
<MenuItem Header="Option 2" /> |
|||
<Separator /> |
|||
<MenuItem Header="Option 3" /> |
|||
<MenuItem Header="Option 4" /> |
|||
</ContextMenu> |
|||
|
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Header="Features" |
|||
Grid.Row="0" |
|||
Margin="5"> |
|||
<Grid Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<!-- 1st column--> |
|||
<TextBlock Text="Layout: " |
|||
VerticalAlignment="Center" /> |
|||
<ComboBox Grid.Column="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding Layout, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different layout panes in the DockingManager."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultLayout}" /> |
|||
<ComboBoxItem Content="Template 1" |
|||
Tag="{StaticResource CustomLayout}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentPaneControlStyle: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="1" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Column="1" |
|||
Grid.Row="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding DocumentPaneControlStyle, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different document pane styles in the DockingManager."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentPaneControlStyle}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentPaneControlStyle1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentPaneControlStyle2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="AnchorSideTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="2" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Row="2" |
|||
Grid.Column="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding AnchorSideTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Sets the ControlTemplate to use to render LayoutAnchorSideControl."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultAnchorSideTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource AnchorSideTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource AnchorSideTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentContextMenu:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="3" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Row="3" |
|||
Grid.Column="1" |
|||
Margin="5" |
|||
Width="120" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding DocumentContextMenu, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Sets different context menus to show for documents."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentContextMenu}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentContextMenu1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentContextMenu2}" /> |
|||
</ComboBox> |
|||
|
|||
<!--2nd column--> |
|||
<TextBlock Text="AnchorTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="0" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0"/> |
|||
<ComboBox Grid.Column="3" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding AnchorTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different ControlTemplate for LayoutAnchorControl."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultAnchorTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource AnchorTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource AnchorTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentHeaderTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="1" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0" /> |
|||
<ComboBox Grid.Row="1" |
|||
Grid.Column="3" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
Width="120" |
|||
SelectedValue="{Binding DocumentHeaderTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different data template to use for document headers."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentHeaderTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentHeaderTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentHeaderTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="AutoHideWindowClosingTimer:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="2" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0"/> |
|||
<xctk:IntegerUpDown x:Name="_integerUpDown" |
|||
Grid.Row="2" |
|||
Grid.Column="3" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
Width="120" |
|||
Value="{Binding AutoHideWindowClosingTimer, ElementName=_dockingManager, ValidatesOnExceptions=True}" |
|||
ToolTip="Set the time (in ms, ex: 2000, 3000, 6000) it will take to close the AutoHideWindow (Agenda/Contacts) when not moused over or active."/> |
|||
|
|||
<TextBlock Text="AllowMixedOrientation:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="3" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0" /> |
|||
<CheckBox Grid.Row="3" |
|||
Grid.Column="3" |
|||
Width="120" |
|||
IsChecked="{Binding AllowMixedOrientation, ElementName=_dockingManager}" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
ToolTip="Sets whether the docking manager should allow mixed orientation for document panes." /> |
|||
|
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<Grid Grid.Row="1" |
|||
Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" |
|||
Text="Usage:" |
|||
Style="{StaticResource Header}" /> |
|||
|
|||
<StackPanel Grid.Row="1"> |
|||
<xcad:DockingManager x:Name="_dockingManager" |
|||
Height="300" |
|||
MaxHeight="395" |
|||
Layout="{StaticResource DefaultLayout}" |
|||
DocumentPaneControlStyle="{StaticResource DefaultDocumentPaneControlStyle}" |
|||
AnchorSideTemplate="{StaticResource DefaultAnchorSideTemplate}" |
|||
AnchorTemplate="{StaticResource DefaultAnchorTemplate}" |
|||
DocumentHeaderTemplate="{StaticResource DefaultDocumentHeaderTemplate}" |
|||
AutoHideWindowClosingTimer="1000" |
|||
DocumentContextMenu="{StaticResource DefaultDocumentContextMenu}" |
|||
BorderBrush="Black" |
|||
BorderThickness="1" |
|||
AllowMixedOrientation="True"> |
|||
</xcad:DockingManager> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
|
|||
@ -0,0 +1,117 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.AvalonDock.Layout; |
|||
using Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for AvalonDockSourcesView.xaml |
|||
/// </summary> |
|||
public partial class AvalonDockSourcesView : DemoView |
|||
{ |
|||
public AvalonDockSourcesView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
this.Documents = new ObservableCollection<DocumentBase>() |
|||
{ |
|||
new Resources.Page(){ Title = "Page" }, |
|||
new Resources.Document(){ Title = "Document" }, |
|||
new Resources.Note(){ Title = "Notes" }, |
|||
}; |
|||
|
|||
this.Anchorables = new ObservableCollection<Control>() |
|||
{ |
|||
new Label() { Content = "Tools" }, |
|||
new Label() { Content = "Settings" } |
|||
}; |
|||
|
|||
this.DataContext = this; |
|||
} |
|||
|
|||
public ObservableCollection<DocumentBase> Documents |
|||
{ |
|||
get; private set; |
|||
} |
|||
|
|||
public ObservableCollection<Control> Anchorables |
|||
{ |
|||
get; private set; |
|||
} |
|||
} |
|||
|
|||
// Custom LayoutUpdateStrategy class to call when AvalonDock needs to position an anchorable or a document inside an existing layout model. |
|||
public class LayoutManager : ILayoutUpdateStrategy |
|||
{ |
|||
// Performs actions before an anchorable is to be inserted. |
|||
public bool BeforeInsertAnchorable( LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer ) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
// Performs actions after an anchorable has been inserted. |
|||
public void AfterInsertAnchorable( LayoutRoot layout, LayoutAnchorable anchorableShown ) |
|||
{ |
|||
} |
|||
|
|||
// Performs actions before a document is to be inserted. |
|||
public bool BeforeInsertDocument( LayoutRoot layout, LayoutDocument documentToShow, ILayoutContainer destinationContainer ) |
|||
{ |
|||
var documentPanes = layout.Descendents().OfType<LayoutDocumentPane>().ToList(); |
|||
if( documentPanes.Count > 0 ) |
|||
documentPanes[ 0 ].Children.Add( documentToShow ); |
|||
return true; |
|||
} |
|||
|
|||
// Performs actions after a document has been inserted. |
|||
public void AfterInsertDocument( LayoutRoot layout, LayoutDocument anchorableShown ) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
// StyleSelector Class that allows to apply a Style for a LayoutDocument/LayoutAnchorable. |
|||
public class ContainerStyleSelector : StyleSelector |
|||
{ |
|||
public Style LayoutItemStyle |
|||
{ |
|||
get; set; |
|||
} |
|||
|
|||
public Style LayoutAnchorableItemStyle |
|||
{ |
|||
get; set; |
|||
} |
|||
|
|||
public override System.Windows.Style SelectStyle( object item, System.Windows.DependencyObject container ) |
|||
{ |
|||
if( item is Label ) |
|||
return LayoutAnchorableItemStyle; |
|||
|
|||
if( item is DocumentBase ) |
|||
return LayoutItemStyle; |
|||
|
|||
return base.SelectStyle( item, container ); |
|||
} |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views.AvalonDockSourcesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:localView="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views" |
|||
xmlns:views="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
mc:Ignorable="d" |
|||
Title="Sources"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
<Run>DocumentsSource/AnchorablesSource properties allows you to bind the DockingManager to a collection source from XAML.</Run> |
|||
<LineBreak /> |
|||
<Run>ILayoutUpdateStrategy is mainly used to modify or position a LayoutContent when DockingManager.DocumentsSource/AnchorablesSource changes.</Run> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<DataTemplate DataType="{x:Type views:Page}"> |
|||
<views:PageView /> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate DataType="{x:Type views:Document}"> |
|||
<views:DocumentView /> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate DataType="{x:Type views:Note}"> |
|||
<views:NoteView /> |
|||
</DataTemplate> |
|||
|
|||
</local:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" |
|||
Text="Usage:" |
|||
Style="{StaticResource Header}" /> |
|||
|
|||
<StackPanel Grid.Row="1"> |
|||
<xcad:DockingManager x:Name="_dockingManager" |
|||
DocumentsSource="{Binding Documents}" |
|||
AnchorablesSource="{Binding Anchorables}" |
|||
Height="350" |
|||
MaxHeight="450" |
|||
AllowMixedOrientation="True" |
|||
BorderBrush="Black" |
|||
BorderThickness="1"> |
|||
|
|||
<xcad:DockingManager.LayoutUpdateStrategy> |
|||
<localView:LayoutManager /> |
|||
</xcad:DockingManager.LayoutUpdateStrategy> |
|||
|
|||
<xcad:DockingManager.LayoutItemContainerStyleSelector> |
|||
<localView:ContainerStyleSelector> |
|||
|
|||
<!-- StyleSelector that defines a Style for a LayoutDocument. This defines the LayoutDocument title according to the DocumentBase Title property.--> |
|||
<localView:ContainerStyleSelector.LayoutItemStyle> |
|||
<Style TargetType="{x:Type xcad:LayoutItem}"> |
|||
<Setter Property="Title" Value="{Binding Model.Title}" /> |
|||
</Style> |
|||
</localView:ContainerStyleSelector.LayoutItemStyle> |
|||
|
|||
<!-- StyleSelector that defines a Style for a LayoutAnchorable. This defines the LayoutAnchorable title according to the Control content property.--> |
|||
<localView:ContainerStyleSelector.LayoutAnchorableItemStyle> |
|||
<Style TargetType="{x:Type xcad:LayoutAnchorableItem}"> |
|||
<Setter Property="Title" Value="{Binding Model.Content}" /> |
|||
<Setter Property="ContentId" Value="{Binding Model.Content}" /> |
|||
</Style> |
|||
</localView:ContainerStyleSelector.LayoutAnchorableItemStyle> |
|||
|
|||
</localView:ContainerStyleSelector> |
|||
</xcad:DockingManager.LayoutItemContainerStyleSelector> |
|||
|
|||
</xcad:DockingManager> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,76 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
using Xceed.Wpf.Toolkit.PropertyGrid; |
|||
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for PropertyGridAdvancedContextMenuView.xaml |
|||
/// </summary> |
|||
public partial class PropertyGridAdvancedContextMenuView : DemoView |
|||
{ |
|||
public PropertyGridAdvancedContextMenuView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
var selObject = new Person() |
|||
{ |
|||
FirstName = "John", |
|||
LastName = "Doe" |
|||
}; |
|||
|
|||
this.DataContext = selObject; |
|||
} |
|||
|
|||
private void MenuItem_Click( object sender, RoutedEventArgs e ) |
|||
{ |
|||
MenuItem menuItem = sender as MenuItem; |
|||
if( menuItem != null && menuItem.DataContext is PropertyItem ) |
|||
{ |
|||
Clipboard.SetData( DataFormats.Text, ( ( PropertyItem )menuItem.DataContext ).Value ); |
|||
} |
|||
} |
|||
|
|||
private class Person |
|||
{ |
|||
public string FirstName |
|||
{ |
|||
get; set; |
|||
} |
|||
public string LastName |
|||
{ |
|||
get; set; |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridAdvancedContextMenuView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
mc:Ignorable="d" |
|||
Title="Advanced ContextMenu" |
|||
VerticalScrollBarVisibility="Disabled"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
By default the propertyGrid provides a context menu for all the properties for a given object. You can override this behavior by setting the ShowAdvancedOptions property to True, and then use the AdvancedOptionsMenu property to provide a custom context menu for the properties. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<xctk:PropertyGridContextMenu x:Key="AdvancedOptionsMenu"> |
|||
<MenuItem Header="Copy" |
|||
Click="MenuItem_Click" /> |
|||
</xctk:PropertyGridContextMenu> |
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
<Grid> |
|||
<xctk:PropertyGrid x:Name="_propertyGrid" |
|||
Width="450" |
|||
MaxHeight="245" |
|||
Margin="10" |
|||
ShowAdvancedOptions="True" |
|||
SelectedObject="{Binding}" |
|||
AdvancedOptionsMenu="{StaticResource AdvancedOptionsMenu}"> |
|||
|
|||
</xctk:PropertyGrid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,52 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for PropertyGridEditorComboBoxDefinitionSourceView.xaml |
|||
/// </summary> |
|||
public partial class PropertyGridEditorComboBoxDefinitionSourceView : DemoView |
|||
{ |
|||
public PropertyGridEditorComboBoxDefinitionSourceView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridEditorComboBoxDefinitionSourceView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
mc:Ignorable="d" |
|||
Title="PropertyGrid EditorComboBoxDefinition Source" Height="450" Width="800"> |
|||
|
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
When using the PropertyGrid EditorComboBoxDefinition, you can bind its ItemsSource to a non-static collection source. |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Toolkit Plus for WPF. |
|||
</Hyperlink> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
|
|||
|
|||
<Image Source="..\OpenSourceImages\EditorComboBoxDefinition.png" Width="660" Height="430"/> |
|||
</local:DemoView> |
|||
@ -0,0 +1,28 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
public class Document : DocumentBase |
|||
{ |
|||
public Document() |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
public class DocumentBase |
|||
{ |
|||
public string Title |
|||
{ |
|||
get; set; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<UserControl x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources.DocumentView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800"> |
|||
<Grid> |
|||
<xcad:DockingManager x:Name="_dockingManager" |
|||
AllowMixedOrientation="True"> |
|||
|
|||
<xcad:LayoutRoot x:Name="_layoutRoot"> |
|||
<xcad:LayoutPanel Orientation="Horizontal"> |
|||
<xcad:LayoutDocumentPaneGroup> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="documentA" Title="Document A"> |
|||
<TextBlock Text="document A content" HorizontalAlignment="Center" VerticalAlignment="Center" /> |
|||
</xcad:LayoutDocument> |
|||
<xcad:LayoutDocument ContentId="documenB" Title="Document B"> |
|||
<TextBlock Text="document B content" HorizontalAlignment="Center" VerticalAlignment="Center" /> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
</xcad:LayoutPanel> |
|||
</xcad:LayoutRoot> |
|||
</xcad:DockingManager> |
|||
</Grid> |
|||
</UserControl> |
|||
@ -0,0 +1,32 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for DocumentView.xaml
|
|||
/// </summary>
|
|||
public partial class DocumentView : UserControl |
|||
{ |
|||
public DocumentView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
public class Note : DocumentBase |
|||
{ |
|||
public Note() |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<UserControl x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources.NoteView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800"> |
|||
<Grid> |
|||
<TextBox HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" |
|||
Text="Note content goes here..." /> |
|||
</Grid> |
|||
</UserControl> |
|||
@ -0,0 +1,32 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for NoteView.xaml
|
|||
/// </summary>
|
|||
public partial class NoteView : UserControl |
|||
{ |
|||
public NoteView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
public class Page : DocumentBase |
|||
{ |
|||
public Page() |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<UserControl x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources.PageView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800"> |
|||
<Grid> |
|||
<Label Content="Content goes here..." |
|||
HorizontalAlignment="Stretch" |
|||
VerticalAlignment="Stretch" /> |
|||
</Grid> |
|||
</UserControl> |
|||
@ -0,0 +1,32 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for PageView.xaml
|
|||
/// </summary>
|
|||
public partial class PageView : UserControl |
|||
{ |
|||
public PageView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,664 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views.AvalonDockPropertiesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:localView="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views" |
|||
Title="DockingManager Properties"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
The DockingManager is the core control of AvalonDock. The class provides several "Template" properties (e.g., AnchorableTitleTemplate/DocumentTitleTemplate, AnchorableHeaderTemplate/DocumentHeaderTemplate, etc.) that allow designers and developers to specify the template for the elements contained in the layout. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<localView:GenericResourceDictionary /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
|
|||
<xcad:LayoutRoot x:Key="DefaultLayout" x:Name="layoutRoot1"> |
|||
<xcad:LayoutPanel Orientation="Horizontal"> |
|||
<xcad:LayoutAnchorablePane DockWidth="160"> |
|||
<xcad:LayoutAnchorable ContentId="properties" |
|||
Title="Properties" |
|||
CanHide="False" |
|||
CanClose="False" |
|||
AutoHideWidth="240" |
|||
IconSource="../Images/property-blue.png"> |
|||
<xctk:PropertyGrid x:Name="propertyGrid" |
|||
NameColumnWidth="110" |
|||
AutoGenerateProperties="False"> |
|||
</xctk:PropertyGrid> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutDocumentPaneGroup> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="document1" |
|||
Title="Document 1" |
|||
IconSource="../Images/document.png"> |
|||
<Button Content="Document 1 Content" |
|||
HorizontalAlignment="Center" |
|||
VerticalAlignment="Center" /> |
|||
</xcad:LayoutDocument> |
|||
<xcad:LayoutDocument ContentId="document2" |
|||
Title="Document 2" |
|||
IconSource="../Images/document.png"> |
|||
<TextBox Text="Document 2 Content" |
|||
AcceptsReturn="True" /> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
<xcad:LayoutAnchorablePaneGroup DockWidth="125"> |
|||
<xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutAnchorable ContentId="alarms" |
|||
Title="Alarms" |
|||
IconSource="../Images/alarm-clock-blue.png" |
|||
CanClose="True"> |
|||
<ListBox> |
|||
<s:String>Alarm 1</s:String> |
|||
<s:String>Alarm 2</s:String> |
|||
<s:String>Alarm 3</s:String> |
|||
</ListBox> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable ContentId="journal" |
|||
Title="Journal"> |
|||
<RichTextBox> |
|||
<FlowDocument> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
This is the content of the Journal Pane. |
|||
<LineBreak /> |
|||
A |
|||
<Bold>RichTextBox</Bold> has been added here |
|||
</Paragraph> |
|||
</FlowDocument> |
|||
</RichTextBox> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
</xcad:LayoutAnchorablePaneGroup> |
|||
</xcad:LayoutPanel> |
|||
<xcad:LayoutRoot.LeftSide> |
|||
<xcad:LayoutAnchorSide> |
|||
<xcad:LayoutAnchorGroup> |
|||
<xcad:LayoutAnchorable Title="Agenda" |
|||
ContentId="agenda" |
|||
IconSource="../Images/address-book-open.png"> |
|||
<TextBlock Text="Agenda Content" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable Title="Contacts" |
|||
ContentId="contacts" |
|||
IconSource="../Images/address-book--pencil.png"> |
|||
<TextBlock Text="Contacts Content" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorGroup> |
|||
</xcad:LayoutAnchorSide> |
|||
</xcad:LayoutRoot.LeftSide> |
|||
</xcad:LayoutRoot> |
|||
|
|||
<xcad:LayoutRoot x:Key="CustomLayout" x:Name="layoutRoot2"> |
|||
<xcad:LayoutPanel x:Name="layoutPanel" Orientation="Horizontal"> |
|||
<xcad:LayoutAnchorablePane DockWidth="200"> |
|||
<xcad:LayoutAnchorable ContentId="explorer" |
|||
Title="Explorer" |
|||
CanHide="False" |
|||
CanClose="False" |
|||
AutoHideWidth="240" |
|||
IconSource="../Images/property-blue.png"> |
|||
<TreeView> |
|||
<TreeViewItem Header="Level 1" IsExpanded="True"> |
|||
<TreeViewItem Header="Level 2.1" /> |
|||
<TreeViewItem Header="Level 2.2" IsExpanded="True"> |
|||
<TreeViewItem Header="Level 3.1" /> |
|||
<TreeViewItem Header="Level 3.2" /> |
|||
</TreeViewItem> |
|||
<TreeViewItem Header="Level 2.3" /> |
|||
</TreeViewItem> |
|||
</TreeView> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
|
|||
<xcad:LayoutDocumentPaneGroup Orientation="Horizontal"> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="docs" Title="Documents" > |
|||
<TextBox>Simple text doc.</TextBox> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="files" Title="Files" > |
|||
<DockPanel Margin="10"> |
|||
<WrapPanel HorizontalAlignment="Center" DockPanel.Dock="Top" Margin="0,0,0,10"> |
|||
<Button x:Name="OpenFile">Open files</Button> |
|||
</WrapPanel> |
|||
<ListBox Name="lbFiles"> |
|||
<TextBox>File 1</TextBox> |
|||
<TextBox>File 2</TextBox> |
|||
<TextBox>File 3</TextBox> |
|||
</ListBox> |
|||
</DockPanel> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
|
|||
</xcad:LayoutPanel> |
|||
|
|||
<xcad:LayoutRoot.RightSide> |
|||
<xcad:LayoutAnchorSide> |
|||
<xcad:LayoutAnchorGroup> |
|||
<xcad:LayoutAnchorable Title="Options" |
|||
ContentId="options"> |
|||
<TextBlock Text="Options" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable Title="Tools" |
|||
ContentId="Tools"> |
|||
<TextBlock Text="Items" |
|||
Margin="10" |
|||
FontSize="18" |
|||
FontWeight="Black" |
|||
TextWrapping="Wrap" /> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorGroup> |
|||
</xcad:LayoutAnchorSide> |
|||
</xcad:LayoutRoot.RightSide> |
|||
</xcad:LayoutRoot> |
|||
|
|||
<Style x:Key="DefaultDocumentPaneControlStyle" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="Transparent" /> |
|||
</Style> |
|||
|
|||
<Style x:Key="DocumentPaneControlStyle1" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="LightSlateGray" /> |
|||
|
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type xcad:LayoutDocumentPaneControl}"> |
|||
<Grid> |
|||
<TabControl x:Name="leftMaterialTabs" |
|||
TabStripPlacement="Left"> |
|||
<TabItem Header="First" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #1" /> |
|||
<TabItem Header="Second" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #2" /> |
|||
<TabItem Header="Third" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #3" /> |
|||
<TabItem Header="Fourth" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #4" /> |
|||
<TabItem Header="Fifth" |
|||
VerticalContentAlignment="Center" |
|||
Content="MaterialTabItem #5" /> |
|||
</TabControl> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style x:Key="DocumentPaneControlStyle2" |
|||
TargetType="{x:Type xcad:LayoutDocumentPaneControl}" |
|||
BasedOn="{StaticResource DocumentPaneControlStyle}"> |
|||
<Setter Property="Background" Value="DarkGray" /> |
|||
<Style.Triggers> |
|||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Model.ChildrenCount}" |
|||
Value="0"> |
|||
<!-- New template when no more LayoutDocument in LayoutDocumentPane --> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type xcad:LayoutDocumentPaneControl}"> |
|||
<Grid> |
|||
<Button Content="Button" |
|||
VerticalAlignment="Center" |
|||
HorizontalAlignment="Center" /> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</DataTrigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
|
|||
<ControlTemplate x:Key="DefaultAnchorSideTemplate" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="{TemplateBinding Background}"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorSideTemplate1" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="LightCyan"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorSideTemplate2" |
|||
TargetType="{x:Type xcad:LayoutAnchorSideControl}"> |
|||
<ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Children}" |
|||
Background="Beige" BorderThickness="2"> |
|||
<ItemsControl.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="{Binding Path=Model.Side, RelativeSource={RelativeSource AncestorType={x:Type xcad:LayoutAnchorSideControl}, Mode=FindAncestor}}" /> |
|||
</ItemsPanelTemplate> |
|||
</ItemsControl.ItemsPanel> |
|||
</ItemsControl> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="DefaultAnchorTemplate" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="{TemplateBinding BorderBrush}" |
|||
BorderThickness="{TemplateBinding BorderThickness}" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Gray" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorTemplate1" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="BlueViolet" |
|||
BorderThickness="2" |
|||
CornerRadius="1" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Gray" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<ControlTemplate x:Key="AnchorTemplate2" |
|||
TargetType="{x:Type xcad:LayoutAnchorControl}"> |
|||
<Border Cursor="Hand" |
|||
BorderBrush="Black" |
|||
BorderThickness="4" |
|||
CornerRadius="3" |
|||
Background="{TemplateBinding Background}"> |
|||
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplate="{Binding Model.Root.Manager.AnchorableHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
ContentTemplateSelector="{Binding Model.Root.Manager.AnchorableHeaderTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" |
|||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|||
Margin="3" |
|||
Width="32"/> |
|||
</Border> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsMouseOver" |
|||
Value="True"> |
|||
<Setter Property="Background" |
|||
Value="Beige" /> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
|
|||
<DataTemplate x:Key="DefaultDocumentHeaderTemplate"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}" |
|||
TextTrimming="WordEllipsis" /> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate x:Key="DocumentHeaderTemplate1"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}"> |
|||
<TextBlock.Style> |
|||
<Style TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Background"> |
|||
<Setter.Value> |
|||
<SolidColorBrush Color="SlateGray"/> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</TextBlock.Style> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate x:Key="DocumentHeaderTemplate2"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Border Background="Blue" Margin="5,4" /> |
|||
<Image Source="{Binding IconSource}" |
|||
Margin="0,0,4,0" /> |
|||
<TextBlock Text="{Binding Title}"> |
|||
<TextBlock.Style> |
|||
<Style TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Foreground"> |
|||
<Setter.Value> |
|||
<SolidColorBrush Color="OrangeRed"/> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</TextBlock.Style> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
|
|||
<ContextMenu x:Key="DefaultDocumentContextMenu"> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_Close}" |
|||
Command="{Binding Path=CloseCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_CloseAllButThis}" |
|||
Command="{Binding Path=CloseAllButThisCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_CloseAll}" |
|||
Command="{Binding Path=CloseAllCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_Float}" |
|||
Command="{Binding Path=FloatCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_DockAsDocument}" |
|||
Command="{Binding Path=DockAsDocumentCommand}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_NewHorizontalTabGroup}" |
|||
Command="{Binding Path=NewHorizontalTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_NewVerticalTabGroup}" |
|||
Command="{Binding Path=NewVerticalTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_MoveToNextTabGroup}" |
|||
Command="{Binding Path=MoveToNextTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
<MenuItem Header="{x:Static xcad:Resources.Document_MoveToPreviousTabGroup}" |
|||
Command="{Binding Path=MoveToPreviousTabGroupCommand}" |
|||
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|||
</ContextMenu> |
|||
|
|||
<ContextMenu x:Key="DocumentContextMenu1"> |
|||
<MenuItem Header="Menu item 1" /> |
|||
<MenuItem Header="Menu item 2" /> |
|||
<Separator /> |
|||
<MenuItem Header="Menu item 3" /> |
|||
</ContextMenu> |
|||
|
|||
<ContextMenu x:Key="DocumentContextMenu2"> |
|||
<MenuItem Header="Option 1" /> |
|||
<MenuItem Header="Option 2" /> |
|||
<Separator /> |
|||
<MenuItem Header="Option 3" /> |
|||
<MenuItem Header="Option 4" /> |
|||
</ContextMenu> |
|||
|
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Header="Features" |
|||
Grid.Row="0" |
|||
Margin="5"> |
|||
<Grid Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<!-- 1st column--> |
|||
<TextBlock Text="Layout: " |
|||
VerticalAlignment="Center" /> |
|||
<ComboBox Grid.Column="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding Layout, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different layout panes in the DockingManager."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultLayout}" /> |
|||
<ComboBoxItem Content="Template 1" |
|||
Tag="{StaticResource CustomLayout}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentPaneControlStyle: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="1" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Column="1" |
|||
Grid.Row="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding DocumentPaneControlStyle, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different document pane styles in the DockingManager."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentPaneControlStyle}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentPaneControlStyle1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentPaneControlStyle2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="AnchorSideTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="2" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Row="2" |
|||
Grid.Column="1" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding AnchorSideTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Sets the ControlTemplate to use to render LayoutAnchorSideControl."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultAnchorSideTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource AnchorSideTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource AnchorSideTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentContextMenu:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="3" |
|||
Grid.Column="0" /> |
|||
<ComboBox Grid.Row="3" |
|||
Grid.Column="1" |
|||
Margin="5" |
|||
Width="120" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding DocumentContextMenu, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Sets different context menus to show for documents."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentContextMenu}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentContextMenu1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentContextMenu2}" /> |
|||
</ComboBox> |
|||
|
|||
<!--2nd column--> |
|||
<TextBlock Text="AnchorTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="0" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0"/> |
|||
<ComboBox Grid.Column="3" |
|||
Width="120" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
VerticalAlignment="Center" |
|||
SelectedValue="{Binding AnchorTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different ControlTemplate for LayoutAnchorControl."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultAnchorTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource AnchorTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource AnchorTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="DocumentHeaderTemplate: " |
|||
VerticalAlignment="Center" |
|||
Grid.Row="1" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0" /> |
|||
<ComboBox Grid.Row="1" |
|||
Grid.Column="3" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
Width="120" |
|||
SelectedValue="{Binding DocumentHeaderTemplate, ElementName=_dockingManager}" |
|||
SelectedValuePath="Tag" |
|||
ToolTip="Displays different data template to use for document headers."> |
|||
<ComboBoxItem Content="Default" |
|||
Tag="{StaticResource DefaultDocumentHeaderTemplate}" /> |
|||
<ComboBoxItem Content="Template1" |
|||
Tag="{StaticResource DocumentHeaderTemplate1}" /> |
|||
<ComboBoxItem Content="Template2" |
|||
Tag="{StaticResource DocumentHeaderTemplate2}" /> |
|||
</ComboBox> |
|||
|
|||
<TextBlock Text="AutoHideWindowClosingTimer:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="2" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0"/> |
|||
<xctk:IntegerUpDown x:Name="_integerUpDown" |
|||
Grid.Row="2" |
|||
Grid.Column="3" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
Width="120" |
|||
Value="{Binding AutoHideWindowClosingTimer, ElementName=_dockingManager, ValidatesOnExceptions=True}" |
|||
ToolTip="Set the time (in ms, ex: 2000, 3000, 6000) it will take to close the AutoHideWindow (Agenda/Contacts) when not moused over or active."/> |
|||
|
|||
<TextBlock Text="AllowMixedOrientation:" |
|||
VerticalAlignment="Center" |
|||
Grid.Row="3" |
|||
Grid.Column="2" |
|||
Margin="40,0,0,0" /> |
|||
<CheckBox Grid.Row="3" |
|||
Grid.Column="3" |
|||
Width="120" |
|||
IsChecked="{Binding AllowMixedOrientation, ElementName=_dockingManager}" |
|||
VerticalAlignment="Center" |
|||
Margin="5" |
|||
ToolTip="Sets whether the docking manager should allow mixed orientation for document panes." /> |
|||
|
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<Grid Grid.Row="1" |
|||
Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" |
|||
Text="Usage:" |
|||
Style="{StaticResource Header}" /> |
|||
|
|||
<StackPanel Grid.Row="1"> |
|||
<xcad:DockingManager x:Name="_dockingManager" |
|||
Height="300" |
|||
MaxHeight="395" |
|||
Layout="{StaticResource DefaultLayout}" |
|||
DocumentPaneControlStyle="{StaticResource DefaultDocumentPaneControlStyle}" |
|||
AnchorSideTemplate="{StaticResource DefaultAnchorSideTemplate}" |
|||
AnchorTemplate="{StaticResource DefaultAnchorTemplate}" |
|||
DocumentHeaderTemplate="{StaticResource DefaultDocumentHeaderTemplate}" |
|||
AutoHideWindowClosingTimer="1000" |
|||
DocumentContextMenu="{StaticResource DefaultDocumentContextMenu}" |
|||
BorderBrush="Black" |
|||
BorderThickness="1" |
|||
AllowMixedOrientation="True"> |
|||
</xcad:DockingManager> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
|
|||
@ -0,0 +1,49 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Windows; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for DockingManagerPropertiesView.xaml
|
|||
/// </summary>
|
|||
public partial class AvalonDockPropertiesView : DemoView |
|||
{ |
|||
public AvalonDockPropertiesView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
|
|||
public class GenericResourceDictionary : ResourceDictionary |
|||
{ |
|||
public GenericResourceDictionary() |
|||
{ |
|||
this.Source = new Uri( @"/" + |
|||
#if NET5
|
|||
"Xceed.Wpf.AvalonDock.NET5" + |
|||
#elif NETCORE
|
|||
"Xceed.Wpf.AvalonDock.NETCore" + |
|||
#else
|
|||
"Xceed.Wpf.AvalonDock" + |
|||
#endif
|
|||
";component/Themes/generic.xaml", UriKind.Relative ); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views.AvalonDockSourcesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:localView="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views" |
|||
xmlns:views="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
mc:Ignorable="d" |
|||
Title="Sources"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
<Run>DocumentsSource/AnchorablesSource properties allows you to bind the DockingManager to a collection source from XAML.</Run> |
|||
<LineBreak /> |
|||
<Run>ILayoutUpdateStrategy is mainly used to modify or position a LayoutContent when DockingManager.DocumentsSource/AnchorablesSource changes.</Run> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<DataTemplate DataType="{x:Type views:Page}"> |
|||
<views:PageView /> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate DataType="{x:Type views:Document}"> |
|||
<views:DocumentView /> |
|||
</DataTemplate> |
|||
|
|||
<DataTemplate DataType="{x:Type views:Note}"> |
|||
<views:NoteView /> |
|||
</DataTemplate> |
|||
|
|||
</local:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" |
|||
Text="Usage:" |
|||
Style="{StaticResource Header}" /> |
|||
|
|||
<StackPanel Grid.Row="1"> |
|||
<xcad:DockingManager x:Name="_dockingManager" |
|||
DocumentsSource="{Binding Documents}" |
|||
AnchorablesSource="{Binding Anchorables}" |
|||
Height="350" |
|||
MaxHeight="450" |
|||
AllowMixedOrientation="True" |
|||
BorderBrush="Black" |
|||
BorderThickness="1"> |
|||
|
|||
<xcad:DockingManager.LayoutUpdateStrategy> |
|||
<localView:LayoutManager /> |
|||
</xcad:DockingManager.LayoutUpdateStrategy> |
|||
|
|||
<xcad:DockingManager.LayoutItemContainerStyleSelector> |
|||
<localView:ContainerStyleSelector> |
|||
|
|||
<!-- StyleSelector that defines a Style for a LayoutDocument. This defines the LayoutDocument title according to the DocumentBase Title property.--> |
|||
<localView:ContainerStyleSelector.LayoutItemStyle> |
|||
<Style TargetType="{x:Type xcad:LayoutItem}"> |
|||
<Setter Property="Title" Value="{Binding Model.Title}" /> |
|||
</Style> |
|||
</localView:ContainerStyleSelector.LayoutItemStyle> |
|||
|
|||
<!-- StyleSelector that defines a Style for a LayoutAnchorable. This defines the LayoutAnchorable title according to the Control content property.--> |
|||
<localView:ContainerStyleSelector.LayoutAnchorableItemStyle> |
|||
<Style TargetType="{x:Type xcad:LayoutAnchorableItem}"> |
|||
<Setter Property="Title" Value="{Binding Model.Content}" /> |
|||
<Setter Property="ContentId" Value="{Binding Model.Content}" /> |
|||
</Style> |
|||
</localView:ContainerStyleSelector.LayoutAnchorableItemStyle> |
|||
|
|||
</localView:ContainerStyleSelector> |
|||
</xcad:DockingManager.LayoutItemContainerStyleSelector> |
|||
|
|||
</xcad:DockingManager> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,117 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System.Collections.ObjectModel; |
|||
using System.Linq; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.AvalonDock.Layout; |
|||
using Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Resources; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for AvalonDockSourcesView.xaml
|
|||
/// </summary>
|
|||
public partial class AvalonDockSourcesView : DemoView |
|||
{ |
|||
public AvalonDockSourcesView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
this.Documents = new ObservableCollection<DocumentBase>() |
|||
{ |
|||
new Resources.Page(){ Title = "Page" }, |
|||
new Resources.Document(){ Title = "Document" }, |
|||
new Resources.Note(){ Title = "Notes" }, |
|||
}; |
|||
|
|||
this.Anchorables = new ObservableCollection<Control>() |
|||
{ |
|||
new Label() { Content = "Tools" }, |
|||
new Label() { Content = "Settings" } |
|||
}; |
|||
|
|||
this.DataContext = this; |
|||
} |
|||
|
|||
public ObservableCollection<DocumentBase> Documents |
|||
{ |
|||
get; private set; |
|||
} |
|||
|
|||
public ObservableCollection<Control> Anchorables |
|||
{ |
|||
get; private set; |
|||
} |
|||
} |
|||
|
|||
// Custom LayoutUpdateStrategy class to call when AvalonDock needs to position an anchorable or a document inside an existing layout model.
|
|||
public class LayoutManager : ILayoutUpdateStrategy |
|||
{ |
|||
// Performs actions before an anchorable is to be inserted.
|
|||
public bool BeforeInsertAnchorable( LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer ) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
// Performs actions after an anchorable has been inserted.
|
|||
public void AfterInsertAnchorable( LayoutRoot layout, LayoutAnchorable anchorableShown ) |
|||
{ |
|||
} |
|||
|
|||
// Performs actions before a document is to be inserted.
|
|||
public bool BeforeInsertDocument( LayoutRoot layout, LayoutDocument documentToShow, ILayoutContainer destinationContainer ) |
|||
{ |
|||
var documentPanes = layout.Descendents().OfType<LayoutDocumentPane>().ToList(); |
|||
if( documentPanes.Count > 0 ) |
|||
documentPanes[ 0 ].Children.Add( documentToShow ); |
|||
return true; |
|||
} |
|||
|
|||
// Performs actions after a document has been inserted.
|
|||
public void AfterInsertDocument( LayoutRoot layout, LayoutDocument anchorableShown ) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
// StyleSelector Class that allows to apply a Style for a LayoutDocument/LayoutAnchorable.
|
|||
public class ContainerStyleSelector : StyleSelector |
|||
{ |
|||
public Style LayoutItemStyle |
|||
{ |
|||
get; set; |
|||
} |
|||
|
|||
public Style LayoutAnchorableItemStyle |
|||
{ |
|||
get; set; |
|||
} |
|||
|
|||
public override System.Windows.Style SelectStyle( object item, System.Windows.DependencyObject container ) |
|||
{ |
|||
if( item is Label ) |
|||
return LayoutAnchorableItemStyle; |
|||
|
|||
if( item is DocumentBase ) |
|||
return LayoutItemStyle; |
|||
|
|||
return base.SelectStyle( item, container ); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
After Width: | Height: | Size: 7.0 KiB |
@ -0,0 +1,38 @@ |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridAdvancedContextMenuView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
mc:Ignorable="d" |
|||
Title="Advanced ContextMenu" |
|||
VerticalScrollBarVisibility="Disabled"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
By default the propertyGrid provides a context menu for all the properties for a given object. You can override this behavior by setting the ShowAdvancedOptions property to True, and then use the AdvancedOptionsMenu property to provide a custom context menu for the properties. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<xctk:PropertyGridContextMenu x:Key="AdvancedOptionsMenu"> |
|||
<MenuItem Header="Copy" |
|||
Click="MenuItem_Click" /> |
|||
</xctk:PropertyGridContextMenu> |
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
<Grid> |
|||
<xctk:PropertyGrid x:Name="_propertyGrid" |
|||
Width="450" |
|||
MaxHeight="245" |
|||
Margin="10" |
|||
ShowAdvancedOptions="True" |
|||
SelectedObject="{Binding}" |
|||
AdvancedOptionsMenu="{StaticResource AdvancedOptionsMenu}"> |
|||
|
|||
</xctk:PropertyGrid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,76 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
using Xceed.Wpf.Toolkit.PropertyGrid; |
|||
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for PropertyGridAdvancedContextMenuView.xaml
|
|||
/// </summary>
|
|||
public partial class PropertyGridAdvancedContextMenuView : DemoView |
|||
{ |
|||
public PropertyGridAdvancedContextMenuView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
var selObject = new Person() |
|||
{ |
|||
FirstName = "John", |
|||
LastName = "Doe" |
|||
}; |
|||
|
|||
this.DataContext = selObject; |
|||
} |
|||
|
|||
private void MenuItem_Click( object sender, RoutedEventArgs e ) |
|||
{ |
|||
MenuItem menuItem = sender as MenuItem; |
|||
if( menuItem != null && menuItem.DataContext is PropertyItem ) |
|||
{ |
|||
Clipboard.SetData( DataFormats.Text, ( ( PropertyItem )menuItem.DataContext ).Value ); |
|||
} |
|||
} |
|||
|
|||
private class Person |
|||
{ |
|||
public string FirstName |
|||
{ |
|||
get; set; |
|||
} |
|||
public string LastName |
|||
{ |
|||
get; set; |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/ |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridEditorComboBoxDefinitionSourceView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
mc:Ignorable="d" |
|||
Title="PropertyGrid EditorComboBoxDefinition Source" Height="450" Width="800"> |
|||
|
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
When using the PropertyGrid EditorComboBoxDefinition, you can bind its ItemsSource to a non-static collection source. |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Toolkit Plus for WPF. |
|||
</Hyperlink> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
|
|||
|
|||
<Image Source="..\OpenSourceImages\EditorComboBoxDefinition.png" Width="660" Height="430"/> |
|||
</local:DemoView> |
|||
@ -0,0 +1,52 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2021 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for PropertyGridEditorComboBoxDefinitionSourceView.xaml
|
|||
/// </summary>
|
|||
public partial class PropertyGridEditorComboBoxDefinitionSourceView : DemoView |
|||
{ |
|||
public PropertyGridEditorComboBoxDefinitionSourceView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2020 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
***********************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Globalization; |
|||
using System.Windows.Data; |
|||
using Xceed.Wpf.Toolkit.Core.Utilities; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.Core.Converters |
|||
{ |
|||
public class PrintableFontFamilyConverter : IValueConverter |
|||
{ |
|||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
return FontUtilities.GetFontFamily( value as string ); |
|||
} |
|||
|
|||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2020 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
***********************************************************************************/ |
|||
|
|||
using System; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.PropertyGrid.Attributes |
|||
{ |
|||
public enum CategoryPropertyOrderEnum |
|||
{ |
|||
Alphabetical, |
|||
Declaration |
|||
} |
|||
|
|||
[AttributeUsage( AttributeTargets.Class, AllowMultiple = false )] |
|||
public class CategoryPropertyOrderAttribute : Attribute |
|||
{ |
|||
#region Properties
|
|||
|
|||
#region CategoryPropertyOrder
|
|||
|
|||
public CategoryPropertyOrderEnum CategoryPropertyOrder |
|||
{ |
|||
get; |
|||
private set; |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#endregion
|
|||
|
|||
#region constructor
|
|||
|
|||
public CategoryPropertyOrderAttribute( CategoryPropertyOrderEnum categoryPropertyOrder = CategoryPropertyOrderEnum.Alphabetical ) |
|||
{ |
|||
CategoryPropertyOrder = categoryPropertyOrder; |
|||
} |
|||
|
|||
#endregion
|
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,51 @@ |
|||
/************************************************************************************* |
|||
|
|||
Toolkit for WPF |
|||
|
|||
Copyright (C) 2007-2020 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the XCEED SOFTWARE, INC. |
|||
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at |
|||
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|||
|
|||
***********************************************************************************/ |
|||
|
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Media; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.PropertyGrid |
|||
{ |
|||
public class PropertyGridContextMenu : ContextMenu |
|||
{ |
|||
protected override void OnOpened( RoutedEventArgs e ) |
|||
{ |
|||
base.OnOpened( e ); |
|||
|
|||
var contextMenu = e.OriginalSource as ContextMenu; |
|||
if( ( contextMenu != null ) && ( contextMenu.PlacementTarget != null ) ) |
|||
{ |
|||
var control = contextMenu.PlacementTarget; |
|||
|
|||
// Get PropertyItemBase parent
|
|||
var parent = VisualTreeHelper.GetParent( control ); |
|||
while( parent != null ) |
|||
{ |
|||
var propertyItemBase = parent as PropertyItemBase; |
|||
if( propertyItemBase != null ) |
|||
{ |
|||
contextMenu.DataContext = propertyItemBase; |
|||
break; |
|||
} |
|||
parent = VisualTreeHelper.GetParent( parent ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue