int를 나타내는 int로 채워진 콤보 상자가 있습니다. 오랜 세월 ObservableCollection에 추가했지만, 문제는 내가 기본적으로 빈 콤보 상자에 프로젝트를로드 할 때입니다. "Years"와 같은 기본 이름을 설정하고 싶지만 isEditable을 true로 설정하거나 시작 부분에 문자열을 삽입하는 것과 같은 솔루션을 원하지 않습니다. 그것이 가능한 경우 순수한 xaml 솔루션을 원합니다.기본 이름을 WPF의 콤보 상자에 설정하십시오.
이 내 현재 XAML 파일입니다
<RSControls:SmoothScrollComboBox Grid.Column="1" x:Name="compilationYearCombo" Margin="7,2.04,0,2.04"
SelectedValue="{Binding Path=SelectedYear}"
SelectedValuePath=""
ItemsSource="{Binding Years}"
DisplayMemberPath="" SelectionChanged="compilationYearCombo_SelectionChanged" IsSynchronizedWithCurrentItem="True" Grid.ColumnSpan="2" IsEditable="False" SelectedIndex="0" IsReadOnly="False" Text="Years">
</RSControls:SmoothScrollComboBox>
나는 <TextBlock Text="Years" />
을 추가하는 시도, 그러나 만에 "년"콤보의 모든 요소를 변경했습니다.
자세히 설명하는 방법을 설명합니다. WPF의 초보자입니다.
감사합니다.
[질문이 있습니다.] (http://stackoverflow.com/questions/1426050/how-to-display-default-text-select-team-in-combo-box-on-pa geload-in-wpf) 도움? –
실제로 복제본 – V4Vendetta
그 해결책을 시도했지만 그 CultureInfo 매개 변수가 무엇인지 알지 못합니다 ... – Kobe