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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set a visual style on the entirely application?

Thread ID:

Created:

Updated:

Platform:

Replies:

104399 Jul 16,2012 09:54 PM UTC Mar 5,2015 10:42 AM UTC WPF 9
loading
Tags: Tools
Wiley Barbosa Marques
Asked On July 16, 2012 09:54 PM UTC

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

Karthikeyan L [Syncfusion]
Replied On 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


Wiley Barbosa Marques
Replied On 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>

Muthalagu M [Syncfusion]
Replied On 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

Yogesh
Replied On 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?

Sugapriya Mariappan [Syncfusion]
Replied On 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



Yogesh
Replied On 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?

Sugapriya Mariappan [Syncfusion]
Replied On 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





Yogesh
Replied On 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

Mariappan S [Syncfusion]
Replied On 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.



CONFIRMATION

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.

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

;