ComboBoxコントロール

 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 [マナ]

コメント:



(画像の文字列を入力して下さい)

トップ   編集 凍結 差分 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019/12/02 (月) 12:41:45 (1628d)

PCpዾyǗlgĂ܂}WŔ܂z 萔O~ył񂫁z Yahoo yV NTT-X Store

z[y[W ̃NWbgJ[h COiq ӂ邳Ɣ[ COsیI COze