Trying to set a default name to a combobox in WPF RRS feed

  • Question

  • Can someone help me figure it out a simple way to set a default name of "Years" for a combobox ? This is my current xaml file:

    <RSControls:SmoothScrollComboBox Grid.Column="1" x:Name="compilationYearCombo" Margin="7,2.04,0,2.04"  
                  SelectedValue="{Binding Path=SelectedYear}"
                  ItemsSource="{Binding Years}"
                  DisplayMemberPath="" SelectionChanged="compilationYearCombo_SelectionChanged" IsSynchronizedWithCurrentItem="True" Grid.ColumnSpan="2" IsEditable="False" SelectedIndex="0" IsReadOnly="False" Text="">

    I tried adding a <ComboBoxItem Content="Years" /> to set the default name to Years, didnt work, tried adding a textblock inside a datatemplate, don't know what to do anymore, being a beginner in WPF.

    Anyone has an idee how to do this ?

    Friday, August 26, 2011 10:27 AM

All replies

  • Try this


    Regards, Wenbin

    Wednesday, November 28, 2012 9:02 AM