ListBox with different font for each ListBoxItem

image_pdfimage_print


   
      

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Use ListBox" Height="300" Width="300">
    <Grid>
        <ListBox Margin="10,10,10,0" Name="ListBox1" VerticalAlignment="Top" SelectedIndex="1" VerticalContentAlignment="Center">
            <ListBoxItem>A</ListBoxItem>
            <ListBoxItem FontFamily="Comic Sans MS" FontSize="18" Foreground="Blue"></ListBoxItem>
            <ListBoxItem>C</ListBoxItem>
        </ListBox>
    </Grid>
</Window>