Dark Background of new WPF Ribbon becomes gradient? - wpf

I am using the new Version of MS WPF Ribbon (Version MS WPF Ribbon 3.5.40729.1) with Windows 7 and I am trying to change the Background of the Ribbon. Everything looks fine if I use light background colors.
But e.g. if I choose "Black" a white gradient is shown with the black. It does not seem to be possible to remove the white and simply have a black background. And it looks ugly, especially when every Textcolor normally is white. (Tabheaders get white background and are not readable anymore)
In the samples, (I leave everything as is) if I set Background=Black directly in the ribbon's property, the effect is the same.
What do I have to set or do to get rid of the white gradient color?

There's a hard-coded gloss effect in the RibbonGroup template. It's lame, but the only way to get rid of it is to override the temlate for RibbonGroup. If you have Blend, just extract the template and rip out the offending LinearGradientBrush.

Related

materialDesign:BundledTheme Foreground remains black in dark theme

I am using the materialDesign:BundledTheme.
<materialDesign:BundledTheme
BaseTheme="Dark"
PrimaryColor="LightBlue"
SecondaryColor="Lime" />
The text in the ListViews turns from black to white when the theme switches from 'Light' to 'Dark'. The borders of my TextBoxes turns from black to white as well. The text inside of my TextBox remains black though. It is difficult to see the text due to this.
I have attempted to track down the Setter of the Foreground via the Live Visual Tree.
It says it comes from a BindingExpression. I looked online to see if I could find the source in a more definitive way. I came upon the 'DependencyPropertyHelper.GetValueSource' method. It says that the Foreground property is Inherited. I cannot figure out why this text remains black when it should turn white like the border does.

Why is the Designer in Codename one not reporting the attributes I set?

I started a Codename One project with the "Hello World bare bones". I used to define the styles in the Theme tab from the Designer but now it is becoming tedious.
Actually for some selectors, even if I override (unchecking the Derive box) some properties the style is not changed in the Designer (see below) or in the app itself.
However, in the list of selectors, the color is not the one I selected but the alignment seems to be it.
It seems that the theme is locked somewhere. Do I make a mistake, or should I set a constant to "unlock" the theme, or even should I clear some directories?
Please note that I am using NetBeans with designer V 1.1
.
Edit March 1st 2017
Following #Diamond's great tips, I was able to change the foreground color by setting the Border to empty (instead of NULL). However now the alignment is still not what I expect (see below). How can I do for this property ?
Any help appreciated,
In the Designer, Border is superior to background color and background image. Which means if the border image is set, a background color will have no effect unless the border is just a stroke or line.
Always solve this with these few steps:
Go to the Border tab and uncheck the override.
Click the ... button next to Border Help and a new Dialog will show.
Change the Type (First line) to Empty and click Ok.
Your background color will now have an effect.

Change border brush from skyblue in wizard control of extended wpf toolkit

I'm using Wizard control of Extended wpf toolkit package.
I would like to change color of the border. See sky blue in image below:
I tried set broder brush\background to wizard\wizard page\window controls, but it failed.
Anybody know how to change it?
Your assistance is appreciated!
Now that you have provided more info, I can see that your question title does not match what you asking to change. You are not asking to change the color of the border of the Wizard Control, you are asking to change the color of the WPF Window.
It takes some time to get things right, and I highly discourage doing this if you app will be used by people with disabilities, who need high contrast, who customized their desktop to a certain color because of color blindness, and the list goes on...Microsoft has worked very hard to address such issues with the defaults.
BUT...you can change this by restyling your Window Style. You can find plenty of code examples.
Here are two:
Can i set the window border color in WPF?
How can I style the border and title bar of a window in WPF?

Need overlapping button in round cornered Winform

Need a quick suggestion for styling a WinForm. I made it with rounded corners even when re-sized. Now trying to add a close button with a image (ControlBox=false), overlapping or clipped to top right corner. This is what I could end with.
But I wish to make it more like in this example image.
How could I achieve this in WinForm.
Here's the trick : your window doesn't just end with the white part. It extends a little bit further. The close button comes under the 'extra' part. The other sides where the window appears to not be there is actually transparent...or in the case of the image, semi-transparent.
The glow effect is provided by the window. Set the TransparencyKey property of the window to Color.Magenta (its a convention as Magenta is the color least likely to be used in a window). Then set the background image to a white background with a little bit of Magenta in the edges. The Magenta will appear transparent when set as the background image.
Fiddle around with TransparencyKey and you'll understand what I mean
Winforms itself cannot provide this for you without outside manipulation of the windows,
because it still uses win32 windows classes in the background.
If you want transparancy in windows: see articles like:
Cool, Semi-transparent and Shaped Dialogs with Standard Controls
And the method in Win32 to do it:
SetLayeredWindowAttributes

wpf how to create a custom button

In WPF how do I make a button with a white border with a 5 pixel radius, a dark gray background and white text? It would be nice if it still had all the mouse over and ispressed effect too.
You would need to understand how Control Templates work in WPF. This sample on applying Control Templates on button by MSDN should get you started.
There's is also a similar SO QA that should help you.

Resources