Universal Windows Platform – Tutorial Insider – Custom ComboBox

Standard

comentsys.wordpress.com today features a Universal Windows Platform tutorial showing how to create a Custom ComboBox with a customised look-and-feel for the ComboBox control.

Details

Within the App.xaml is defined an Application.Resources with a Style of “CustomComboBox” and a TargetType of ComboBox – this example takes a copy of the style for the standard ComboBox and customises many of the properties including Foreground set to “Gold”, during the VisualState of PointerOver a BorderBrush has been set to “GoldenRod”.

The Border has the default BorderBrush set to “Salmon” and the Background to “LightSalmon” with a CornerRadius set to “15” and the HighlightBackground has the BorderBrush set to “Gold” and the CornerRadius set to “15”, the ContentPresenter also has the CornerRadius set to “15”. The Popup has it’s BorderBrush set to “Salmon” and the Background to “LightSalmon” – some other elements including the Header have been removed to simplify the ComboBox.

Behind the Scenes

This is a straightforward example of customising the Style of a Control, Expression Blend was used to create a copy of the Style for a ComboBox which was then customised with a look-and-feel that’s been used in previous tutorials just to demonstrate how different a standard input control can be modified to look completelt different from the standard, this could be to confirm to a corporate colour scheme or part of a fully customised design, this is just the start of how far you can take customising controls for an application.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s