I'm pretty sure this is an easy question, I just can't figure out how to set the look and feel of my controls, so I am getting the default, and I want my controls to match on different platforms. I tried setting borderthickness for 30 minutes only to realize that it works on some look-and-feel, but not others (see attachments).
specifying look and feel of controls - c#
Collapse
X
-
Do you have the EnableVisualSty lesthing turned on (and if so, maybe you want it off?)
I would imagine something to do with these two settings could have an effect?
Application.Ena bleVisualStyles ();
Application.Set CompatibleTextR enderingDefault (false); -
Originally posted by jhardmanI couldn't find enablevisualthe mes - not sure where to look. I worked around by specifying the look of the buttons, but then I lose all the mouseover and click looks unless I do a lot of extra work.
Jared
Just for your information, EnableVisualSty les is part of the Application Class.
You need to set it before the application is loaded....so you want to do it as one of the first lines executed in your application
Eg
[code=cpp]
[STAThread]
static void Main()
{
Application.Ena bleVisualStyles ();
/*............*/
}[/code]Comment
-
Jhardman, did you ever solve your problems?
I have been using XAML and since I don't have Blend, I have been doing my styles by hand. If you still need help figuring out skinning/styling I might be of assistance now that I have a little more experience with it.
I am trying to figure out a few things of my own regarding styles (how do you change the colour etc without losing depth of controls...ever ything is "flat" now. And I'm wondering how to set the height and width of elements to a percentage of the window size!)
-FrinnyComment
-
It happens. The a usual WPF button will look different in different platforms of Windows.
Like it will look 3D in themed XP.. and it will look Aero in Windows 7.
So the best option available is to always define a custom template for the control you're using.
You need to use <Control.Templa te>, In this you need to define the way the button needs to be painted.Comment
Comment