All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1087 lines
67 KiB

<!--*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2016 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
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.Theming.Views.ThemingCoreWPFView"
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:sys="clr-namespace:System;assembly=mscorlib"
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Theming.Views"
Title="Theming Core WPF Controls">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
<Run>Changes the themes of the WPF controls. Available themes are System, Office2007, Windows10 and Metro with accent color. The Xceed.Wpf.Themes.Office2007.dll or Xceed.Wpf.Themes.Metro.dll assemblies are necessary to use these themes.</Run>
<!--##INCLUDE_OPEN_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 Toolkit Plus for WPF.
</Hyperlink>
##END-->
</Paragraph>
</local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../ItemTemplates/Common.xaml" />
</ResourceDictionary.MergedDictionaries>
<LinearGradientBrush x:Key="customAccentBrush1"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FF0086c6"
Offset="0" />
<GradientStop Color="#FF66ccff"
Offset="0.94" />
<GradientStop Color="#FFddf4ff"
Offset="0.94" />
<GradientStop Color="#FFddf4ff"
Offset="0.97" />
<GradientStop Color="#FFddf4ff"
Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="customAccentBrush2"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FFff0099"
Offset="0" />
<GradientStop Color="#FF993366"
Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="customAccentBrush3"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FF9DE214"
Offset="0" />
<GradientStop Color="#FF9DE214"
Offset="0.2" />
<GradientStop Color="#FF95CA2A"
Offset="0.2" />
<GradientStop Color="#FF339933"
Offset="1" />
</LinearGradientBrush>
<Style x:Key="MetroSampleRadioButtonTemplate" TargetType="RadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2" />
<VisualTransition From="Normal"
GeneratedDuration="0"
To="Pressed">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.45"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.35"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.35"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0"
To=".2"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="content" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2" />
</VisualStateGroup.Transitions>
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimation Duration="0"
To="1"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="CheckIcon" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="content"
Width="20"
Height="20"
Fill="{TemplateBinding Background}" />
<Path x:Name="CheckIcon"
Data="M 619,736 C619,736 617,738 617,738 617,738 621,742 621,742 621,742 629,732 629,732 629,732 627,730 627,730 627,730 621,738 621,738 621,738 619,736 619,736 z"
Fill="White"
FlowDirection="LeftToRight"
Opacity="0"
Stretch="Fill"
UseLayoutRounding="False"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="12"
Height="12"
Margin="0,0,1,1" />
<Rectangle x:Name="rectangle"
Fill="White"
Opacity="0" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button"
x:Key="linkTextBlockStyle">
<Setter Property="Foreground"
Value="#Dadada" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Foreground"
Value="#FFE64AA4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- This is the Data Source used in the ListView and DataGrid. -->
<CollectionViewSource x:Key="cvsProducts" Source="{Binding Path=Products}" />
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Header="Features"
Grid.Row="0"
Margin="5">
<Grid Margin="5"
HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Margin="0,5,5,5" Orientation="Horizontal">
<TextBlock Text="Themes:" Margin="0,5,5,5" VerticalAlignment="Center"/>
<ComboBox x:Name="themeComboBox" Width="150" Height="25">
<ComboBoxItem Selected="SystemComboBoxItem_Selected"
Content="System" />
<ComboBoxItem Selected="Office2007BlueComboBoxItem_Selected"
Content="Office 2007 Blue" />
<ComboBoxItem Selected="Office2007BlackComboBoxItem_Selected"
Content="Office 2007 Black" />
<ComboBoxItem Selected="Office2007SilverComboBoxItem_Selected"
Content="Office 2007 Silver" />
<ComboBoxItem Selected="Windows10ComboBoxItem_Selected">
<ComboBoxItem.Content>
<DockPanel>
<TextBlock DockPanel.Dock="Left"
Text="Windows 10" />
<TextBlock TextAlignment="Right"
Style="{StaticResource newSuffix}" />
</DockPanel>
</ComboBoxItem.Content>
</ComboBoxItem>
<ComboBoxItem x:Name="metroDarkComboBoxItem"
Selected="MetroDarkComboBoxItem_Selected"
Content="Metro Dark" />
<ComboBoxItem x:Name="metroLightComboBoxItem"
Selected="MetroLightComboBoxItem_Selected"
Content="Metro Light" />
</ComboBox>
</StackPanel>
<StackPanel x:Name="_accentColorPanel"
Grid.Column="1" Margin="10,0,0,0"
Orientation="Horizontal"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Visibility="Hidden">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel>
<TextBlock Text="Accent Color" />
<StackPanel Orientation="Horizontal">
<RadioButton Background="#FFF4B300"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Gold"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF78BA00"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="LightGreen"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF2673EC"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Blue"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFAE113D"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="MediumVioletRed"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF632F00"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Brown"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFB01E00"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DarkRed"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFC1004F"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="PaleVioletRed"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF7200AC"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DarkViolet"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF4617B4"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DarkSlateBlue"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF006AC1"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="RoyalBlue"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF008287"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Teal"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF199900"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Green"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF00C13F"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Lime"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,2,0,0">
<RadioButton Background="#FFFF981D"
Margin="0,0,2,0"
IsChecked="True"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="LightSalmon"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFFF2E12"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Red"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFFF1D77"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DeepPink"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFAA40FF"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Purple"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF1FAEFF"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DeepSkyBlue"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF56C5FF"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DarkTurquoise"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF00D8CC"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Turquoise"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF91D100"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="YellowGreen"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFE1B700"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="DarkYellow"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFFF76BC"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Pink"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FF00A4A4"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="LightSeaGreen"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Background="#FFFF7D23"
Margin="0,0,2,0"
Checked="RadioButton_Checked"
GroupName="themeRadioGroup"
Tag="Orange"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
</StackPanel>
</Grid>
<StackPanel Margin="10,0,0,0">
<TextBlock Text="Custom Color" />
<StackPanel Orientation="Horizontal">
<RadioButton Margin="0,0,2,0"
Checked="RadioButton_Checked"
Background="{StaticResource customAccentBrush1}"
GroupName="themeRadioGroup"
Tag="Custom1"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Margin="0,0,2,0"
Checked="RadioButton_Checked"
Background="{StaticResource customAccentBrush2}"
GroupName="themeRadioGroup"
Tag="Custom2"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
<RadioButton Margin="0,0,2,0"
Checked="RadioButton_Checked"
Background="{StaticResource customAccentBrush3}"
GroupName="themeRadioGroup"
Tag="Custom3"
Style="{StaticResource MetroSampleRadioButtonTemplate}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</GroupBox>
<StackPanel Grid.Row="1"
Margin="10"
HorizontalAlignment="Left">
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<Grid x:Name="rootLayout">
<Grid.Resources>
<Storyboard x:Key="animatedProgressBarStoryboard"
RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="verticalProgressBar"
Storyboard.TargetProperty="Value"
To="100"
Duration="00:00:02" />
<DoubleAnimation Storyboard.TargetName="horizontalProgressBar"
Storyboard.TargetProperty="Value"
To="100"
Duration="00:00:02" />
</Storyboard>
</Grid.Resources>
<Border x:Name="SampleBorder"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Black"
BorderThickness="2"
BorderBrush="Black">
<Grid SnapsToDevicePixels="True"
Height="675">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.213*" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="0.303*" />
<ColumnDefinition Width="0.484*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="262*" />
<RowDefinition Height="338*" />
<RowDefinition Height="Auto"
MinHeight="23" />
</Grid.RowDefinitions>
<Border x:Name="groupBoxBorder"
Grid.Column="2"
Grid.Row="2"
BorderBrush="Transparent"
BorderThickness="1"
Margin="3,6,0,0">
<GroupBox Header="Login"
Margin="6" Width="155">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="77"/>
<RowDefinition Height="15" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ComboBox VerticalAlignment="Top" Margin="6,3,0,0" Grid.RowSpan="2">
<ComboBoxItem IsSelected="True">
<Image Source="..\Images\NoPictureA.jpg"
Width="80"
Height="80"
Margin="6,3,0,3" />
</ComboBoxItem>
<ComboBoxItem>
<Image Source="..\Images\NoPictureB.jpg"
Width="80"
Height="80"
Margin="6,3,0,3" />
</ComboBoxItem>
<ComboBoxItem>
<Image Source="..\Images\NoPictureC.jpg"
Height="80"
Width="80"
Margin="6,3" />
</ComboBoxItem>
<ComboBoxItem>
<Image Source="..\Images\NoPictureD.jpg"
Width="80"
Height="80"
Margin="6,3" />
</ComboBoxItem>
</ComboBox>
<!--<Calendar Grid.Row="1"
HorizontalAlignment="Right"/>-->
<DatePicker Grid.Row="2" />
<!--<Expander Name="myExpander"
Grid.Row="2"
Header="My Expander"
ExpandDirection="Down"
IsExpanded="True"
Width="100">
<TextBlock TextWrapping="Wrap">
Lorem ipsum dolor sit amet, consectetur
adipisicing elit.
</TextBlock>
</Expander>-->
</Grid>
</GroupBox>
</Border>
<Menu Grid.ColumnSpan="4">
<MenuItem Margin="0"
Header="File">
<MenuItem Header="New" />
<MenuItem Header="Open" />
<MenuItem Header="Close" />
<Separator />
<MenuItem Header="Save" />
<MenuItem Header="Save As" />
<Separator />
<MenuItem Header="Folder">
<MenuItem Header="New Folder" />
<Separator />
<MenuItem Header="Copy Folder" />
<MenuItem Header="Move Folder" />
<MenuItem Header="Properties" />
</MenuItem>
</MenuItem>
<MenuItem Header="Edit">
<MenuItem Header="Undo">
<MenuItem Header="1" />
</MenuItem>
<MenuItem Header="Redo" />
<Separator />
<MenuItem Header="Copy" />
<MenuItem Header="Cut" />
<MenuItem Header="Paste" />
</MenuItem>
<MenuItem Header="View">
<MenuItem Header="Show Tool Bar"
IsChecked="True" />
<MenuItem Header="Show Status Bar"
IsChecked="True" />
<Separator />
<MenuItem Header="Zoom In" />
<MenuItem Header="Zoom Out" />
</MenuItem>
<MenuItem Header="Help">
<MenuItem Header="Application Help" />
<MenuItem Header="Online Help Resources" />
<MenuItem Header="Contact Us" />
<Separator />
<MenuItem Header="Check For Updates" />
<Separator />
<MenuItem Header="About Us" />
</MenuItem>
</Menu>
<ToolBar Grid.Row="1"
Grid.ColumnSpan="4">
<Label Content="Search"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<TextBox HorizontalAlignment="Stretch"
Margin="0"
VerticalAlignment="Center"
Text="{x:Static view:ThemingCoreWPFView.DefaultSearchString}"
TextWrapping="NoWrap"
PreviewGotKeyboardFocus="TextBox_PreviewGotKeyboardFocus"
PreviewLostKeyboardFocus="TextBox_PreviewLostKeyboardFocus"
Width="150" />
<Separator Margin="2,0" />
</ToolBar>
<StatusBar Grid.Row="4"
Grid.ColumnSpan="4">
<StatusBarItem Content="11/20/2012" />
<Separator Margin="0" />
<StatusBarItem Content="WPF Controls Themes" />
</StatusBar>
<Grid Grid.Row="2"
Grid.RowSpan="2"
Margin="6,6,0,6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="4" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border x:Name="listItemTreeViewBorder"
Grid.RowSpan="3"
BorderThickness="1"
BorderBrush="Transparent" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="0.9*" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
FontWeight="Bold"
Content="My Music" />
<ListBox Grid.Row="1">
<ListBoxItem Content="Product Name" />
<ListBoxItem Content="Category" />
<ListBoxItem Content="Price" />
<ListBoxItem Content="Quantity/unit" />
<ListBoxItem Content="Discontinued"
IsEnabled="False" />
<ListBoxItem Content="Reorder Date" />
</ListBox>
</Grid>
<Grid Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="0.9*" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
FontWeight="Bold"
Content="Colors" />
<TreeView Grid.Row="1"
Grid.RowSpan="2">
<TreeViewItem Header="Primary Color"
IsExpanded="True"
>
<TreeViewItem Header="Yellow">
<Border Width="60"
Height="10"
Background="Yellow" />
</TreeViewItem>
<TreeViewItem Header="Red"
>
<Border Width="60"
Height="10"
Background="Red" />
</TreeViewItem>
<TreeViewItem Header="Blue"
>
<Border Width="60"
Height="10"
Background="#333399" />
</TreeViewItem>
</TreeViewItem>
<TreeViewItem Header="Secondary Color"
IsExpanded="True"
>
<TreeViewItem Header="Green"
>
<Border Width="60"
Height="10"
Background="#00A550" />
</TreeViewItem>
<TreeViewItem Header="Violet"
>
<Border Width="60"
Height="10"
Background="#8601AF" />
</TreeViewItem>
<TreeViewItem Header="Orange"
>
<Border Width="60"
Height="10"
Background="Orange" />
</TreeViewItem>
</TreeViewItem>
<TreeViewItem Header="Tertiary color"
IsExpanded="True"
>
<TreeViewItem Header="Red Orange"
>
<Border Width="60"
Height="10"
Background="#EC5800" />
</TreeViewItem>
<TreeViewItem Header="Orange Yellow"
>
<Border Width="60"
Height="10"
Background="#FFD700" />
</TreeViewItem>
<TreeViewItem Header="Chartreuse"
>
<Border Width="60"
Height="10"
Background="#DFFF00" />
</TreeViewItem>
<TreeViewItem Header="Aquamarine"
>
<Border Width="60"
Height="10"
Background="Turquoise" />
</TreeViewItem>
<TreeViewItem Header="Indigo"
>
<Border Width="60"
Height="10"
Background="#120a8f" />
</TreeViewItem>
<TreeViewItem Header="Violet Red"
>
<Border Width="60"
Height="10"
Background="#702963" />
</TreeViewItem>
</TreeViewItem>
</TreeView>
</Grid>
</Grid>
<TabControl Grid.Row="2" x:Name="tabItemFilter"
Grid.Column="3"
Margin="6,6,6,330" Grid.RowSpan="2">
<TabItem Header="Filter">
<Grid Margin="3,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Margin="0,3,3,0">
<Grid.RowDefinitions>
<RowDefinition Height="0.39*" />
<RowDefinition Height="0.40*" />
<RowDefinition Height="0.21*" />
</Grid.RowDefinitions>
<GroupBox Header="Most Played"
Margin="0,0,3,3">
<StackPanel Orientation="Vertical"
Margin="0">
<RadioButton Margin="2,1,0,0"
Content="Today" />
<RadioButton Margin="2,1,0,0"
Content="Last week" />
<RadioButton Margin="2,2,0,0"
Content="Last month"
IsEnabled="False" />
</StackPanel>
</GroupBox>
<GroupBox Header="Star Rating"
Margin="0,86,3,6" Grid.RowSpan="2">
<StackPanel Orientation="Vertical">
<CheckBox Margin="2"
Content="4 stars" />
<CheckBox Margin="2"
Content="3 stars" />
<CheckBox Margin="2"
IsEnabled="False"
Content="&lt; 3 stars" />
</StackPanel>
</GroupBox>
<GroupBox Header="Rating"
Margin="0,88,3,4"
Grid.Row="1" Grid.RowSpan="2">
<StackPanel Orientation="Vertical">
<CheckBox Margin="2"
IsThreeState="True"
IsChecked="True"
Content="Like it" />
</StackPanel>
</GroupBox>
</Grid>
<ProgressBar x:Name="verticalProgressBar"
Grid.Column="2"
Width="20"
HorizontalAlignment="Center"
Orientation="Vertical"
Value="{Binding Value, ElementName=slider}"
Margin="2,5,-2,7" />
<GroupBox Header="Progress Bars"
Grid.Column="1"
Margin="0,3,0,6" Width="153">
<StackPanel Orientation="Vertical">
<ToggleButton x:Name="animatedProgressToggleButton"
Content="Animate ProgressBars"
Checked="animatedProgressToggleButton_Checked"
Unchecked="animatedProgressToggleButton_Unchecked"
Margin="0,6,0,12" />
<Slider x:Name="slider"
Margin="0,0,0,6"
TickFrequency="10"
Maximum="100"
TickPlacement="Both" />
<ProgressBar x:Name="horizontalProgressBar"
Height="20"
Margin="0,6"
Value="{Binding Value, ElementName=slider}" />
<Grid Height="94">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="27" />
<RowDefinition Height="41*" />
</Grid.RowDefinitions>
<Grid VerticalAlignment="Top"
Grid.Row="2" Margin="26,23,3,10"
Height="33" Grid.ColumnSpan="2" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="3*" />
<RowDefinition Height="19" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>
<RepeatButton Content="Cancel" Grid.RowSpan="2" HorizontalAlignment="Right" Padding="2" Margin="0,6,10,6" Width="52" Grid.ColumnSpan="2" />
<Button Content="OK" Grid.RowSpan="2" IsDefault="True" Margin="6,6,13,6" />
</Grid>
<Label Margin="0"
VerticalAlignment="Center"
Content="User Name"
HorizontalAlignment="Right"
Grid.Row="1" />
<Label VerticalAlignment="Top"
Content="Password"
HorizontalAlignment="Right" Grid.Row="2" Height="27" Grid.RowSpan="2" Width="69" />
<TextBox Text="Anonymous"
Grid.Column="1"
VerticalAlignment="Center"
Grid.Row="1"
ToolTip="This is anonymous user"
>
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Copy" />
<MenuItem Header="Cut" />
<MenuItem Header="Past" />
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
<PasswordBox VerticalAlignment="Center"
Grid.Row="2"
Grid.Column="1">
<PasswordBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Copy" />
<MenuItem Header="Cut" />
<MenuItem Header="Past" />
</ContextMenu>
</PasswordBox.ContextMenu>
</PasswordBox>
</Grid>
</StackPanel>
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="Search">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.506*" />
<ColumnDefinition Width="0.494*" />
</Grid.ColumnDefinitions>
<GroupBox Header="Search"
Margin="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="Title"
HorizontalAlignment="Right"
VerticalAlignment="Center" />
<TextBox TextWrapping="NoWrap"
Grid.Column="1"
Margin="0,1,0,1" />
<Label Content="Category"
HorizontalAlignment="Right"
Grid.Row="1"
VerticalAlignment="Center" />
<ComboBox Grid.Row="1"
Grid.Column="1"
Margin="0,1,0,1">
<ComboBoxItem Content="Cabaret"
IsSelected="True" />
<ComboBoxItem Content="Classical" />
<ComboBoxItem Content="Folk" />
<ComboBoxItem Content="Jazz" />
<ComboBoxItem Content="Pop" />
</ComboBox>
<Grid VerticalAlignment="Top"
Grid.Row="4"
Grid.Column="1"
Height="22"
Margin="0,4,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>
<Button Content="OK"
IsDefault="True"
Margin="0,0,2,0" />
<Button Content="Cancel"
Grid.Column="1"
Margin="2,0,0,0" />
</Grid>
</Grid>
</GroupBox>
<GroupBox Header="Search by Artist"
Margin="3"
Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="64" />
<ColumnDefinition Width="72" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Margin="0,0,2,0"
VerticalAlignment="Center"
Content="First Name"
HorizontalAlignment="Right" />
<TextBox TextWrapping="NoWrap"
Grid.Column="1"
Margin="0,1,0,1" />
<Label Margin="0,0,2,0"
VerticalAlignment="Center"
Content="Last Name"
HorizontalAlignment="Right"
Grid.Row="1" />
<TextBox TextWrapping="NoWrap"
Grid.Column="1"
Grid.Row="1"
Margin="0,1,0,1" />
<Grid VerticalAlignment="Top"
Height="22"
Grid.Column="1"
Grid.Row="2"
Margin="0,4,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Content="OK"
IsDefault="True"
Margin="0,0,2,0" />
<RepeatButton Content="Cancel"
Grid.Column="1"
Margin="2,0,0,0" />
</Grid>
</Grid>
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="Disabled TabItem"
IsEnabled="False">
<Grid />
</TabItem>
</TabControl>
<Border Grid.Row="3"
Grid.Column="2"
Grid.ColumnSpan="2"
Margin="3,0,6,6">
<TabControl TabStripPlacement="Bottom">
<TabItem Header="ListView Control">
<ListView x:Name="msListView"
ItemsSource="{Binding Source={StaticResource cvsProducts}}">
<ListView.View>
<GridView>
<GridViewColumn Header="Product Name"
DisplayMemberBinding="{Binding ProductName}" />
<GridViewColumn Header="Category Name"
DisplayMemberBinding="{Binding Category.CategoryName}" />
<GridViewColumn Header="Quantity/unit"
DisplayMemberBinding="{Binding QuantityPerUnit}" />
<GridViewColumn Header="Reorder Date">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ReorderDate, StringFormat=\{0:d\}}" VerticalAlignment="Center" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Discontinued"
DisplayMemberBinding="{Binding Discontinued}" />
<GridViewColumn Header="Price">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding UnitPrice, StringFormat=\{0:C\}}" VerticalAlignment="Center" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</TabItem>
<TabItem Header="DataGrid Control">
<DataGrid x:Name="msDataGrid"
ItemsSource="{Binding Source={StaticResource cvsProducts}}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Product Name"
Width="SizeToCells"
Binding="{Binding ProductName}" />
<DataGridTextColumn Header="Category"
Width="SizeToCells"
Binding="{Binding Category.CategoryName}" />
<DataGridTextColumn Header="Quantity/unit"
Width="SizeToCells"
Binding="{Binding QuantityPerUnit}" />
<DataGridTemplateColumn Header="Reorder Date"
Width="SizeToHeader"
SortMemberPath="ReorderDate">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ReorderDate, StringFormat=\{0:d\}}" VerticalAlignment="Center" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Discontinued"
Width="SizeToHeader"
Binding="{Binding Discontinued}" />
<DataGridTemplateColumn Header="Price"
Width="SizeToCells"
SortMemberPath="UnitPrice">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding UnitPrice, StringFormat=\{0:C\}}" VerticalAlignment="Center" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</TabItem>
</TabControl>
</Border>
</Grid>
</Border>
</Grid>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\CoreWPFControls.png" Width="700" Height="500"/>
##END-->
</local:DemoView>