MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
15.08k stars 3.42k forks source link

RangeSlider does not match latest slider spec update #2350

Closed Yoooi0 closed 2 years ago

Yoooi0 commented 3 years ago

In 4.1.0 the range slider style does not match the #2244 pr: 2021-06-13_22-12-19 Visual Studio also shows a bunch of style binding errors.

4.0.0: 2021-06-13_22-19-20

Keboo commented 3 years ago

Hi @Yoooi0 can you provide the XAML used to generate the above screenshots? I am also not able to replicate the VS style binding errors, are you able to provide those as well?

Thanks

Yoooi0 commented 3 years ago

XAML:

<Slider Style="{StaticResource MaterialDesignSlider}"/>
<metro:RangeSlider Style="{StaticResource MaterialDesignRangeSlider}"/>

I tested with compiled demo app from latest master commit. I had to add a reference to MaterialDesignThemes.MahApps project, edit the App.xaml file as in wiki: https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/wiki/MahApps.Metro-integration, and add a RangeSlider style <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.RangeSlider.xaml" />

Binding errors:

Severity    Count   Data Context    Binding Path    Target  Target Type Description File    Line    Project
Error   1   null    Orientation MetroThumb.NoTarget, Name='PART_RightThumb' Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Primitives.Track', AncestorLevel='1'.            
Error   2   null    (0) Ellipse.Effect, Name='grip' Effect  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Slider', AncestorLevel='1'.          
Warning 1   null    IsFocused   MetroThumb.NoTarget, Name='PART_LeftThumb'  Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Slider', AncestorLevel='1'.          
Warning 2   null    (0) MetroThumb.NoTarget, Name='PART_LeftThumb'  Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Slider', AncestorLevel='1'.          
Error   1   null    Orientation MetroThumb.NoTarget, Name='PART_LeftThumb'  Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Primitives.Track', AncestorLevel='1'.            
Warning 1   null    IsFocused   MetroThumb.NoTarget, Name='PART_RightThumb' Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Slider', AncestorLevel='1'.          
Warning 2   null    (0) MetroThumb.NoTarget, Name='PART_RightThumb' Object  Cannot find source: RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Slider', AncestorLevel='1'.          
MichelMichels commented 2 years ago

Closed due to PR fix.