Set Different Font for Item for ComboBox : ComboBox « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Use ComboBox" Height="300" Width="300">
    <Grid>
        <ComboBox Height="39" HorizontalAlignment="Left" Margin="10,10,0,0" Name="ComboBox1" VerticalAlignment="Top" Width="120" SelectedIndex="0" VerticalContentAlignment="Center">
            <ComboBoxItem>Apple</ComboBoxItem>
            <ComboBoxItem FontFamily="Comic Sans MS" FontSize="18" Foreground="Blue">Banana</ComboBoxItem>
            <ComboBoxItem>Cherry</ComboBoxItem>
        </ComboBox>
    </Grid>
</Window>
WPF Set Different Font For Item For Combo Box








24.19.ComboBox
24.19.1.ComboBoxItem ContentComboBoxItem Content
24.19.2.Content in ComboBox ItemsContent in ComboBox Items
24.19.3.Set Different Font for Item for ComboBoxSet Different Font for Item for ComboBox
24.19.4.Adding Image to ComboBox ItemAdding Image to ComboBox Item
24.19.5.Bounded to ComboBoxBounded to ComboBox
24.19.6.Gets the currently selected ComboBoxItem when the user clicks the Button.Gets the currently selected ComboBoxItem when the user clicks the Button.
24.19.7.if the user has entered text into the ComboBoxif the user has entered text into the ComboBox
24.19.8.Handles ComboBox SelectionChanged events.Handles ComboBox SelectionChanged events.
24.19.9.Handles ComboBoxItem Selected events.Handles ComboBoxItem Selected events.
24.19.10.View and Select Items Using a Combo BoxView and Select Items Using a Combo Box
24.19.11.Call the OnPropertyChanged method when its value changedCall the OnPropertyChanged method when its value changed