Silverlight の ComboBox コントロールに静的なオプションでリストを表示するには 静的なオプションでComboBoxコントロールを実装例: <ComboBox Height="23" Width="Auto" x:Name="comboBox1" SelectedValuePath="Tag"> <ComboBox.Items> <ComboBoxItem Tag="0" IsSelected="True"> <ComboBoxItem.Content> <TextBlock Text="選択1" /> </ComboBoxItem.Content> </ComboBoxItem> <ComboBoxItem Tag="1"> <ComboBoxItem.Content> <StackPanel Orientation="Horizontal"> <TextBlock Text="選択2" /> </StackPanel> </ComboBoxItem.Content> </ComboBoxItem> </ComboBox.Items> </ComboBox> 「SelectedValuePath」の設定によって、this.comboBox1.SelectedValueプロパティからstring型の値を取得することが可能になります。 ウィジェット型CM動画配信サービス manna [マナ] コメント: |