FireMonkey - Styled ComboBox - combobox

I'm trying to get a styled Combobox to look like this:
I right clicked the ComboBox and modified the Custom Style like this:
And I'm getting this:
I tried to add more rectangles to other objects from the Style Editor, but I couldn't succeed to make the styled ComboBox to look as I want.
Any suggestions will be strongly appreciated. Thanks in advance.

The gray line around the control is defined by the background item and the button with the arrow is defined by ButtonStyleObject inside Layout.
Both are images that are looked up into an image, which is different for each platform or style that is loaded (the default image on Windows is called Windows 10 Desktopstyle.png).
When I define my own custom styles, I personally prefer to use vector based definitions, i.e. I would replace the two image controls with tRectangle controls and define the arrow symbol using a TShape (placed inside the rectangle replacing ButtonStyleObject).

Related

WPF - XAML - Help me fix TabControl template

I'm trying to use TabControl template from MSDN.
http://msdn.microsoft.com/en-us/library/ms754137.aspx
Everything works fine until TabStripPlacement comes into the game.
Setting TabStripPlacement to “Left” doesn’t work. I’m getting this result.
While I need this template works with horizontal and vertical tab placement.
I’m not so familiar with styling and templates please help me to resolve this.
EDIT:
I expect this result when TabStripPlacement is set to “Top”
And this when TabStripPlacement is set to “Left”
Just like a normal TabControl
That TabControl template you lniked is an example, not the default.
You need to expand the Grid in the template to be 2x2 instead of 1x2, then create a series of Triggers that set the Grid.Row and Grid.Column of the TabPanel named HeaderPanel, and the Border object containing the content based on the TabStripPlacement
You can look at the actual default TabControl.Template by extracting the template using Expression Blend, or using the tool like Show Me The Template. It contains the triggers you'll want.

How make the angled (pointed) thumb for a slider control

In the standard wpf slider control you specify TicksPlacement and TicksFrequency and you get the tickbar along with the angled / pointed thumb which is pointing in the direction of the tick bar.
I have my own slider style (Control Template that is) and I'd like to make the thumb pointed like that. What's the easiest way to do that?
I took a look at the control template in Blend for the wpf slider and it was NOT obvious how that was done.
Anybody know of an easy way to toss that in to a control template?
Thanks!
I'm assuming you already have the default Styles and ControlTemplates, if not you can download those from here. Click the link for the associated theme, then click Download sample.
With the Aero theme, the pointed thumbs are defined using the Styles with the keys "VerticalSliderLeftThumbStyle" and "HorizontalSliderDownThumbStyle", so you can search for those terms.
The ControlTemplate in these styles uses several Path objects, whose data is defined earlier in the file. So you'd need to copy all referenced resources.

Combo with 2D borders on XAML

I am working with XAML. How can I add a combo box with flat borders (Not 3D)?
You can provide a new template for the ComboBox. There is a package of basic templates called Simple Styles, which you can read about here, that includes the essential display and functionality with none of the fancy effects. The styles are also included with Kaxaml, and the combo-box style provides the simple 2D look you are probably going for.

I want to create a combobox in wpf

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.

WPF tooltip virtualization

Is there any way to virtualize tooltip in WPF? I have many dataitems displayed on map. When i'm changing template, for example, it takes a lot of time to generate UI for tooltips that are invisible. Maybe wpf supports something for such cind of virtualization?
Thanks in advance.
The way in which I've done this before is to generate a tooltip that is very simple, with a container item as the root and a simple single textblock inside, and then hook into the loaded event on the textblock, to detect when the tooltip is trying to be shown.
At that point, I then generate the full tooptip on the fly and replace the contents of the container, removing the textblock placeholder in the process.

Resources