Browse Source

merged new controls into 3.5 solution.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
095de0345e
  1. 5
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckComboBox/Implementation/CheckComboBox.cs
  2. 32
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckComboBox/Themes/Generic.xaml
  3. 19
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/Selector.cs
  4. 4
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs
  5. 87
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CheckComboBox/Themes/Generic.xaml
  6. 32
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CheckListBox/Themes/Generic.xaml
  7. 4
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs
  8. 35
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml
  9. 2
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml
  10. BIN
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TokenizedTextBox/Images/delete8.png
  11. 59
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TokenizedTextBox/Themes/Generic.xaml
  12. 38
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj

5
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckComboBox/Implementation/CheckComboBox.cs

@ -2,6 +2,7 @@
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using Microsoft.Windows.Controls.Primitives; using Microsoft.Windows.Controls.Primitives;
using System.Windows.Input;
namespace Microsoft.Windows.Controls namespace Microsoft.Windows.Controls
{ {
@ -69,7 +70,11 @@ namespace Microsoft.Windows.Controls
private void UpdateText() private void UpdateText()
{ {
#if VS2008
string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemDisplayValue(x).ToString()).ToArray());
#else
string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemDisplayValue(x))); string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemDisplayValue(x)));
#endif
if (String.IsNullOrEmpty(Text) || !Text.Equals(newValue)) if (String.IsNullOrEmpty(Text) || !Text.Equals(newValue))
Text = newValue; Text = newValue;

32
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckComboBox/Themes/Generic.xaml

@ -3,29 +3,12 @@
xmlns:local="clr-namespace:Microsoft.Windows.Controls" xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives" > xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives" >
<Style x:Key="ComboBoxFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="4,4,21,4" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#F3F3F3" Offset="0"/>
<GradientStop Color="#EBEBEB" Offset="0.5"/>
<GradientStop Color="#DDDDDD" Offset="0.5"/>
<GradientStop Color="#CDCDCD" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/> <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
<Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry> <Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry>
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}"> <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/> <Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/> <Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/> <Setter Property="Focusable" Value="false"/>
@ -36,8 +19,10 @@
<chrome:ButtonChrome x:Name="Chrome" <chrome:ButtonChrome x:Name="Chrome"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
CornerRadius="0"
RenderEnabled="{TemplateBinding IsEnabled}" RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"
RenderNormal="False"
RenderPressed="{Binding IsPressed, ElementName=PART_DropDownButton}" RenderPressed="{Binding IsPressed, ElementName=PART_DropDownButton}"
SnapsToDevicePixels="true" > SnapsToDevicePixels="true" >
<Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"> <Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
@ -58,14 +43,13 @@
</Style> </Style>
<Style TargetType="{x:Type local:CheckComboBox}"> <Style TargetType="{x:Type local:CheckComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/> <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
<Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="4,3"/> <Setter Property="Padding" Value="2"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/> <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/> <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/> <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
@ -91,8 +75,10 @@
</Border> </Border>
</Grid> </Grid>
</Popup> </Popup>
<ToggleButton x:Name="PART_DropDownButton" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxReadonlyToggleButton}" />
<TextBlock Text="{TemplateBinding Text}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<TextBox Text="{TemplateBinding Text}" IsReadOnly="True" BorderThickness="0" Background="Transparent" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
<ToggleButton x:Name="PART_DropDownButton" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" />
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>

19
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/Selector.cs

@ -25,19 +25,10 @@ namespace Microsoft.Windows.Controls.Primitives
public Selector() public Selector()
{ {
SelectedItems = new ObservableCollection<object>(); SelectedItems = new ObservableCollection<object>();
//ItemContainerGenerator.StatusChanged += new EventHandler(ItemContainerGenerator_StatusChanged);
AddHandler(Selector.SelectedEvent, new RoutedEventHandler(Selector_ItemSelected)); AddHandler(Selector.SelectedEvent, new RoutedEventHandler(Selector_ItemSelected));
AddHandler(Selector.UnSelectedEvent, new RoutedEventHandler(Selector_ItemUnselected)); AddHandler(Selector.UnSelectedEvent, new RoutedEventHandler(Selector_ItemUnselected));
} }
//void ItemContainerGenerator_StatusChanged(object sender, EventArgs e)
//{
// if (ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
// {
// UpdateSelectedItemsFromSelectedValue();
// }
//}
#endregion //Constructors #endregion //Constructors
#region Properties #region Properties
@ -235,7 +226,7 @@ namespace Microsoft.Windows.Controls.Primitives
RaiseEvent(new SelectedItemChangedEventArgs(Selector.SelectedItemChangedEvent, this, item, isSelected)); RaiseEvent(new SelectedItemChangedEventArgs(Selector.SelectedItemChangedEvent, this, item, isSelected));
if (Command != null) if (Command != null)
Command.Execute(SelectedItem); Command.Execute(item);
} }
protected virtual void Update(object item, bool remove) protected virtual void Update(object item, bool remove)
@ -252,6 +243,9 @@ namespace Microsoft.Windows.Controls.Primitives
private void UpdateSelectedItems(object item, bool remove) private void UpdateSelectedItems(object item, bool remove)
{ {
if (SelectedItems == null)
SelectedItems = new ObservableCollection<object>();
if (remove) if (remove)
{ {
if (SelectedItems.Contains(item)) if (SelectedItems.Contains(item))
@ -272,8 +266,11 @@ namespace Microsoft.Windows.Controls.Primitives
_surpressSelectedValueChanged = true; _surpressSelectedValueChanged = true;
#if VS2008
string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemValue(x).ToString()).ToArray());
#else
string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemValue(x))); string newValue = String.Join(Delimiter, SelectedItems.Cast<object>().Select(x => GetItemValue(x)));
#endif
if (String.IsNullOrEmpty(SelectedValue) || !SelectedValue.Equals(newValue)) if (String.IsNullOrEmpty(SelectedValue) || !SelectedValue.Equals(newValue))
SelectedValue = newValue; SelectedValue = newValue;

4
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs

@ -60,8 +60,8 @@ using System.Security;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")] [assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")] [assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] [assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")]

87
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CheckComboBox/Themes/Generic.xaml

@ -0,0 +1,87 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives" >
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
<Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry>
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<chrome:ButtonChrome x:Name="Chrome"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
CornerRadius="0"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"
RenderNormal="False"
RenderPressed="{Binding IsPressed, ElementName=PART_DropDownButton}"
SnapsToDevicePixels="true" >
<Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="Arrow" Data="{StaticResource DownArrowGeometry}" Fill="Black" HorizontalAlignment="Center" Margin="3,0,3,0" VerticalAlignment="Center"/>
</Grid>
</chrome:ButtonChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:CheckComboBox}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CheckComboBox}">
<Grid x:Name="MainGrid" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Grid MinWidth="{Binding ActualWidth, ElementName=MainGrid}">
<Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid>
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
<Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
</Canvas>
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ScrollViewer>
</Border>
</Grid>
</Popup>
<Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<TextBox Text="{TemplateBinding Text}" IsReadOnly="True" BorderThickness="0" Background="Transparent" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
<ToggleButton x:Name="PART_DropDownButton" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

32
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CheckListBox/Themes/Generic.xaml

@ -23,36 +23,4 @@
</Setter> </Setter>
</Style> </Style>
<Style TargetType="{x:Type local:CheckListBoxItem}" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CheckListBoxItem}">
<Border x:Name="_background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Name="PART_CheckBox" IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center" Focusable="False" Margin="3,1,5,1"/>
<Border Grid.Column="1">
<ContentPresenter Margin="2" ContentSource="Content" />
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="_background" Property="Background" Value="Blue"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary> </ResourceDictionary>

4
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs

@ -58,8 +58,8 @@ using System.Security;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.0")] [assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")] [assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] [assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")]

35
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml

@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Microsoft.Windows.Controls" xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters" xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"
xmlns:magConverters="clr-namespace:Microsoft.Windows.Controls.Mag.Converters" xmlns:magConverters="clr-namespace:Microsoft.Windows.Controls.Mag.Converters"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"> xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes">
@ -96,4 +97,38 @@
</Setter> </Setter>
</Style> </Style>
<!-- =============================================================================== -->
<!-- SelectorItem -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type primitives:SelectorItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type primitives:SelectorItem}">
<Border x:Name="_background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Name="PART_CheckBox" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Focusable="False" Margin="3,1,5,1"/>
<Border Grid.Column="1">
<ContentPresenter Margin="2" ContentSource="Content" />
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="_background" Property="Background" Value="Blue"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary> </ResourceDictionary>

2
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml

@ -1,11 +1,13 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/WPFToolkit.Extended;component/Themes/Common/Generic_Common.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/Chromes/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/Chromes/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/BusyIndicator/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/BusyIndicator/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/ButtonSpinner/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/ButtonSpinner/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/Calculator/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/Calculator/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/CalculatorUpDown/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/CalculatorUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/CheckComboBox/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/CheckListBox/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/CheckListBox/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/ChildWindow/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/ChildWindow/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/ColorCanvas/Themes/Generic.xaml" /> <ResourceDictionary Source="/WPFToolkit.Extended;component/ColorCanvas/Themes/Generic.xaml" />

BIN
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TokenizedTextBox/Images/delete8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

59
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TokenizedTextBox/Themes/Generic.xaml

@ -0,0 +1,59 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Windows.Controls" >
<Style TargetType="{x:Type local:TokenItem}">
<Setter Property="Background" Value="#F3F7FD" />
<Setter Property="BorderBrush" Value="#BBD8FB" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Padding" Value="5,1,5,1" />
<Setter Property="Margin" Value="1,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TokenItem}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
Margin="{TemplateBinding Margin}">
<StackPanel Orientation="Horizontal" Margin="1">
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" />
<Button Margin="3,0,0,0" Cursor="Hand" Command="local:TokenizedTextBoxCommands.Delete" CommandParameter="{TemplateBinding TokenKey}" >
<Button.Template>
<ControlTemplate TargetType="Button">
<ContentPresenter />
</ControlTemplate>
</Button.Template>
<Image Source="/WPFToolkit.Extended;component/TokenizedTextBox/Images/delete8.png" Width="8" Height="8" />
</Button>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:TokenizedTextBox}" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TokenizedTextBox}">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<RichTextBox x:Name="PART_ContentHost" AcceptsReturn="False" IsDocumentEnabled="True" Padding="-3,0,0,0" />
<!--<Popup>
<Grid Background="White">
<ItemsPresenter />
</Grid>
</Popup>-->
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

38
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj

@ -109,6 +109,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="CheckComboBox\Themes\Generic.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="CheckListBox\Themes\Generic.xaml"> <Page Include="CheckListBox\Themes\Generic.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@ -181,6 +185,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="TokenizedTextBox\Themes\Generic.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WatermarkTextBox\Themes\Generic.xaml"> <Page Include="WatermarkTextBox\Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@ -221,15 +229,12 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Calculator\Implementation\CalculatorCommands.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Calculator\Implementation\CalculatorCommands.cs">
<Link>Calculator\Implementation\CalculatorCommands.cs</Link> <Link>Calculator\Implementation\CalculatorCommands.cs</Link>
</Compile> </Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CheckComboBox\Implementation\CheckComboBox.cs">
<Link>CheckComboBox\Implementation\CheckComboBox.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CheckListBox\Implementation\CheckListBox.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CheckListBox\Implementation\CheckListBox.cs">
<Link>CheckListBox\Implementation\CheckListBox.cs</Link> <Link>CheckListBox\Implementation\CheckListBox.cs</Link>
</Compile> </Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CheckListBox\Implementation\CheckListBoxCheckedChangedEventArgs.cs">
<Link>CheckListBox\Implementation\CheckListBoxCheckedChangedEventArgs.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CheckListBox\Implementation\CheckListBoxItem.cs">
<Link>CheckListBox\Implementation\CheckListBoxItem.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ChildWindow\Implementation\ChildWindow.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ChildWindow\Implementation\ChildWindow.cs">
<Link>ChildWindow\Implementation\ChildWindow.cs</Link> <Link>ChildWindow\Implementation\ChildWindow.cs</Link>
</Compile> </Compile>
@ -291,6 +296,12 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\InputBase.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\InputBase.cs">
<Link>Core\Primitives\InputBase.cs</Link> <Link>Core\Primitives\InputBase.cs</Link>
</Compile> </Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\Selector.cs">
<Link>Core\Primitives\Selector.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\SelectorItem.cs">
<Link>Core\Primitives\SelectorItem.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\UpDownBase.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Primitives\UpDownBase.cs">
<Link>Core\Primitives\UpDownBase.cs</Link> <Link>Core\Primitives\UpDownBase.cs</Link>
</Compile> </Compile>
@ -506,6 +517,18 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TimePicker\Implementation\TimePicker.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TimePicker\Implementation\TimePicker.cs">
<Link>TimePicker\Implementation\TimePicker.cs</Link> <Link>TimePicker\Implementation\TimePicker.cs</Link>
</Compile> </Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TokenizedTextBox\Implementation\Token.cs">
<Link>TokenizedTextBox\Implementation\Token.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TokenizedTextBox\Implementation\TokenItem.cs">
<Link>TokenizedTextBox\Implementation\TokenItem.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TokenizedTextBox\Implementation\TokenizedTextBox.cs">
<Link>TokenizedTextBox\Implementation\TokenizedTextBox.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TokenizedTextBox\Implementation\TokenizedTextBoxCommands.cs">
<Link>TokenizedTextBox\Implementation\TokenizedTextBoxCommands.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\VisualStates.cs"> <Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\VisualStates.cs">
<Link>VisualStates.cs</Link> <Link>VisualStates.cs</Link>
</Compile> </Compile>
@ -608,6 +631,9 @@
<Resource Include="CollectionEditors\Images\Delete16.png" /> <Resource Include="CollectionEditors\Images\Delete16.png" />
<Resource Include="MultiLineTextEditor\Images\Notes16.png" /> <Resource Include="MultiLineTextEditor\Images\Notes16.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="TokenizedTextBox\Images\delete8.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

Loading…
Cancel
Save