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. Image for the cookie policy date
close icon

How to set a visual style on the entirely application?

Is there a way to set a visual style to an application without needing to apply on each one Window?

9 Replies

KL Karthikeyan L Syncfusion Team July 30, 2012 07:22 AM UTC

Hi Wiley,

We have prepared a sample based on your requirement, and we have attached the sample for your reference. Please download the sample from the following link.

[Sample link]: VisualStyleSample.zip

Regards,

Karthikeyan



WB Wiley Barbosa Marques July 30, 2012 01:30 PM UTC

Thank you, but it's not working on a ChromelessWindow, here is the ResourceDictionary I'm using:

<Application.Resources>
        <ResourceDictionary>
            <Style TargetType="syncfusion:ChromelessWindow" x:Key="Skin">
                <Setter Property="syncfusion:SkinStorage.VisualStyle" Value="Office2010Silver"/>
                <Setter Property="Icon" Value="{StaticResource DentalIcone}" />
            </Style>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Syncfusion.Shared.WPF;component/SkinManager/Office2010SilverStyle.xaml" />
                <ResourceDictionary Source="/IS-OrtoGestao;component/Resources/Estilos.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>


MM Muthalagu M Syncfusion Team August 23, 2012 03:59 AM UTC

Hi Wiley,

Thanks for your update.

Sorry for the delay in getting back to you.

We have prepared a sample to apply the custom style to all windows in the application and we have attached the sample please find this.

In this sample, we have applied the custom style to all windows with BasedOn propertis.

Code Snippet:

<ResourceDictionary Source='/Syncfusion.Shared.WPF;component/Controls/ChromelessWindow/Themes/Office2010SilverStyle.xaml' />

<Style TargetType='sync:ChromelessWindow' x:Key='CommonVisualStyle' BasedOn='{StaticResource Office2010SilverChromelessWindowStyle}' />

Because of this, this style not applied to Ribbon Controls.Therefore we have applied BasedOn to override the style for Ribbon controls to overcome this.

Code Snippet:

<ResourceDictionary Source='/Syncfusion.Tools.WPF;component/Framework/Ribbon/Themes/Office2010SilverStyle.xaml' />

<Style TargetType='sync:Ribbon' x:Key='RibbonStyle' BasedOn='{StaticResource Office2010SilverRibbonStyle}'/>

Please let us know if you have any queries.

Regards,

Muthalagu



VisualStyleSample_561856f3.zip


YO Yogesh February 25, 2015 12:24 PM UTC

I am not able to download your sample file.
Is there is way to  apply custom style to ribbon control (WPF). Can I extend ribbon control style?


SM Sugapriya Mariappan Syncfusion Team February 26, 2015 10:32 AM UTC

Hi Wiley,

We have prepared a sample to apply CustomStyle to the Ribbon control. In this sample we have set the Background for the RibbonButton by overriding Office2013 style.

Code snippets which we used in the sample

<Style x:Key="RibbonButtonStyle" TargetType="{x:Type syncfusion:RibbonButton}" BasedOn="{StaticResource Office2013RibbonButtonStyle}">

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

</Style>

<ResourceDictionary>

        <ResourceDictionary.MergedDictionaries>

          <ResourceDictionary Source="/Syncfusion.Tools.WPF;component/Framework/Ribbon/Themes/Office2013Style.xaml">

         </ResourceDictionary>

        </ResourceDictionary.MergedDictionaries>

</ResourceDictionary>

Please download the sample from following link.

Sample link: RibbonVisualStyleSample.zip

Please let us know if you need any further assistance on this.

Regards,
M.Sugapriya




YO Yogesh March 2, 2015 12:15 PM UTC

HI Sugapriya Mariappan,

I want to change the Label to be at bottom of icon in RibbonButton. What style I need to change for this?


SM Sugapriya Mariappan Syncfusion Team March 3, 2015 12:41 PM UTC

Hi Yogesh,

In RibbonButton we have three type of ‘SizeForm’ namely ‘ExtraSmall, Small, and Large’. To display the RibbonButton ‘Label’ at the bottom of icon, you need to set ‘SizeForm=”Large”’. We have prepare a sample with these ‘SizeForm’.

Please download the sample from following link.
Sample link: RibbonVisualStyleSample.zip

Regards,
Sugapriya.M






YO Yogesh March 4, 2015 07:07 AM UTC

Hi Sugapriya Mariappan,

Thanks !
Its was a good solution you provided but I have some more issue relating to Ribbon

1) Default selection color change on mouse over of Ribbon Button (Like on Ribbon Button mouse over I want to change default selection color to Red or whatever).
2) Inside DropDown Button, there are multiple Ribbon Button added to Stack Panel when clikc on Ribbon Button drop down does not close.How do we close drop down automatically or forcefully.

Thanks & Regards,
Yogesh Dahiya


MS Mariappan S Syncfusion Team March 5, 2015 10:42 AM UTC

Hi Yogesh,

Query #1:Default selection color change on mouse over of Ribbon Button (Like on Ribbon Button mouse over I want to change default selection color to Red or whatever)

We have prepared a sample which tries to meet your requirement. In this sample we have used RibbonButton Template. We have changed the “IsMouseOver” value to “Red” in this template. Please download the sample from the following location :

Sample link: RibbonSample.zip

Query #2: “Inside DropDown Button, there are multiple Ribbon Button added to Stack Panel when clikc on Ribbon Button drop down does not close.How do we close drop down automatically or forcefully

We are able to reproduce the problem in “Office2013” theme and have logged defect report regarding this. The fix will be included in upcoming Volume 1,2015 release which is scheduled to be rolled by the end of March 2015.

Please let me know if you need further assistance.

Regards,
Mariappan S.



Loader.
Live Chat Icon For mobile
Up arrow icon