Menu/Toolbar color in WPF app - wpf

So I have a simple WPF app with a menu and a toolbar/toolbartray inside a Grid. By default, the colors don't match (the menu is grey and the toolbar is blue - see image)
I have tried specifically setting the background color but there are then other issues (toolbar overflow button colors and sub menu colors.)
Strikes me that by default, the colors should match and also match the system theme. Is there a magic setting? Surely I can't need to specifically style everything?
Thanks

Get default ControlTemplates of that controls.
Menu
ToolBar
Add new ResourceDictionary to your project and insert that templates
Change background properties in root Borders of templates.

Related

Bootstrap css style of vertical tab control for WPF?

I'm looking for a bootstrap CSS style of a vertical tab control, like at this page:
https://dbtek.github.io/bootstrap-vertical-tabs/demo.html
If I'm going to do it myself, what WPF control should I begin with as the base class? (I don't think the WPF tabcontrol should be a starting point because the styles are so different)
Thanks
You can re-style the TabControl and the TabItems to look like you want. It may require some effort though.
You can right-click on a TabControl in design mode in Visual Studio or in Blend and choose Edit Template->Edit a Copy to copy the default style into your XAML markup and then edit it as per your requirements. Edit Additional Templates->Edit Generated Item Container (ItemContainerStyle) will do the same thing for the TabItem container.
Also note that you can set the TabStripPlacement property of the TabControl to Left to change the position of the tabs.

Global winforms styling

Are there global styles in Winforms as there are in WPF?
I'd like to be able to, for example, set ForeColor to be used by all the labels that exist within the app. Is there any solution, or do I have to do the changes manually for all the controls separately?
Most controls will inherit the font from their parent - so try setting the font styles you want on the window.

how to change icon expander in wpf

Is there a way I can change the icon of the expander to +/- with the color white as the foreground color? I've been looking everywhere but cant find a simple solution. Or better yet, how do I change the color of the expander icon to white? My background is a dark color, so this is why I'm asking.
You will need to create a custom control template, see this CodeProject article: http://www.codeproject.com/Articles/248112/Templating-WPF-Expander-Control
You need to change the Template, you can base it on the existing template though.

How do I change all the Silverlight Telerik RadButton colors at run time?

This question is in regard to the Telerik RadButtons for Silverlight. I have themes per customer on the site where Silverlight is used. I am able to change the background and foreground colors by setting the Background and Foreground brush properties. However, the styles revert to the standard colors while hovering over the button. How do I change the colors for all button states?
I attempted to set the Resources dictionary as shown on Telerik Styles, but it appears to be read-only.
More information on how to style a RadButton you can find here: http://www.telerik.com/help/silverlight/radbuttons-styles-and-templates-overview.html

Set Image colours while theme change

In WP7 suppose we are having a TextBlock with Foreground as DEFAULT and we change the theme of phone than foreground will be adjusted automatically so that its(TextBlock's) text can be seen properly with any theme . Is there any way to do same to some if we are having image kind of control so that the control can be seen with any available THEME of WP7 in proper OR presentable manner
Yes, you can adjust the image to the dark/light theme, using the PhoneDarkThemeVisibility and PhoneLightThemeVisibility resources. I would suggest using a ValueConverter.
You can read more on MSDN

Resources