Why i get this error:
'{DependencyProperty.UnsetValue}' is not a valid value for the 'System.Windows.Controls.Panel.Background' property on a Setter.
I'm sure that all controls styles, set well, But Visual Studio Designer display this error! :'( I'm sure that code is OK, and i don't want fill your browser screen with a lots of codes...
I saw this error many times, and i don't know how debug it! Please help me, If u khow some debug tips!
EDITED:
in Player.xaml(UserControl):
<Button Height="40" Name="btnNext" Style="{StaticResource ResourceKey=NextButton}" Click="btnNext_Click" />
After i Rebuild the project, i saw error on the line above #:-s
in Constants.xaml:
<ImageBrush x:Key="nextImage" ImageSource="../Images/next.png" />
in Generic.xaml:
<Style TargetType="{x:Type Button}" x:Key="NextButton">
<Setter Property="Background" Value="{StaticResource ResourceKey=nextImage}" />
<Setter Property="Template" Value="{StaticResource ResourceKey=PlayerButtonTemplate}" />
</Style>
Thanks in advance...:)
Heh!
Finally I solve that! I just change every StaticResource
to DynamicResource
, and every thing is fine now!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With