I've got a common ResourceDictionary that use an Microsoft example for use a black ComboBox Microsoft Exemple
In execution a exception was thrown : Exception: Cannot find resource named 'NormalBorderBrush'. Resource names are case sensitive.
I just want to declare this combobox in my common ResourceDictionary xaml file
<!-- Combo box--> <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton"> <Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="2" ... BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="1" /> ... <!-- Border Brushes --> <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1"> <GradientBrush.GradientStops> <GradientStopCollection> <GradientStop Color="#CCC" Offset="0.0"/> <GradientStop Color="#444" Offset="1.0"/> </GradientStopCollection> </GradientBrush.GradientStops> </LinearGradientBrush> The NormalBorderBrush is declared in this same file ! What Am I doing wrong ?
Thanks in advance. Eric
ResourceDictionary.xamlfile in inApp.Xaml??