diff --git a/docs/release-notes/1.4.1.md b/docs/release-notes/1.4.1.md new file mode 100644 index 0000000000..71582b6110 --- /dev/null +++ b/docs/release-notes/1.4.1.md @@ -0,0 +1,15 @@ +# 1.4.1 Notes + +## Changes / Fixes + +- [#2793](https://github.com/MahApps/MahApps.Metro/pull/2793) StringToVisibilityConverter should handle null like an empty string +- [#2796](https://github.com/MahApps/MahApps.Metro/pull/2796) HamburgerMenu SelectedIndex Fix +- [#2797](https://github.com/MahApps/MahApps.Metro/pull/2797) Fix NumericUpDown using UseFloatingWatermark +- [#2789](https://github.com/MahApps/MahApps.Metro/pull/2789) Prevent the MetroDataGridCheckBox from being toggled by a TAB + SPACE when the cell is supposed to be read only. + +## Closed Issues + +- [#2795](https://github.com/MahApps/MahApps.Metro/issues/2795) NumericUpDown Watermark is shown twice when using floatingwatermark for textboxes +- [#2788](https://github.com/MahApps/MahApps.Metro/issues/2788) MetroDataGridCheckBox cell can be changed when IsReadOnly via keyboard + space +- [#2785](https://github.com/MahApps/MahApps.Metro/issues/2785) Vailidation tooltips does not show. +- [#2780](https://github.com/MahApps/MahApps.Metro/issues/2780) External Dialogs not visible with MainWindow set to IgnoreTaskbarOnMaximize diff --git a/src/MahApps.Metro.Build/MahApps.Metro.nuspec b/src/MahApps.Metro.Build/MahApps.Metro.nuspec index 024ead3f72..d4c78a4afc 100644 --- a/src/MahApps.Metro.Build/MahApps.Metro.nuspec +++ b/src/MahApps.Metro.Build/MahApps.Metro.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"> <metadata> <id>MahApps.Metro</id> - <version>1.4.0.0</version> + <version>1.4.1.0</version> <title>MahApps.Metro</title> <authors>Jan Karger, Dennis Daume, Brendan Forster, Paul Jenkins, Jake Ginnivan, Alex Mitchell</authors> <owners>punker76,shiftkey,aeoth,jakeginnivan</owners> @@ -13,7 +13,7 @@ <description>The goal of MahApps.Metro is to allow devs to quickly and easily cobble together a "Metro" or "Modern UI" for their WPF4+ apps, with minimal effort.</description> <summary>The goal of MahApps.Metro is to allow devs to quickly and easily cobble together a "Metro" or "Modern UI" for their WPF4+ apps, with minimal effort.</summary> <releaseNotes /> - <tags>WPF UI Metro ModernUI Material XAML Toolkit Library .NET</tags> + <tags>WPF UI Metro Modern Material XAML Toolkit Library .NET</tags> </metadata> <files> <file src="..\bin\MahApps.Metro\ReleaseNET40\MahApps.Metro.dll" target="lib\net40\MahApps.Metro.dll" /> diff --git a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MahApps.Metro.Demo.Shared/ExampleViews/HamburgerMenuSample.xaml b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MahApps.Metro.Demo.Shared/ExampleViews/HamburgerMenuSample.xaml index 4c266b2aa1..b327b5e01a 100644 --- a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MahApps.Metro.Demo.Shared/ExampleViews/HamburgerMenuSample.xaml +++ b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/MahApps.Metro.Demo.Shared/ExampleViews/HamburgerMenuSample.xaml @@ -51,6 +51,7 @@ <Grid> <controls:HamburgerMenu x:Name="HamburgerMenuControl" + SelectedIndex="1" Margin="20" Foreground="White" HamburgerWidth="48" diff --git a/src/MahApps.Metro/MahApps.Metro.Shared/Behaviours/BorderlessWindowBehavior.cs b/src/MahApps.Metro/MahApps.Metro.Shared/Behaviours/BorderlessWindowBehavior.cs index fa0e75c993..5b9b267453 100644 --- a/src/MahApps.Metro/MahApps.Metro.Shared/Behaviours/BorderlessWindowBehavior.cs +++ b/src/MahApps.Metro/MahApps.Metro.Shared/Behaviours/BorderlessWindowBehavior.cs @@ -368,12 +368,15 @@ private void HandleMaximize() var width = rect.Width; var height = rect.Height; - // Z-Order would only get refreshed/reflected if clicking the - // the titlebar (as opposed to other parts of the external - // window) unless I first set the window to HWND_BOTTOM then HWND_TOP before HWND_NOTOPMOST - UnsafeNativeMethods.SetWindowPos(this.handle, Constants.HWND_BOTTOM, left, top, width, height, Constants.TOPMOST_FLAGS); - UnsafeNativeMethods.SetWindowPos(this.handle, Constants.HWND_TOP, left, top, width, height, Constants.TOPMOST_FLAGS); - UnsafeNativeMethods.SetWindowPos(this.handle, Constants.HWND_NOTOPMOST, left, top, width, height, Constants.TOPMOST_FLAGS); + // #2780 Don't blindly set the Z-Order to HWWND_NOTOPMOST. If this window has an owner, set + // the Z-Order to be after the owner. This keeps external dialogs appearing correctly above + // their owner window even when owner window is maximized and ignoring taskbar. + IntPtr hwndInsAfter = Constants.HWND_NOTOPMOST; + if (this.AssociatedObject.Owner != null) + { + hwndInsAfter = new WindowInteropHelper(this.AssociatedObject.Owner).Handle; + } + UnsafeNativeMethods.SetWindowPos(this.handle, hwndInsAfter, left, top, width, height, 0x0040); } } diff --git a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Options.cs b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Options.cs index 78e36d9588..5ef02830f9 100644 --- a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Options.cs +++ b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Options.cs @@ -19,11 +19,26 @@ public partial class HamburgerMenu /// </summary> public static readonly DependencyProperty OptionsItemTemplateProperty = DependencyProperty.Register(nameof(OptionsItemTemplate), typeof(DataTemplate), typeof(HamburgerMenu), new PropertyMetadata(null)); + /// <summary> + /// Identifies the <see cref="OptionsItemTemplateSelector"/> dependency property. + /// </summary> + public static readonly DependencyProperty OptionsItemTemplateSelectorProperty = DependencyProperty.Register(nameof(OptionsItemTemplateSelector), typeof(DataTemplateSelector), typeof(HamburgerMenu), new PropertyMetadata(null)); + /// <summary> /// Identifies the <see cref="OptionsVisibility"/> dependency property. /// </summary> public static readonly DependencyProperty OptionsVisibilityProperty = DependencyProperty.Register(nameof(OptionsVisibility), typeof(Visibility), typeof(HamburgerMenu), new PropertyMetadata(Visibility.Visible)); + /// <summary> + /// Identifies the <see cref="SelectedOptionsItem"/> dependency property. + /// </summary> + public static readonly DependencyProperty SelectedOptionsItemProperty = DependencyProperty.Register(nameof(SelectedOptionsItem), typeof(object), typeof(HamburgerMenu), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); + + /// <summary> + /// Identifies the <see cref="SelectedOptionsIndex"/> dependency property. + /// </summary> + public static readonly DependencyProperty SelectedOptionsIndexProperty = DependencyProperty.Register(nameof(SelectedOptionsIndex), typeof(int), typeof(HamburgerMenu), new FrameworkPropertyMetadata(-1, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal)); + /// <summary> /// Gets or sets an object source used to generate the content of the options. /// </summary> @@ -42,6 +57,15 @@ public DataTemplate OptionsItemTemplate set { SetValue(OptionsItemTemplateProperty, value); } } + /// <summary> + /// Gets or sets the DataTemplateSelector used to display each item in the options. + /// </summary> + public DataTemplateSelector OptionsItemTemplateSelector + { + get { return (DataTemplateSelector)GetValue(OptionsItemTemplateSelectorProperty); } + set { SetValue(OptionsItemTemplateSelectorProperty, value); } + } + /// <summary> /// Gets the collection used to generate the content of the option list. /// </summary> @@ -75,8 +99,8 @@ public Visibility OptionsVisibility /// </summary> public object SelectedOptionsItem { - get { return _optionsListView.SelectedItem; } - set { _optionsListView.SelectedItem = value; } + get { return GetValue(SelectedOptionsItemProperty); } + set { SetValue(SelectedOptionsItemProperty, value); } } /// <summary> @@ -84,8 +108,8 @@ public object SelectedOptionsItem /// </summary> public int SelectedOptionsIndex { - get { return _optionsListView.SelectedIndex; } - set { _optionsListView.SelectedIndex = value; } + get { return (int)GetValue(SelectedOptionsIndexProperty); } + set { SetValue(SelectedOptionsIndexProperty, value); } } } } diff --git a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Properties.cs b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Properties.cs index fea0928867..590e042878 100644 --- a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Properties.cs +++ b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.Properties.cs @@ -50,7 +50,25 @@ public partial class HamburgerMenu /// </summary> public static readonly DependencyProperty ItemTemplateProperty = DependencyProperty.Register(nameof(ItemTemplate), typeof(DataTemplate), typeof(HamburgerMenu), new PropertyMetadata(null)); - public static readonly DependencyProperty ContentTransitionProperty = DependencyProperty.Register("ContentTransition", typeof(TransitionType), typeof(HamburgerMenu), new FrameworkPropertyMetadata(TransitionType.Normal)); + /// <summary> + /// Identifies the <see cref="ItemTemplateSelector"/> dependency property. + /// </summary> + public static readonly DependencyProperty ItemTemplateSelectorProperty = DependencyProperty.Register(nameof(ItemTemplateSelector), typeof(DataTemplateSelector), typeof(HamburgerMenu), new PropertyMetadata(null)); + + /// <summary> + /// Identifies the <see cref="SelectedItem"/> dependency property. + /// </summary> + public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register(nameof(SelectedItem), typeof(object), typeof(HamburgerMenu), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); + + /// <summary> + /// Identifies the <see cref="SelectedIndex"/> dependency property. + /// </summary> + public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register(nameof(SelectedIndex), typeof(int), typeof(HamburgerMenu), new FrameworkPropertyMetadata(-1, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal)); + + /// <summary> + /// Identifies the <see cref="ContentTransition"/> dependency property. + /// </summary> + public static readonly DependencyProperty ContentTransitionProperty = DependencyProperty.Register(nameof(ContentTransition), typeof(TransitionType), typeof(HamburgerMenu), new FrameworkPropertyMetadata(TransitionType.Normal)); /// <summary> /// Gets or sets the width of the pane when it's fully expanded. @@ -124,6 +142,15 @@ public DataTemplate ItemTemplate set { SetValue(ItemTemplateProperty, value); } } + /// <summary> + /// Gets or sets the DataTemplateSelector used to display each item. + /// </summary> + public DataTemplateSelector ItemTemplateSelector + { + get { return (DataTemplateSelector)GetValue(ItemTemplateSelectorProperty); } + set { SetValue(ItemTemplateSelectorProperty, value); } + } + /// <summary> /// Gets the collection used to generate the content of the items list. /// </summary> @@ -148,8 +175,8 @@ public ItemCollection Items /// </summary> public object SelectedItem { - get { return _buttonsListView.SelectedItem; } - set { _buttonsListView.SelectedItem = value; } + get { return GetValue(SelectedItemProperty); } + set { SetValue(SelectedItemProperty, value); } } /// <summary> @@ -157,8 +184,8 @@ public object SelectedItem /// </summary> public int SelectedIndex { - get { return _buttonsListView.SelectedIndex; } - set { _buttonsListView.SelectedIndex = value; } + get { return (int)GetValue(SelectedIndexProperty); } + set { SetValue(SelectedIndexProperty, value); } } public TransitionType ContentTransition diff --git a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.cs b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.cs index eba2616e15..261eea12b6 100644 --- a/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.cs +++ b/src/MahApps.Metro/MahApps.Metro.Shared/Controls/HamburgerMenu/HamburgerMenu.cs @@ -62,7 +62,15 @@ public override void OnApplyTemplate() _optionsListView.MouseUp += OptionsListView_ItemClick; } + this.Loaded -= HamburgerMenu_Loaded; + this.Loaded += HamburgerMenu_Loaded; + base.OnApplyTemplate(); } + + private void HamburgerMenu_Loaded(object sender, RoutedEventArgs e) + { + this.Content = _buttonsListView?.SelectedItem ?? _optionsListView?.SelectedItem; + } } } diff --git a/src/MahApps.Metro/MahApps.Metro.Shared/Converters/StringToVisibilityConverter.cs b/src/MahApps.Metro/MahApps.Metro.Shared/Converters/StringToVisibilityConverter.cs index 3dad72b9ff..0bf7f40dcf 100644 --- a/src/MahApps.Metro/MahApps.Metro.Shared/Converters/StringToVisibilityConverter.cs +++ b/src/MahApps.Metro/MahApps.Metro.Shared/Converters/StringToVisibilityConverter.cs @@ -56,13 +56,13 @@ public override object ProvideValue(IServiceProvider serviceProvider) public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - if (value is string && targetType == typeof (Visibility)) + if ((value == null || value is string) && targetType == typeof (Visibility)) { if (OppositeStringValue) { - return (((string) value).ToLower().Equals(String.Empty)) ? Visibility.Visible : FalseEquivalent; + return string.IsNullOrEmpty((string)value) ? Visibility.Visible : FalseEquivalent; } - return (((string) value).ToLower().Equals(String.Empty)) ? FalseEquivalent : Visibility.Visible; + return string.IsNullOrEmpty((string)value) ? FalseEquivalent : Visibility.Visible; } return value; } diff --git a/src/MahApps.Metro/MahApps.Metro/Properties/AssemblyInfo.cs b/src/MahApps.Metro/MahApps.Metro/Properties/AssemblyInfo.cs index a03bc8c3b6..37ddd692b0 100644 --- a/src/MahApps.Metro/MahApps.Metro/Properties/AssemblyInfo.cs +++ b/src/MahApps.Metro/MahApps.Metro/Properties/AssemblyInfo.cs @@ -15,7 +15,7 @@ [assembly: AssemblyDescription("A toolkit for creating Metro / Modern UI styled WPF apps.")] [assembly: AssemblyCompany("MahApps")] -[assembly: AssemblyVersion("1.4.0.42")] -[assembly: AssemblyFileVersion("1.4.0.42")] -[assembly: AssemblyInformationalVersion("1.4.0.42")] -[assembly: AssemblyProduct("MahApps.Metro 1.4.0")] +[assembly: AssemblyVersion("1.4.1.0")] +[assembly: AssemblyFileVersion("1.4.1.0")] +[assembly: AssemblyInformationalVersion("1.4.1.0")] +[assembly: AssemblyProduct("MahApps.Metro 1.4.1")] diff --git a/src/MahApps.Metro/MahApps.Metro/Styles/Controls.DataGrid.xaml b/src/MahApps.Metro/MahApps.Metro/Styles/Controls.DataGrid.xaml index 00c771bc12..59eea8ce1b 100644 --- a/src/MahApps.Metro/MahApps.Metro/Styles/Controls.DataGrid.xaml +++ b/src/MahApps.Metro/MahApps.Metro/Styles/Controls.DataGrid.xaml @@ -17,6 +17,7 @@ <Style.Triggers> <DataTrigger Binding="{Binding Path=IsReadOnly, RelativeSource={RelativeSource AncestorType=DataGridCell}}" Value="True"> <Setter Property="IsHitTestVisible" Value="False" /> + <Setter Property="Focusable" Value="False" /> </DataTrigger> </Style.Triggers> </Style> diff --git a/src/MahApps.Metro/MahApps.Metro/Styles/VS/TextBox.xaml b/src/MahApps.Metro/MahApps.Metro/Styles/VS/TextBox.xaml index 1d0ffdd07d..d7afce47e7 100644 --- a/src/MahApps.Metro/MahApps.Metro/Styles/VS/TextBox.xaml +++ b/src/MahApps.Metro/MahApps.Metro/Styles/VS/TextBox.xaml @@ -5,15 +5,18 @@ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" /> </ResourceDictionary.MergedDictionaries> - <Style x:Key="StandardTextBox" TargetType="TextBox"> + <Style x:Key="StandardTextBox" TargetType="{x:Type TextBox}"> <Setter Property="Background" Value="{StaticResource TextBoxBackground}" /> <Setter Property="CaretBrush" Value="{StaticResource Foreground}" /> <Setter Property="Foreground" Value="{StaticResource Foreground}" /> + <Setter Property="Padding" Value="1" /> + <Setter Property="SnapsToDevicePixels" Value="True" /> + <Setter Property="Validation.ErrorTemplate" Value="{DynamicResource ValidationErrorTemplate}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> - <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true"> - <ScrollViewer x:Name="PART_ContentHost" Margin="1" /> + <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> + <ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> @@ -28,21 +31,20 @@ </Setter> </Style> - <Style x:Key="SearchTextBox" TargetType="TextBox"> - <Setter Property="Background" Value="{StaticResource TextBoxBackground}" /> - <Setter Property="CaretBrush" Value="{StaticResource Foreground}" /> - <Setter Property="Foreground" Value="{StaticResource Foreground}" /> + <Style x:Key="SearchTextBox" + TargetType="{x:Type TextBox}" + BasedOn="{StaticResource StandardTextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> - <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true"> + <Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> <TextBlock Name="search" Margin="5 0 0 0" VerticalAlignment="Center" Foreground="{StaticResource SearchTextForeground}" Text="Search ..." Visibility="Hidden" /> - <ScrollViewer x:Name="PART_ContentHost" Margin="1" /> + <ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="TextBox.Text" Value=""> diff --git a/src/MahApps.Metro/MahApps.Metro/Themes/HamburgerMenu.xaml b/src/MahApps.Metro/MahApps.Metro/Themes/HamburgerMenu.xaml index 2ddc308cd6..13a113fd3d 100644 --- a/src/MahApps.Metro/MahApps.Metro/Themes/HamburgerMenu.xaml +++ b/src/MahApps.Metro/MahApps.Metro/Themes/HamburgerMenu.xaml @@ -103,11 +103,15 @@ Grid.Row="1" Width="{TemplateBinding OpenPaneLength}" AutomationProperties.Name="Menu items" + ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" ItemTemplate="{TemplateBinding ItemTemplate}" ItemsSource="{TemplateBinding ItemsSource}" + SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedIndex, Mode=TwoWay}" + SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem, Mode=TwoWay}" SelectionMode="Single" Style="{StaticResource HamburgerListBoxStyle}" - TabIndex="1" /> + TabIndex="1"> + </ListBox> <Grid Grid.Row="2" Visibility="{TemplateBinding OptionsVisibility}"> <Grid.RowDefinitions> @@ -120,8 +124,11 @@ Width="{TemplateBinding OpenPaneLength}" VerticalAlignment="Bottom" AutomationProperties.Name="Option items" + ItemTemplateSelector="{TemplateBinding OptionsItemTemplateSelector}" ItemTemplate="{TemplateBinding OptionsItemTemplate}" ItemsSource="{TemplateBinding OptionsItemsSource}" + SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedOptionsIndex, Mode=TwoWay}" + SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedOptionsItem, Mode=TwoWay}" Style="{StaticResource HamburgerListBoxStyle}" TabIndex="2" /> </Grid> diff --git a/src/MahApps.Metro/MahApps.Metro/Themes/NumericUpDown.xaml b/src/MahApps.Metro/MahApps.Metro/Themes/NumericUpDown.xaml index dcb1e1897c..1f734141b2 100644 --- a/src/MahApps.Metro/MahApps.Metro/Themes/NumericUpDown.xaml +++ b/src/MahApps.Metro/MahApps.Metro/Themes/NumericUpDown.xaml @@ -45,22 +45,7 @@ <ColumnDefinition x:Name="PART_NumericUpColumn" Width="Auto" /> <ColumnDefinition x:Name="PART_NumericDownColumn" Width="Auto" /> </Grid.ColumnDefinitions> - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="*" /> - </Grid.RowDefinitions> - <ContentControl x:Name="PART_FloatingMessageContainer" - Grid.Column="0" - Style="{DynamicResource FloatingMessageContainerStyle}"> - <TextBlock x:Name="PART_FloatingMessage" - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - Style="{DynamicResource MetroAutoCollapsingTextBlock}" - Foreground="{TemplateBinding Foreground}" - Text="{TemplateBinding Controls:TextBoxHelper.Watermark}" /> - </ContentControl> <TextBox x:Name="PART_TextBox" - Grid.Row="1" Grid.Column="0" Margin="0 0 -2 0" MinWidth="20" @@ -83,6 +68,8 @@ Controls:TextBoxHelper.ClearTextButton="{TemplateBinding Controls:TextBoxHelper.ClearTextButton}" Controls:TextBoxHelper.SelectAllOnFocus="{TemplateBinding Controls:TextBoxHelper.SelectAllOnFocus}" Controls:TextBoxHelper.Watermark="{TemplateBinding Controls:TextBoxHelper.Watermark}" + Controls:TextBoxHelper.UseFloatingWatermark="{TemplateBinding Controls:TextBoxHelper.UseFloatingWatermark}" + Controls:TextBoxHelper.HasText="{TemplateBinding Controls:TextBoxHelper.HasText}" FocusVisualStyle="{x:Null}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsReadOnly="{TemplateBinding IsReadOnly}" @@ -92,7 +79,6 @@ TabIndex="{TemplateBinding TabIndex}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" /> <RepeatButton x:Name="PART_NumericUp" - Grid.RowSpan="2" Grid.Column="1" Width="{TemplateBinding UpDownButtonsWidth}" Margin="0 2 0 2" @@ -108,7 +94,6 @@ Stretch="Fill" /> </RepeatButton> <RepeatButton x:Name="PART_NumericDown" - Grid.RowSpan="2" Grid.Column="2" Width="{TemplateBinding UpDownButtonsWidth}" Margin="0 2 2 2" @@ -135,19 +120,6 @@ Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ControlsHelper.DisabledVisualElementVisibility), Mode=OneWay}" /> </Grid> <ControlTemplate.Triggers> - <MultiDataTrigger> - <MultiDataTrigger.Conditions> - <Condition Binding="{Binding Path=(Controls:TextBoxHelper.UseFloatingWatermark), RelativeSource={RelativeSource Self}}" Value="True" /> - <Condition Binding="{Binding Path=(Controls:TextBoxHelper.HasText), RelativeSource={RelativeSource Self}}" Value="True" /> - </MultiDataTrigger.Conditions> - <MultiDataTrigger.EnterActions> - <BeginStoryboard Storyboard="{StaticResource ShowFloatingMessageStoryboard}" /> - </MultiDataTrigger.EnterActions> - <MultiDataTrigger.ExitActions> - <BeginStoryboard Storyboard="{StaticResource HideFloatingMessageStoryboard}" /> - </MultiDataTrigger.ExitActions> - </MultiDataTrigger> - <Trigger Property="ButtonsAlignment" Value="Left"> <Setter TargetName="PART_NumericDown" Property="Grid.Column" Value="1" /> <Setter TargetName="PART_NumericDown" Property="Margin" Value="0 2 0 2" /> @@ -190,8 +162,6 @@ </Trigger> <Trigger SourceName="PART_TextBox" Property="IsFocused" Value="true"> <Setter TargetName="Base" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ControlsHelper.FocusBorderBrush)}" /> - <Setter TargetName="PART_FloatingMessage" Property="Foreground" Value="{DynamicResource AccentColorBrush}" /> - <Setter TargetName="PART_FloatingMessage" Property="Opacity" Value="1" /> </Trigger> <Trigger Property="HideUpDownButtons" Value="True">