zoukankan      html  css  js  c++  java
  • ComboBox

    IsEditable:把 ComboBox变成一个文本框;

    IsReadOnly:决定文本框是否可以编辑;

    只有 IsEditable true 时,IsReadOnly 才起作用。

    <ComboBox>

                <!--Item #1-->

                <StackPanel Orientation="Horizontal" Margin="5">

                    <Image Source="/Pictures/1.jpg"></Image>

                    <StackPanel Width="200">

                        <TextBlock Margin="5,0" FontSize="14" FontWeight="Bold" VerticalAlignment="Center">

                            Curtain Call

                        </TextBlock>

                        <TextBlock Margin="5" VerticalAlignment="Center" TextWrapping="Wrap">

                            Whimsical,with a red curtain background that represents a stage.

                        </TextBlock>

                    </StackPanel>

                </StackPanel>

                <!--Item #2-->

               <StackPanel Orientation="Horizontal" Margin="5">

                    <Image Source="/Pictures/2.jpg" />

                    <StackPanel Width="200">

                        <TextBlock Margin="5,0" FontSize="14" FontWeight="Bold" VerticalAlignment="Center">

                            Fireworks

                        </TextBlock>

                        <TextBlock Margin="5" VerticalAlignment="Center" TextWrapping="Wrap">

                            Sleek,with a black sky containing firworks.When you need to celebrate PowerPoint style,this design is for you!

                        </TextBlock>

                    </StackPanel>

                </StackPanel>

            </ComboBox>

    SelectionChanged事件有 AddedItems 包含新的选择 RemovedItems包含老的选择。

    Void ComboBox_SelectionChanged(Object sender,SelectionChangedEventArgs e)

    {

    If(e.AddedItems.Count>0)

    {

    }

    }

  • 相关阅读:
    Python学习笔记9:变量作用域和列表
    Python文摘:argmin/argmax 与 idxmin/idxmax
    SQL学习笔记8
    SQL学习笔记7
    SQL学习笔记6
    SQL学习笔记5
    SQL文摘:sql(join中on与where区别)
    SQL学习笔记4
    SQL学习笔记3
    机器学习基石第三讲 Types of Learning
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2264435.html
Copyright © 2011-2022 走看看