I'm once again turning to you since I can't find an answer anywhere else. I have a TabControl, but I want to get rid of the ugly orange bar on top of the selected tabs. I would also like to make the tab text BOLD when selected and NORMAL when not.
Is there any easy way to achieve that goal ? I don't want to use the Appearance Buttons or Flat Buttons.
Thanks for your help !
This appearance is controlled by the Visual Styles theme selected in your operating system. In general, users do not appreciate any program that ignores their theme settings, especially when they paid money for a custom one. But you can get what you want, you'll have to set the DrawMode property to OwnerDrawFixed and implement a handler for the DrawItem event. There's a good example to get you started in the MSDN Library article for this event. Just change the font assignment in that sample code.
Related
I've been trying to create a toggle button with a "simple" bevel effect for my WPF Window. At first I've tried to apply the BevelBitmapEffect but apparently it is not deprecated and there are no visual changes when applied.
I've have tried many other "tweaks" with no success.
The kind of button I'm going for is something like this:
Edit: I was able to create this effect by having two pictures (unpressed and pressed). Still, if anyone knows how to do this without any external resources that would be great.
You have two options for this,
Create a Style for the ToggleButton that gives the desired look, this page has an example of a simple style for a toggle button.
Make a toggle button custom control, which is the same idea but can be a bit simpler if you need to use the same style in multiple places or applications.
Just out of curiosity,
The Win32 Group Box control is actually a Button control with the style BS_GROUPBOX applied. As the control is static, being simply text with a special border, why is it one of the Button styles, when the rest are all for actual buttons or button-like UI elements which receive user input?
Thanks in advance for any insights.
This goes way back to the 1980s. Everybody that worked on it is drinking pina coladas in Hawai today so we'll have to make-do with a guess. The likely one is that, since it was so very important to minimize the foot-print of Windows back then, that the existing plumbing for the BUTTON control was re-usable to implement a group box as well.
I've got Expression Blend 4 installed on my machine. I just need to know what I'm doing.
My application will be running on a laptop equipped with a touch screen, in police cars where the user will probably be driving the car. Needless to say, the interface has to be easy to use. In this case, that means things like the drop down buttons on ComboBox controls and scroll bars need to be wider than normal so they're easy for the driver to use.
Can someone tell me what part I have to change for each of these controls in order to get the effect I want? I tried editing a copy of the template for one of the combobox controls in one of my user controls and playing with the ToggleButton control but that didn't do what I wanted it to do. There's so much mark-up in the template it's hard to tell what's doing what.
Thanks for any help you can give.
Tony
Edit:
I figured it out from the first answer to this previous StackOverflow post. I had to make a copy of the ComboBox's style, then make a copy of the ToggleButton's style.
Thanks anyway.
Tony
The solution was to edit the application in Expression blend. I clicked on one of the ComboBoxes and right clicked. From the context menu, I selected Edit Template | Edit a copy. In the dialog box that appears, I specified that the new template should be applied to all ComboBoxes in the application.
Within the ComboBox's style, there's a ToggleButton. I repeated the above steps with the Togglebutton. Finally, I changed the width to make it what I wanted. There's also a path in there for the arrow that you can play with if you like.
Tony
i am trying to create a wpf app and have different parts in user controls.
in the navigation i have some buttons (now using the ribbon ctp). is it possible to change the main user control when different buttons are pressed in xaml. or is this just a bad way to do things?
sorry, really new to xaml and im trying to get my head arround it.
Further to what Carlo has said,
The way we do it is to have a blank grid in the place you want your controls to all appear and then use BlankGrid.Children.Clear() and BlankGrid.Children.Add() to set up which control is visible in this position.
We found that was the nicest programatically as we have a large number of custom controls, but Carlo's method would work nicely if you wanted to use the designer.
I think this is a pretty regular procedure in WPF. In my experience, me and other programmers put the controls where we want to show them and make their visibility hidden, collapsed or visible depending on what we want to show the user.
I want to create a combobox with some style. I dont want old dropdown what we are getting. I want some new dropdown which looks very nice. Is there any way to create a dropdown like that.
Plz give me suggestions
Check this link out on msdn. This is the actual control template for the combo box. You can copy and paste this into your application (within your app's Resources).
Create a form and slap a combo box on it with some data in it. Then start changing the control template and view the results. Start off simply by changing colors and adding borders around elements to see what controls which part. Then you can start switching out larger parts of the template to match what you're looking for.
one can start with the standard combobox, and then use various controls and styles to change the look and feel of the control, and it's corresponding drop down.