We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Extend the default styles applied by SkinStorage.VisualStyle

Thread ID:





107349 Feb 25,2013 06:40 PM UTC Aug 29,2013 05:33 AM UTC WPF 3
Tags: Tools
David Goedecke
Asked On February 25, 2013 06:40 PM UTC

I have applied a visual style through the static method SkinStorage.VisualStyle. For example Blend.

I override and inherit from the default style to supply tooltips for data validation errors on the textbox,

If I apply this to the forms resources, the skin storage style is removed - is there a way to do this?

<Window.Resources><Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}"><Style.Triggers><Trigger Property="Validation.HasError" Value="true"><Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self},Path=(Validation.Errors)[0].ErrorContent}"/></Trigger></Style.Triggers></Style>



Karuppasamy P [Syncfusion]
Replied On March 6, 2013 07:11 AM UTC

Hi David,
Sorry for the delay in getting back to you.
We have done a sample based on your requirement. Kindly download the sample from below link.
In the below sample, we have set the ToolTip to the TextBox as per your suggestion and used Blend VisualStyle. And we are unable to reproduce the issue. The VisualStyle is getting applied to the TextBox as desired.
Please refer the sample, and if this is not your scenario, kindly modify the sample so that issue reproduces.
Kindly let us know if you have any other queries.
Karuppasamy P


David Goedecke
Replied On August 26, 2013 03:13 PM UTC

The attached solution zip file is not available. And just to clarify here are all the steps to recreate my problem.
Define a visual style at the applicaiton level - for example using Blend like this
<Style TargetType="myProject:MyWindow"><Setter Property="sync:SkinStorage.VisualStyle" Value="Blend"></Style>
Then I define my style say for a Label Control
<Style TargetType="Label"><Setter Property="HorizontalContentAlignment" Value="Right"/></Style>
The style for labels is lost, until I remove the call VisualStyle.


Karuppasamy P [Syncfusion]
Replied On August 29, 2013 05:33 AM UTC

 Hi David,

Sorry for the being caused.

We have done a simple sample, which can be downloaded from the below location.

In the sample we have added the ResourceDictionary, and added the BasedOn property to override the Syncfusion Themes.



                <ResourceDictionary Source="/Syncfusion.Shared.WPF;component/SkinManager/MetroStyle.xaml"/>



<Style TargetType="Label" BasedOn="{StaticResource MetroLabelStyle}">

                <Setter Property="HorizontalContentAlignment" Value="Right"/>

                <Setter Property="Background" Value="Bisque"/>



Kindly revert back to us if this sample helps you.

Karuppasamy P



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon