Closed Yoooi0 closed 2 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
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'.
Closed due to PR fix.
In 4.1.0 the range slider style does not match the #2244 pr: Visual Studio also shows a bunch of style binding errors.
4.0.0: