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.
Related
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.
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
Hy.
Could you help me create the fallowing control style/template?
What do I need:
A (Vertical and Horizontal) ScollBar Style like that. (Without the two arrow button)
Inner shadow on the top and bottom of the "ScrollViewer area".
That's all I need, I can create the rest parts of the control. (Selected Item's color etc)
Thank you.
The scrollbar control in WPF can be thought of as collection of the two repeatbuttons and the track part. You can change the template of the scrollbar and remove the repeatbutton.
For the shadow part, you need to provide the the Zorder index. Refer to the following link - WPF shadow on stackpanel controls
I know is too late for an answer but Style is very easy to get if you understand basic templating. Here you will find a Scrollbar that emulate the one you want, hope you like it.
I want to change the display behavior of the selected item(s) in a WPF Listview. Specifically, I want to retain the custom textblock foreground colors that I've applied and apply a border around the item.
I am able to alter SystemColors.HighlightBrushKey and ControlBrushKey to change the background color of the selected item, but I don't know how to get it to stop changing the font color or use a border instead. I've tried manipulating the control template and have also searched Google for examples of how to do this, without success.
yeah, looks like you have to go through the pain of using ControlTemplates.
Good news is that via using Expression Blend, you can get current ControlTemplate for ListView and tweak the bit that you need and use that as your default ControlTemplate.
Basically my problem stems from a desire to have the textbox portion be white, and the drop down to be black. When I set the text to white, the drop down appears as I want it, but the text in the textbox itself is hardly readable. Setting the Foreground to black makes the drop down unreadable.
Is there a good way to handle this? I am still learning WPF.
Edit the ControlTemplate, You will see a TextBlock and another PopUp which again has a set of controls. Have a different ForeGround/Background for this TextBox,
Your best bet is to edit a copy of the template of the ComboBox and set the two of them independently.