Browse Source

Getting ready for v1.4 release

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
8448087086
  1. 37
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml
  2. 92
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs
  3. 21
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml
  4. 7
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs
  5. 62
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs
  6. 6
      ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln
  7. 46
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs
  8. 24
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs
  9. 11
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj
  10. 4
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
  11. 496
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml
  12. 118
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CalculatorUpDown/Themes/Generic.xaml
  13. 33
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/Themes/Generic.xaml
  14. 10
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml
  15. 27
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml
  16. 28
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml
  17. 48
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml
  18. 73
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml
  19. 4
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs
  20. 2
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml
  21. 2
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml
  22. 2
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml
  23. 49
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml
  24. 83
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj
  25. 14
      ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml

37
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml

@ -3,9 +3,40 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
xmlns:local="clr-namespace:WPFToolkit.Extended.Samples"
Title="MainWindow" Height="600" Width="800" WindowStartupLocation="CenterScreen" ForceCursor="True">
Title="MainWindow" Height="600" Width="250" WindowStartupLocation="CenterScreen" ForceCursor="True"
xmlns:sys="clr-namespace:System;assembly=mscorlib" Background="White">
<Window.Resources>
</Window.Resources>
<Grid>
<StackPanel>
</Grid>
<extToolkit:DecimalUpDown Margin="25,5,25,5" Value="{Binding Decimal}" FormatString="{Binding Text}" Watermark="Enter Decimal" SelectAllOnGotFocus="True" />
<extToolkit:DoubleUpDown Margin="25,5,25,5" Value="{Binding Double}" FormatString="{Binding Text}" Watermark="Enter Double" SelectAllOnGotFocus="True" />
<extToolkit:IntegerUpDown Margin="25,5,25,5" Value="{Binding Integer}" FormatString="{Binding Text}" Watermark="Enter Integer" SelectAllOnGotFocus="True" />
<!--<extToolkit:Calculator Precision="3" ValueChanged="Calculator_ValueChanged" />-->
<!--<extToolkit:CalculatorUpDown Watermark="Enter Value" Margin="10" />-->
<!--<extToolkit:ColorPicker />-->
<!--<extToolkit:ColorCanvas SelectedColorChanged="ColorCanvas_SelectedColorChanged" />-->
<!--<extToolkit:DateTimeUpDown VerticalAlignment="Center" Margin="25" Watermark="Enter Date" Format="FullDateTime" Value="{Binding DueDate}" />-->
<!--<extToolkit:TimePicker VerticalAlignment="Center" Margin="25" Value="{Binding DueDate}" Watermark="Enter Time" />-->
<!--<extToolkit:DateTimePicker Margin="25" Background="White" Value="{Binding DueDate}" Watermark="Select Date" TimeWatermark="Select Time" />-->
<!--<extToolkit:MaskedTextBox Value="{Binding Price}" Mask="00.00" Margin="25" Watermark="Enter Value" />-->
<!--<extToolkit:PropertyGrid Margin="25" SelectedObject="{Binding ElementName=_text}" Height="300" />-->
</StackPanel>
</Window>

92
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs

@ -14,6 +14,8 @@ using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.ObjectModel;
using Microsoft.Windows.Controls;
using System.Text.RegularExpressions;
using System.Diagnostics;
namespace WPFToolkit.Extended.Samples
{
@ -25,12 +27,102 @@ namespace WPFToolkit.Extended.Samples
public MainWindow()
{
InitializeComponent();
DataContext = new Data();
Loaded += new RoutedEventHandler(MainWindow_Loaded);
}
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
}
private void Calculator_ValueChanged(object sender, RoutedPropertyChangedEventArgs<decimal?> e)
{
Debug.WriteLine(e.NewValue.HasValue ? e.NewValue.Value.ToString() : "NULL");
}
private void ColorCanvas_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color> e)
{
Debug.WriteLine(e.NewValue);
}
}
public class Data : System.ComponentModel.INotifyPropertyChanged
{
protected string _Text = "C2";
public string Text
{
get { return _Text; }
set
{
_Text = value;
NotifyPropertyChanged("Text");
}
}
private int? _integer = 5;
public int? Integer
{
get { return _integer; }
set
{
_integer = value;
NotifyPropertyChanged("Integer");
}
}
private double? _double = 5;
public double? Double
{
get { return _double; }
set
{
_double = value;
NotifyPropertyChanged("Double");
}
}
private decimal? _decimal = 5;
public decimal? Decimal
{
get { return _decimal; }
set
{
_decimal = value;
NotifyPropertyChanged("Decimal");
}
}
private DateTime? _dueDate;
public DateTime? DueDate
{
get { return _dueDate; }
set
{
_dueDate = value;
NotifyPropertyChanged("DueDate");
}
}
public Data()
{
//Text = "testm";
}
#region PropertyChanged
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(info));
}
}
#endregion
}
}

21
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml

@ -187,9 +187,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Available Colors" Background="AliceBlue" Padding="2" Margin="0,0,0,1" />
<ListBox x:Name="PART_AvailableColors" Grid.Row="1" Background="Transparent" BorderThickness="0" SelectionMode="Single"
ItemsSource="{Binding AvailableColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding AvailableColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
@ -208,9 +209,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Standard Colors" Background="AliceBlue" Padding="2" Margin="0,1,0,1"/>
<ListBox x:Name="PART_StandardColors" Grid.Row="1" SelectionMode="Single" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding StandardColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding StandardColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
@ -229,9 +231,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Recent Colors" Background="AliceBlue" Padding="2" Margin="0,1,0,1"/>
<ListBox x:Name="PART_RecentColors" Grid.Row="1" SelectionMode="Single" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding RecentColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding RecentColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />

7
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs

@ -163,7 +163,7 @@ namespace Microsoft.Windows.Controls.Primitives
{
base.OnMouseWheel(e);
if (!e.Handled && AllowSpin)
if (!e.Handled && AllowSpin && TextBox.IsFocused)
{
if (e.Delta < 0)
{
@ -257,6 +257,11 @@ namespace Microsoft.Windows.Controls.Primitives
Text = ConvertValueToText();
#if VS2008
//there is a bug in .NET 3.5 which will not correctly update the textbox text through binding.
TextBox.Text = Text;
#endif
_isSyncingTextAndValueProperties = false;
}

62
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

@ -277,10 +277,17 @@ namespace Microsoft.Windows.Controls.PropertyGrid
var properties = TypeDescriptor.GetProperties(instance.GetType(), new Attribute[] { new PropertyFilterAttribute(PropertyFilterOptions.All) });
// Get all properties of the type
propertyItems.AddRange(properties.Cast<PropertyDescriptor>().
Where(p => p.IsBrowsable && p.Name != "GenericParameterAttributes").
Select(property => CreatePropertyItem(property, instance, this)));
try
{
// Get all properties of the type
propertyItems.AddRange(properties.Cast<PropertyDescriptor>().
Where(p => p.IsBrowsable && p.Name != "GenericParameterAttributes").
Select(property => CreatePropertyItem(property, instance, this)));
}
catch (Exception ex)
{
}
return propertyItems;
}
@ -315,27 +322,34 @@ namespace Microsoft.Windows.Controls.PropertyGrid
editor = customEditor.Editor;
}
//no custom editor found
if (editor == null)
try
{
if (propertyItem.IsReadOnly)
editor = new TextBlockEditor();
else if (propertyItem.PropertyType == typeof(bool))
editor = new CheckBoxEditor();
else if (propertyItem.PropertyType == typeof(decimal) || propertyItem.PropertyType == typeof(decimal?))
editor = new DecimalUpDownEditor();
else if (propertyItem.PropertyType == typeof(double) || propertyItem.PropertyType == typeof(double?))
editor = new DoubleUpDownEditor();
else if (propertyItem.PropertyType == typeof(int) || propertyItem.PropertyType == typeof(int?))
editor = new IntegerUpDownEditor();
else if (propertyItem.PropertyType == typeof(DateTime))
editor = new DateTimeUpDownEditor();
else if (propertyItem.PropertyType.IsEnum)
editor = new EnumComboBoxEditor();
else if (propertyItem.PropertyType == typeof(FontFamily) || propertyItem.PropertyType == typeof(FontWeight) || propertyItem.PropertyType == typeof(FontStyle) || propertyItem.PropertyType == typeof(FontStretch))
editor = new FontComboBoxEditor();
else
editor = new TextBoxEditor();
//no custom editor found
if (editor == null)
{
if (propertyItem.IsReadOnly)
editor = new TextBlockEditor();
else if (propertyItem.PropertyType == typeof(bool))
editor = new CheckBoxEditor();
else if (propertyItem.PropertyType == typeof(decimal) || propertyItem.PropertyType == typeof(decimal?))
editor = new DecimalUpDownEditor();
else if (propertyItem.PropertyType == typeof(double) || propertyItem.PropertyType == typeof(double?))
editor = new DoubleUpDownEditor();
else if (propertyItem.PropertyType == typeof(int) || propertyItem.PropertyType == typeof(int?))
editor = new IntegerUpDownEditor();
else if (propertyItem.PropertyType == typeof(DateTime))
editor = new DateTimeUpDownEditor();
else if (propertyItem.PropertyType.IsEnum)
editor = new EnumComboBoxEditor();
else if (propertyItem.PropertyType == typeof(FontFamily) || propertyItem.PropertyType == typeof(FontWeight) || propertyItem.PropertyType == typeof(FontStyle) || propertyItem.PropertyType == typeof(FontStretch))
editor = new FontComboBoxEditor();
else
editor = new TextBoxEditor();
}
}
catch (Exception ex)
{
}
editor.Attach(propertyItem);

6
ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln

@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended", "Src\WPFToolkit.Extended\WPFToolkit.Extended.csproj", "{72E591D6-8F83-4D8C-8F67-9C325E623234}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended.Examples", "Src\WPFToolkit.Extended.Examples\WPFToolkit.Extended.Examples.csproj", "{747652D0-6AA6-4F96-99F7-0C834274FAB2}"
@ -9,7 +9,7 @@ Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 3
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/TFS02
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs02
SccLocalPath0 = .
SccProjectUniqueName1 = Src\\WPFToolkit.Extended\\WPFToolkit.Extended.csproj
SccProjectName1 = Src/WPFToolkit.Extended

46
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs

@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4952
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WPFToolkit.Extended.Examples.Properties
{
namespace WPFToolkit.Extended.Examples.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@ -19,51 +19,43 @@ namespace WPFToolkit.Extended.Examples.Properties
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFToolkit.Extended.Examples.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

24
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs

@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4952
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WPFToolkit.Extended.Examples.Properties
{
namespace WPFToolkit.Extended.Examples.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}

11
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -18,6 +18,11 @@
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -58,10 +63,14 @@
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Window1.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>

4
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml

@ -7,6 +7,8 @@
<!-- ButtonSpinner -->
<!-- =============================================================================== -->
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<SolidColorBrush x:Key="SpinButtonGlyphNormalForegroundFillKey" Color="#FF000000" />
<DataTemplate x:Key="IncreaseGlyph">
@ -40,7 +42,7 @@
<Grid>
<Border x:Name="ElementContainer" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<DockPanel Focusable="False">
<Grid DockPanel.Dock="Right">
<Grid DockPanel.Dock="Right" Visibility="{TemplateBinding ShowButtonSpinner, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="1" />

496
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml

@ -0,0 +1,496 @@
<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:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters" >
<coreConverters:CalculatorMemoryToVisibilityConverter x:Key="CalculatorMemoryToVisibilityConverter" />
<Style x:Key="CalculatorOperatorButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Focusable" Value="False"/>
<Setter Property="Foreground" Value="#FF5B636E"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="Control">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_MouseOver" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Pressed" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To=".5"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To=".5"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="MemoryStates">
<VisualState x:Name="EmptyMemory"/>
<VisualState x:Name="MemoryAssigned">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Border1" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Border2" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border Background="White" BorderBrush="{x:Null}" BorderThickness="0" CornerRadius="2" Margin="0,0,0,-1" Opacity="0.5"/>
<Grid x:Name="PART_Default">
<Border BorderThickness="0" CornerRadius="2" Background="#FF9CA2AB">
<Grid>
<Border x:Name="PART_Border1" BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFEDF1F7" Offset="0"/>
<GradientStop Color="#FFD5DBE3" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFEDF1F7" Offset="0"/>
<GradientStop Color="#FFD5DBE3" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
<Border x:Name="PART_Border2" BorderThickness="0" CornerRadius="1" Margin="1" Opacity="0">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF9CA2AB" Offset="0"/>
<GradientStop Color="#FF9CA2AB" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFEDF1F7" Offset="0"/>
<GradientStop Color="#FFD5DBE3" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
</Border>
</Grid>
<Grid x:Name="PART_MouseOver" Opacity="0">
<Border BorderThickness="0" CornerRadius="2" Background="#FF9CA2AB">
<Border BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFDFEFF" Offset="0"/>
<GradientStop Color="#FFD9DFE8" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
<Grid x:Name="PART_Pressed" Opacity="0">
<Border BorderThickness="0" CornerRadius="2" Background="#FF90959D">
<Border BorderThickness="0" CornerRadius="1" Margin="1" Background="#FFB5BBC5"/>
</Border>
</Grid>
<ContentPresenter x:Name="contentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CalculatorClearButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Focusable" Value="False"/>
<Setter Property="Foreground" Value="#FFBF5254"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="Control">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_MouseOver" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Pressed" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To=".5"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To=".5"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border Background="White" BorderBrush="{x:Null}" BorderThickness="0" CornerRadius="2" Margin="0,0,0,-1" Opacity="0.5"/>
<Grid x:Name="PART_Default">
<Border BorderThickness="0" CornerRadius="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFC19497" Offset="0"/>
<GradientStop Color="#FFA67D80" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFDB8B8" Offset="0"/>
<GradientStop Color="#FFF39998" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
<Grid x:Name="PART_MouseOver" Opacity="0">
<Border BorderThickness="0" CornerRadius="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFC19497" Offset="0"/>
<GradientStop Color="#FFA67D80" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFEC9C9" Offset="0"/>
<GradientStop Color="#FFEAA4A3" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
<Grid x:Name="PART_Pressed" Opacity="0">
<Border BorderThickness="0" CornerRadius="2" Background="#FF9B6F72">
<Border BorderThickness="0" CornerRadius="1" Margin="1" Background="#FFE69197"/>
</Border>
</Grid>
<ContentPresenter x:Name="contentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CalculatorDigitButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="#FF2A313A"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid x:Name="Control">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_MouseOver" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To="0"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Pressed" Storyboard.TargetProperty="Opacity" To="1"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="PART_Default" Storyboard.TargetProperty="Opacity" To=".5"/>
<DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To=".5"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border BorderBrush="{x:Null}" BorderThickness="0" Background="White" CornerRadius="3" Margin="0,0,0,-1" Opacity="0.5"/>
<Grid x:Name="PART_Default">
<Border BorderThickness="0" CornerRadius="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA9AAAB" Offset="0"/>
<GradientStop Color="#FF98999A" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF6F7F7" Offset="0"/>
<GradientStop Color="#FFDEE0E2" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
<Grid x:Name="PART_MouseOver" Opacity="0">
<Border BorderThickness="0" CornerRadius="2">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA9AAAB" Offset="0"/>
<GradientStop Color="#FF98999A" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border BorderThickness="0" CornerRadius="1" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFCFCFC" Offset="0"/>
<GradientStop Color="#FFEEEFF2" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
<Grid x:Name="PART_Pressed" Opacity="0">
<Border BorderThickness="0" CornerRadius="2" Background="#FF87888A">
<Border BorderThickness="0" CornerRadius="1" Margin="1" Background="#FFB5BBC5"/>
</Border>
</Grid>
<ContentPresenter x:Name="contentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="CalculatorButtonPanel" TargetType="{x:Type ContentControl}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="3"/>
<ColumnDefinition/>
<ColumnDefinition Width="3"/>
<ColumnDefinition/>
<ColumnDefinition Width="3"/>
<ColumnDefinition/>
<ColumnDefinition Width="3"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="3"/>
<RowDefinition/>
<RowDefinition Height="3"/>
<RowDefinition/>
<RowDefinition Height="3"/>
<RowDefinition/>
<RowDefinition Height="3"/>
<RowDefinition/>
<RowDefinition Height="3"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Grid.Column="0" Grid.Row="0" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="MC"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="2" Grid.Row="0" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="MR"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="0" Grid.Row="2" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Back"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}" Grid.RowSpan="1"/>
<Button Grid.Column="2" Grid.Row="2" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Cancel"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorClearButtonStyle}"/>
<Button Grid.Column="4" Grid.Row="2" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Clear"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorClearButtonStyle}" Grid.ColumnSpan="1" Grid.RowSpan="1"/>
<Button Grid.Column="4" Grid.Row="0" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="MS"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="6" Grid.Row="0" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="MAdd"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}" Margin="0"/>
<Button Grid.Column="8" Grid.Row="0" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="MSub"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="6" Grid.Row="2" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Negate"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="8" Grid.Row="2" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Sqrt"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="0" Grid.Row="4" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Seven"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="2" Grid.Row="4" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Eight"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="4" Grid.Row="4" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Nine"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="6" Grid.Row="4" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Divide"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="8" Grid.Row="4" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Percent"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="0" Grid.Row="6" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Four"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="2" Grid.Row="6" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Five"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="4" Grid.Row="6" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Six"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="6" Grid.Row="6" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Multiply"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="8" Grid.Row="6" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Fraction"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="0" Grid.Row="8" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="One"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}" />
<Button Grid.Column="2" Grid.Row="8" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Two"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="4" Grid.Row="8" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Three"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}"/>
<Button Grid.Column="6" Grid.Row="8" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Subtract"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="8" Grid.Row="8" Grid.RowSpan="3" MinWidth="28" MinHeight="55"
local:Calculator.CalculatorButtonType="Equal"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
<Button Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="3" MinWidth="59" MinHeight="26"
local:Calculator.CalculatorButtonType="Zero"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}" />
<Button Grid.Column="4" Grid.Row="10" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Decimal"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorDigitButtonStyle}" />
<Button Grid.Column="6" Grid.Row="10" MinWidth="28" MinHeight="26"
local:Calculator.CalculatorButtonType="Add"
Command="local:CalculatorCommands.CalculatorButtonClick"
Style="{StaticResource CalculatorOperatorButtonStyle}"/>
</Grid>
</ControlTemplate>
<Style TargetType="{x:Type local:Calculator}">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFAFBFB" Offset="0"/>
<GradientStop Color="#FFF4F4F4" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="#FF949494" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:Calculator}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border x:Name="PART_Display" Margin="0,0,0,10" Background="White" BorderBrush="#FF949494" BorderThickness="1">
<StackPanel>
<Path Stretch="Fill" Height="9" Width="9" Fill="DarkGray"
Data="F1 M 508.172,390L 506.031,390L 504.612,393.385C 504.174,394.477 503.788,395.533 503.453,396.555L 503.417,396.555C 503.334,395.528 503.206,394.471 503.035,393.385L 502.454,390L 500.301,390L 498.637,399L 500.226,399L 500.807,395.537C 500.903,394.973 501,394.379 501.099,393.756C 501.198,393.133 501.287,392.534 501.367,391.957L 501.402,391.957C 501.444,392.514 501.499,393.08 501.567,393.655C 501.635,394.231 501.712,394.776 501.8,395.292L 502.382,398.871L 503.7,398.871L 505.231,395.233C 505.445,394.724 505.663,394.187 505.884,393.622C 506.105,393.057 506.313,392.502 506.508,391.957L 506.543,391.957C 506.411,393.11 506.304,394.292 506.223,395.502L 505.979,399L 507.637,399L 508.172,390 Z "
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="4,4,0,0"
Visibility="{Binding Memory, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CalculatorMemoryToVisibilityConverter}}"/>
<TextBlock FontSize="18"
HorizontalAlignment="Right"
Margin="0,0,4,0"
Text="{Binding DisplayText, RelativeSource={RelativeSource TemplatedParent}}" />
</StackPanel>
</Border>
<ContentControl x:Name="PART_CalculatorButtonPanel" Grid.Row="1" Template="{StaticResource CalculatorButtonPanel}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="PART_Display" Property="Background" Value="#E7F5FF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

118
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CalculatorUpDown/Themes/Generic.xaml

@ -0,0 +1,118 @@
<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:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="PopupBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFffffff"/>
<GradientStop Offset="1" Color="#FFE8EBED"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="CalculatorToggleButtonStyle" TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid SnapsToDevicePixels="True">
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
CornerRadius="0,2.75,2.75,0"
RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path Width="7" Height="4" Data="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" Fill="#FF000000"/>
</Grid>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<!-- =============================================================================== -->
<!-- CalculatorUpDown -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:CalculatorUpDown}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderThickness" Value="1,1,0,1" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="HorizontalContentAlignment" Value="Right" />
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CalculatorUpDown}">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"
AllowSpin="{TemplateBinding AllowSpin}" ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="TextBox" BorderThickness="0"
Background="{TemplateBinding Background}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
MinWidth="20" AcceptsReturn="False"
TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding Watermark}"
WatermarkTemplate="{TemplateBinding WatermarkTemplate}"/>
</local:ButtonSpinner>
<ToggleButton x:Name="_calculatorToggleButton" Grid.Column="1"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource CalculatorToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"/>
</Grid>
<Popup x:Name="PART_CalculatorPopup" IsOpen="{Binding IsChecked, ElementName=_calculatorToggleButton}" StaysOpen="False">
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}" Padding="3">
<StackPanel>
<local:Calculator x:Name="PART_Calculator" Background="Transparent" BorderThickness="0"
DisplayText="{Binding DisplayText, RelativeSource={RelativeSource TemplatedParent}}"
Memory="{Binding Memory, RelativeSource={RelativeSource TemplatedParent}}"
Precision="{Binding Precision, RelativeSource={RelativeSource TemplatedParent}}"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}" />
</StackPanel>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

33
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/Themes/Generic.xaml

@ -136,34 +136,6 @@
</Style>
</Grid.Resources>
<!--VisualStateManager-->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStatesGroup">
<VisualState x:Name="Closed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Visibility" Duration="0">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Open">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Visibility" Duration="0">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="PART_WindowRoot" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" >
<Grid.RenderTransform>
<TransformGroup>
@ -226,6 +198,11 @@
</Border>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Closed">
<Setter Property="Visibility" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>

10
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml

@ -267,7 +267,7 @@
Style="{StaticResource ColorCanvasSliderStyle}"
Value="{Binding R, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="2" Text="{Binding Value, ElementName=PART_RSlider, StringFormat=F0}"
<TextBox Grid.Row="0" Grid.Column="2" Text="{Binding Value, ElementName=PART_RSlider}"
VerticalAlignment="Center"
Style="{StaticResource ColorCanvasTextBoxStyle}"/>
@ -277,7 +277,7 @@
Style="{StaticResource ColorCanvasSliderStyle}"
Value="{Binding G, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Value, ElementName=PART_GSlider, StringFormat=F0}"
<TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Value, ElementName=PART_GSlider}"
VerticalAlignment="Center" Style="{StaticResource ColorCanvasTextBoxStyle}"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="B"
@ -286,7 +286,7 @@
Style="{StaticResource ColorCanvasSliderStyle}"
Value="{Binding B, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding Value, ElementName=PART_BSlider, StringFormat=F0}"
<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding Value, ElementName=PART_BSlider}"
VerticalAlignment="Center" Style="{StaticResource ColorCanvasTextBoxStyle}"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="A"
@ -295,7 +295,7 @@
Style="{StaticResource ColorCanvasSliderStyle}"
Value="{Binding Path=A, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="3" Grid.Column="3" Text="{Binding Value, ElementName=PART_OpacitySlider, StringFormat=F0}"
<TextBox Grid.Row="3" Grid.Column="3" Text="{Binding Value, ElementName=PART_OpacitySlider}"
VerticalAlignment="Center" Style="{StaticResource ColorCanvasTextBoxStyle}"/>
</Grid>
@ -317,7 +317,7 @@
<Setter Property="IsSnapToTickEnabled" Value="True" />
<Setter Property="IsDirectionReversed" Value="False" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="Value" Value="360" />
<Setter Property="Value" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ColorSpectrumSlider}">

27
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml

@ -146,7 +146,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ColorPicker}">
<Grid>
<ToggleButton x:Name="PART_ColorPickerToggleButton" IsTabStop="False" MinHeight="22" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
<ToggleButton x:Name="PART_ColorPickerToggleButton" IsTabStop="True" MinHeight="22" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
Style="{TemplateBinding ButtonStyle}">
<Grid Margin="2,2,0,2">
@ -187,9 +187,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Available Colors" Background="AliceBlue" Padding="2" Margin="0,0,0,1" />
<ListBox x:Name="PART_AvailableColors" Grid.Row="1" Background="Transparent" BorderThickness="0" SelectionMode="Single"
ItemsSource="{Binding AvailableColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding AvailableColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
@ -208,9 +209,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Standard Colors" Background="AliceBlue" Padding="2" Margin="0,1,0,1"/>
<ListBox x:Name="PART_StandardColors" Grid.Row="1" SelectionMode="Single" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding StandardColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding StandardColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
@ -229,9 +231,10 @@
</Grid.RowDefinitions>
<TextBlock Text="Recent Colors" Background="AliceBlue" Padding="2" Margin="0,1,0,1"/>
<ListBox x:Name="PART_RecentColors" Grid.Row="1" SelectionMode="Single" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding RecentColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}">
ItemsSource="{Binding RecentColors, RelativeSource={RelativeSource TemplatedParent}}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ItemContainerStyle="{StaticResource ColorPaletteLisBoxStyle}"
Style="{x:Null}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
@ -245,9 +248,9 @@
<!-- ColorCanvas -->
<Grid x:Name="_colorCanvasHost" Visibility="Collapsed">
<local:ColorCanvas x:Name="PART_ColorCanvas" Background="Transparent" BorderThickness="0"
SelectedColor="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
<Separator Grid.Row="1" HorizontalAlignment="Stretch" Margin="5,0,5,0" />
<!-- More Colors Button -->

28
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml

@ -3,10 +3,14 @@
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"
xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit">
xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
@ -56,6 +60,8 @@
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:DateTimePicker}">
<Setter Property="TimeWatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimePicker}">
@ -66,9 +72,14 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:DateTimeUpDown BorderThickness="1,1,0,1" Format="{TemplateBinding Format}" FormatString="{TemplateBinding FormatString}"
Value="{Binding SelectedDate, RelativeSource={RelativeSource TemplatedParent}}" />
<ToggleButton x:Name="_calendarToggleButton" Grid.Column="1"
<local:DateTimeUpDown BorderThickness="1,1,0,1"
AllowSpin="{TemplateBinding AllowSpin}"
Format="{TemplateBinding Format}" FormatString="{TemplateBinding FormatString}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding Watermark}"
WatermarkTemplate="{TemplateBinding WatermarkTemplate}" />
<ToggleButton x:Name="_calendarToggleButton" Grid.Column="1" Background="White"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource DateTimePickerToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"/>
@ -76,9 +87,12 @@
<Popup IsOpen="{Binding IsChecked, ElementName=_calendarToggleButton}" StaysOpen="False">
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}" Padding="3">
<StackPanel>
<toolkit:Calendar x:Name="Part_Calendar"
DisplayDate="{Binding SelectedDate, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"/>
<local:DateTimeUpDown x:Name="Part_TimeUpDown" Format="ShortTime" Value="{Binding SelectedDate, RelativeSource={RelativeSource TemplatedParent}}" Background="White" />
<toolkit:Calendar x:Name="Part_Calendar" BorderThickness="0" />
<local:TimePicker x:Name="Part_TimeUpDown"
Format="ShortTime"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding TimeWatermark}"
WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"/>
</StackPanel>
</Border>
</Popup>

48
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml

@ -1,36 +1,50 @@
<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:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<!-- =============================================================================== -->
<!-- DateTimeUpDown -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:DateTimeUpDown}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="HorizontalContentAlignment" Value="Right" />
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimeUpDown}">
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" BorderThickness="{TemplateBinding BorderThickness}">
<TextBox x:Name="TextBox" BorderThickness="0"
Background="{TemplateBinding Background}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsReadOnly="True"
MinWidth="20" AcceptsReturn="False"
TextAlignment="Right" TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" />
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"
AllowSpin="{TemplateBinding AllowSpin}" ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="TextBox" BorderThickness="0"
Background="{TemplateBinding Background}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
MinWidth="20" AcceptsReturn="False"
TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding Watermark}"
WatermarkTemplate="{TemplateBinding WatermarkTemplate}"/>
</local:ButtonSpinner>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

73
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml

@ -1,37 +1,70 @@
<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:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"
xmlns:prims="clr-namespace:Microsoft.Windows.Controls.Primitives">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<!-- =============================================================================== -->
<!-- NumericUpDown -->
<!-- =============================================================================== -->
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<Style TargetType="{x:Type local:NumericUpDown}">
<Style x:Key="NumericUpDown" TargetType="Control">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="HorizontalContentAlignment" Value="Right" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:NumericUpDown}">
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False">
<TextBox x:Name="TextBox" BorderThickness="0"
Background="{TemplateBinding Background}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
MinWidth="20" AcceptsReturn="False"
TextAlignment="Right" TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" />
<ControlTemplate TargetType="Control">
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"
AllowSpin="{Binding AllowSpin, RelativeSource={RelativeSource TemplatedParent}}" ShowButtonSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}" >
<local:WatermarkTextBox x:Name="TextBox" BorderThickness="0"
Background="{TemplateBinding Background}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
MinWidth="20" AcceptsReturn="False"
TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{Binding Watermark, RelativeSource={RelativeSource TemplatedParent}}"
WatermarkTemplate="{Binding WatermarkTemplate, RelativeSource={RelativeSource TemplatedParent}}"/>
</local:ButtonSpinner>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- =============================================================================== -->
<!-- DecimalUpDown -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:DecimalUpDown}" BasedOn="{StaticResource NumericUpDown}">
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
</Style>
<!-- =============================================================================== -->
<!-- DoubleUpDown -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:DoubleUpDown}" BasedOn="{StaticResource NumericUpDown}">
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
</Style>
<!-- =============================================================================== -->
<!-- IntegerUpDown -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:IntegerUpDown}" BasedOn="{StaticResource NumericUpDown}">
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
</Style>
</ResourceDictionary>

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

@ -54,8 +54,8 @@ using System;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[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")]

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

@ -305,7 +305,7 @@
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="6,2,0,4">
<TextBlock Text="{TemplateBinding SelectedObjectTypeName}" FontWeight="Bold"/>
<TextBlock Text="{TemplateBinding SelectedObjectTypeName}" FontWeight="Bold"/>
<TextBlock Text="{TemplateBinding SelectedObjectName}" Margin="5,0,0,0" />
</StackPanel>

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

@ -5,7 +5,7 @@
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<LinearGradientBrush x:Key="ColorPickerDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>

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

@ -6,6 +6,8 @@
<ResourceDictionary Source="/WPFToolkit.Extended;component/Chromes/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/Calculator/Themes/Generic.xaml" />
<ResourceDictionary Source="/WPFToolkit.Extended;component/CalculatorUpDown/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/ColorPicker/Themes/Generic.xaml" />

49
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml

@ -4,9 +4,17 @@
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
<!-- =============================================================================== -->
<!-- ResourceDictionary for TimePicker and related controls -->
<!-- =============================================================================== -->
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<coreConverters:TimeFormatToDateTimeFormatConverter x:Key="TimeFormatToDateTimeFormatConverter" />
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
@ -51,11 +59,35 @@
</Setter>
</Style>
<SolidColorBrush x:Key="ListItemHover" Color="#FFE7F5FD"/>
<Style x:Key="TimeItemStyle" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border Name="Border" SnapsToDevicePixels="true">
<ContentPresenter Margin="4" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{StaticResource ListItemHover}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- =============================================================================== -->
<!-- TimePicker -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:TimePicker}">
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TimePicker}">
@ -67,9 +99,13 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:DateTimeUpDown x:Name="PART_TimeUpDown" BorderThickness="1,1,0,1"
AllowSpin="{TemplateBinding AllowSpin}"
Format="{TemplateBinding Format, Converter={StaticResource TimeFormatToDateTimeFormatConverter}}"
FormatString="{TemplateBinding FormatString}"
Value="{Binding SelectedDate, RelativeSource={RelativeSource TemplatedParent}}" />
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding Watermark}"
WatermarkTemplate="{TemplateBinding WatermarkTemplate}"/>
<ToggleButton x:Name="_timePickerToggleButton" Grid.Column="1"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource TimePickerToggleButtonStyle}"
@ -77,10 +113,11 @@
</Grid>
<Popup IsOpen="{Binding IsChecked, ElementName=_timePickerToggleButton}" StaysOpen="False">
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}" >
<ListBox x:Name="PART_TimeListItems" BorderThickness="0"
SelectedItem="{Binding SelectedTime, RelativeSource={RelativeSource TemplatedParent}}">
</ListBox>
<Grid>
<ListBox x:Name="PART_TimeListItems" BorderThickness="0" Width="150" Height="130"
DisplayMemberPath="Display"
ItemContainerStyle="{StaticResource TimeItemStyle}"/>
</Grid>
</Border>
</Popup>
</Grid>

83
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj

@ -21,6 +21,21 @@
<SccProvider>SAK</SccProvider>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\sn.snk</AssemblyOriginatorKeyFile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -76,6 +91,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="CalculatorUpDown\Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Calculator\Themes\Generic.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ChildWindow\Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -163,12 +186,18 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ButtonSpinner\Implementation\ValidSpinDirections.cs">
<Link>ButtonSpinner\Implementation\ValidSpinDirections.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\CalculatorUpDown\Implementation\CalculatorUpDown.cs">
<Link>CalculatorUpDown\Implementation\CalculatorUpDown.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Calculator\Implementation\Calculator.cs">
<Link>Calculator\Implementation\Calculator.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Calculator\Implementation\CalculatorCommands.cs">
<Link>Calculator\Implementation\CalculatorCommands.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ChildWindow\Implementation\ChildWindow.cs">
<Link>ChildWindow\Implementation\ChildWindow.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ChildWindow\Implementation\VisualStates.ChildWindow.cs">
<Link>ChildWindow\Implementation\VisualStates.ChildWindow.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ChildWindow\Implementation\WindowStartupLocation.cs">
<Link>ChildWindow\Implementation\WindowStartupLocation.cs</Link>
</Compile>
@ -190,6 +219,9 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\ColorPicker\Implementation\ColorPicker.cs">
<Link>ColorPicker\Implementation\ColorPicker.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Converters\CalculatorMemoryToVisibilityConverter.cs">
<Link>Core\Converters\CalculatorMemoryToVisibilityConverter.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Converters\ColorToSolidColorBrushConverter.cs">
<Link>Core\Converters\ColorToSolidColorBrushConverter.cs</Link>
</Compile>
@ -214,6 +246,9 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\UIElementAdorner.cs">
<Link>Core\UIElementAdorner.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Utilities\CalculatorUtilities.cs">
<Link>Core\Utilities\CalculatorUtilities.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\Core\Utilities\ColorUtilities.cs">
<Link>Core\Utilities\ColorUtilities.cs</Link>
</Compile>
@ -229,6 +264,9 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\DateTimeUpDown\Implementation\DateTimeInfo.cs">
<Link>DateTimeUpDown\Implementation\DateTimeInfo.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\DateTimeUpDown\Implementation\DateTimeParser.cs">
<Link>DateTimeUpDown\Implementation\DateTimeParser.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\DateTimeUpDown\Implementation\DateTimePart.cs">
<Link>DateTimeUpDown\Implementation\DateTimePart.cs</Link>
</Compile>
@ -259,6 +297,15 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\MessageBox\Implementation\VisualStates.MessageBox.cs">
<Link>MessageBox\Implementation\VisualStates.MessageBox.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\NumericUpDown\Implementation\DecimalUpDown.cs">
<Link>NumericUpDown\Implementation\DecimalUpDown.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\NumericUpDown\Implementation\DoubleUpDown.cs">
<Link>NumericUpDown\Implementation\DoubleUpDown.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\NumericUpDown\Implementation\IntegerUpDown.cs">
<Link>NumericUpDown\Implementation\IntegerUpDown.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\NumericUpDown\Implementation\NumericUpDown.cs">
<Link>NumericUpDown\Implementation\NumericUpDown.cs</Link>
</Compile>
@ -289,6 +336,12 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\DateTimeUpDownEditor.cs">
<Link>PropertyGrid\Implementation\Editors\DateTimeUpDownEditor.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\DecimalUpDownEditor.cs">
<Link>PropertyGrid\Implementation\Editors\DecimalUpDownEditor.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\DoubleUpDownEditor.cs">
<Link>PropertyGrid\Implementation\Editors\DoubleUpDownEditor.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\EnumComboBoxEditor.cs">
<Link>PropertyGrid\Implementation\Editors\EnumComboBoxEditor.cs</Link>
</Compile>
@ -304,9 +357,6 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\ITypeEditor.cs">
<Link>PropertyGrid\Implementation\Editors\ITypeEditor.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\NumericUpDownEditor.cs">
<Link>PropertyGrid\Implementation\Editors\NumericUpDownEditor.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\PropertyGrid\Implementation\Editors\TextBlockEditor.cs">
<Link>PropertyGrid\Implementation\Editors\TextBlockEditor.cs</Link>
</Compile>
@ -359,6 +409,9 @@
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TimePicker\Implementation\TimeFormat.cs">
<Link>TimePicker\Implementation\TimeFormat.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TimePicker\Implementation\TimeItem.cs">
<Link>TimePicker\Implementation\TimeItem.cs</Link>
</Compile>
<Compile Include="..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\TimePicker\Implementation\TimePicker.cs">
<Link>TimePicker\Implementation\TimePicker.cs</Link>
</Compile>
@ -425,6 +478,24 @@
<Resource Include="PropertyGrid\Images\SortAscending16.png" />
<Resource Include="PropertyGrid\Images\Style11.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.

14
ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml

@ -1,7 +1,7 @@
<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">
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
<GradientStop Color="#ABADB3" Offset="0.05"/>
<GradientStop Color="#E2E3EA" Offset="0.07"/>
@ -24,7 +24,7 @@
<SolidColorBrush x:Key="TextBox_DisabledBackground" Color="#F4F4F4" />
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" />
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<Style TargetType="{x:Type local:WatermarkTextBox}">
@ -43,24 +43,24 @@
<Grid>
<Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="1" Background="{TemplateBinding Background}">
</Border>
<Border x:Name="MouseOverVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource TextBox_MouseOver}" CornerRadius="1" >
</Border>
<Border x:Name="FocusVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource TextBox_Focused}" CornerRadius="1" >
</Border>
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<ContentPresenter x:Name="PART_WatermarkHost"
Content="{TemplateBinding Watermark}"
ContentTemplate="{TemplateBinding WatermarkTemplate}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}"
Visibility="Collapsed"/>

Loading…
Cancel
Save