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
I am using Telerik RadWaitingBar control with style as DotsLine in C# WinForms application. There is no property in RadWaitingBar to change color of the moving dots. I want to change the color of moving dots to white. How to achieve that?
Have a look at this Telerik Documentation. There are various properties that you can play with. e.g. you can change the background color if your dots are not visible etc.
I have a lot of custom control on which various styles applied in my project. For example, I have grid control inside my custom control and I set its background color using dependency property of the custom control like this:
<!--MainWindow.xaml-->
<CustomNS:MyCustomControl BackColor="#FF00a6ac"><CustomNS:MyCustomControl/>
<!--Generic.xaml-->
<Grid Background={Binding BackColor}>
What I want to do is to make gradient from given color in my dependency property and to apply that gradient on the control. Second color should be generated according to the first color. Namely, second color can be bit darker than the first one.
To illustrate this, check the image below:
How can I provide little darker color from the given hex color in the property?
You should use LinearGradientBrush
Here you'll find a good example
I want to make the SurfaceScrollViewer use Black thumbs instead of white. I have not found anything explaining how to do this, I have managed to change the Color of the Scrollbars itself, but the Thumbs are always white.
How can I change the color of the SurfaceScrollViewer thumbs?
If you mean a wpf usercontrol with "SurfaceScrollViewer" you could right click on your scrollviewer (in the design view) -> edit a template -> edit a copy and change the thumbs in the template.
I want to have a button with 2 background colors, diveded by a part of a elipse. Like this:
Whats the best way two implement this? I can't find it on the web :(
Put the rectangle and the ellipse in your controltemplate for the button (I suggest you start from the SimpleButton style in Expression Blend) just like you have in your drawing.
You can then set ClipToBounds to true on the parent border to make the parts outside the black border hidden.
I am using the WPF expander like a drawer, it expands up out so that the header remains above the content. When it is collapsed the grid cell that it is in is made smaller as well.
I want the expand direction to remain down so that the content fills in below it, however because it moves up it would look better if the icon with the directional arrow were in the opposite direction as if the ExandDirection property were set to Up. How can this be done in either C# code or in the XAML.
Thanks
If I understand correctly that you want to swap arrows for expander collapsed/expanded state, you'll need to create a custom control template for expander.
The easiest way I know to do that is to get expander control template from wpf theme and rename styles:
ExpanderUpHeaderStyle to
ExpanderDownHeaderStyle
ExpanderDownHeaderStyle to
ExpanderUpHeaderStyle
You can download themes sources from here
http://msdn.microsoft.com/en-us/library/aa358533(VS.90).aspx
If you'll have any issues with that, let me know what wpf theme are you using and I'll make you the xaml.
Also have a look how to customize Expander with Blend
http://www.c-sharpcorner.com/uploadfile/dpatra/807/default.aspx