Show cue banner for wpf ComboBox with grouping

Posted by Adam Duston on Stack Overflow See other posts from Stack Overflow or by Adam Duston
Published on 2010-04-19T00:10:11Z Indexed on 2010/04/19 0:13 UTC
Read the original article Hit count: 339

Filed under:
|
|
|
|

I have a ComboBox in my WPF form:

<ComboBox Margin="75,0,15,102" Name="videoFormatCombo" 
          Height="23" VerticalAlignment="Bottom" 
          DataContext="{StaticResource GroupedVideoFormats}" 
          ItemsSource="{Binding}" 
          ItemTemplate="{StaticResource VideoFormatTemplate}">
    <ComboBox.GroupStyle>
        <GroupStyle HeaderTemplate="{StaticResource GroupHeader}"/>
    </ComboBox.GroupStyle>
</ComboBox>

As you might be able to guess, GroupedVideoFormats is a CollectionViewSource with grouping.

I need to get a cue banner to display for this ComboBox. I've attempted the solution that is (very verbosely) outlined in this blog post, but it will not work for a ComboBox with grouped data. The two solutions outlined in superfluousprefixhttp://stackoverflow.com/questions/2548757/how-can-the-blank-space-in-a-c-combobox-be-filled-as-a-hint-for-the-user are for Windows Forms ComboBoxes only, and won't work with WPF.

If it would help to see all the original source, this particular form is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/blob/master/MSWindows/Windows/FileSelect.xaml . It's an open-source project, so the entire project is on github: superfluousprefixhttp://github.com/8planes/mirovideoconverter/tree/master/MSWindows .

Thank you for any advice!

Adam

P.S. stackoverflow wouldn't let me make more than one anchor tag in my post, hence the long urls with the superfluous prefix. Sorry!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about combobox