KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Im new to WPF Application. I need to customize my combobox like this image. I have tried this example http://www.eidias.com/Blog/2012/2/20/customizing-wpf-combo-box-style <Window x:Class="win.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Background="Red"> <Window.Resources> <ControlTemplate x:Key="CustomToggleButton" TargetType="ToggleButton"> <Grid> <Border Name="Border" /> <Border Name="SmallBorder" /> <Path Name="Arrow" /> </Grid> </ControlTemplate> <Style TargetType="{x:Type ComboBoxItem}"> <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" /> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBoxItem}"> <Border> <ContentPresenter /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="{x:Type ComboBox}"> <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" /> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate TargetType="ComboBox"> <Grid> <ToggleButton Template="{StaticResource CustomToggleButton}" /> <ContentPres
Tags (comma-separated)
Save Edits
Cancel