... from purple to orange?
Hello Fan Chen,
As long as you are using an ApplicationMenu2010 in your XamRibbon, the ApplicationAccentColor will have an effect on the RoyalDark theme. For example, if you were to apply a XamRibbon like so:
<igRibbon:XamRibbon Grid.ColumnSpan="2" Theme="RoyalDark" ApplicationAccentColor="LimeGreen" ApplicationMenuMode="Office2010"> <igRibbon:XamRibbon.ApplicationMenu2010> <igRibbon:ApplicationMenu2010 Caption="File"> <igRibbon:ApplicationMenu2010.Items> <igRibbon:ApplicationMenu2010Item Header="Item 1"/> <igRibbon:ApplicationMenu2010Item Header="Item 2"/> <igRibbon:ApplicationMenu2010Item Header="Item 3"/> <igRibbon:ApplicationMenu2010Item Header="Item 4"/> </igRibbon:ApplicationMenu2010.Items> </igRibbon:ApplicationMenu2010> </igRibbon:XamRibbon.ApplicationMenu2010></igRibbon:XamRibbon>
The above would cause the normally purple application menu item to turn LimeGreen. It is true that some of the tools in the XamRibbon do not appear to be at all affected by this ApplicationAccentColor, but this is expected, as the Office2013 theme is based on traditional Microsoft applications such as Excel and Word, where the application accent color does have an effect on the hover and pressed states of the buttons. Our other themes, however, do not base all of their colors off of the ApplicationAccentColor property in the XamRibbon.
With the above in mind, the XamRibbon is based on the ribbon controls used in Microsoft applications such as Excel, Word, etc, and in those applications, you are able to modify the accent color of the app to your liking. For this reason, the ApplicationAccentColor property only exists for the XamRibbon control, and does not exist for any other controls in the Infragistics control library. If you would like to see this type of functionality included for other Infragistics controls, I would recommend suggesting a new product idea for this at http://ideas.infragistics.com. This product ideas site places you in direct communication with our product management team who plans and prioritizes upcoming features and development based on community and user feedback.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Shouldn't it be as simple as this:http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/xamRibbon_DefiningAnApplicationMenu2010.html
just set the
ApplicationAccentColor="Orange"
It works for the Office 2013 theme, why not DarkRoyal?
I think most of the user would want this be standard for all infragistic control, not just XamRibbon right?
Just like how you make it Green in the iGExcel sample app, and Blue in the IGWord sample app. It would only make sense if the similar behavior is apply to the dark theme as well.
Overriding the RoyalDark theme's purple accent color for the XamDataGrid, XamOutlookBar, and XamRibbon could be simple for certain elements, but for others it may be more difficult. These three controls are "WPF specific" in our control suite, and as such, by defining a namespace like the following, there are a few keys that you can base certain styles off of in order to restyle certain parts of that element:
xmlns:igThemes="http://infragistics.com/Themes
Once you do this, I would highly recommend downloading the WPF Spy Tool Snoop, as it will help you to identify which element you should write styles for. You can download this tool, here: https://snoopwpf.codeplex.com/. You can then base these styles off of the RoyalDark themes like so:
//XamRibbon:<Style BasedOn="{x:Static igThemes:RibbonRoyalDark.ELEMENT_NAME_HERE}" />
//XamOutlookBar<Style BasedOn="{x:Static igThemes:OutlookBarRoyalDark.ELEMENT_NAME_HERE}" />
//XamDataGrid<Style BasedOn={x:Static igThemes:DataPresenterRoyalDark.ELEMENT_NAME_HERE" />
It is possible that there are some keys that you may need to override that will not exist for the "ELEMENT_NAME_HERE" parts mentioned above. In this case, I would recommend pulling in the default style for the corresponding element and modifying it. When you install the Infragistics WPF product, you get the default styles for each of the themes as well. These can commonly be found at the following directory for RoyalDark:
C:\Program Files (x86)\Infragistics\2016.2\WPF\DefaultStyles
Inside that directory, there will be an OutlookBar, DataPresenter, and Ribbon folder. Inside of each of those folders, there will be .XAML files that end in RoyalDark.xaml. These are the default styles for the RoyalDark theme for each particular element, and by pulling the styles you need, you can modify the purple accent color of each of the elements in the XamDataGrid, XamRibbon, and XamOutlookBar.
If you need further assistance in modifying a particular part of an Infragistics control in our WPF control suite, please let me know.
XamRibbon, XamOutlookBar, XamDataGrid.
Which Infragistics WPF control, and what aspect of that control were you looking to change the accent color of? I ask this, as it may not be the same for each control that we expose. For some, it may be as simple as setting a single property, and for others you may need to include and modify the default template for the RoyalDark theme and apply it manually. Could you please provide the names and aspects of the control(s) that you are looking to change the RoyalDark theme for?