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)

    {

    }

    }

  • 相关阅读:
    SQL获取当天0点0分0秒和23点59分59秒方法
    全球唯一标识符 System.Guid.NewGuid().ToString()
    Js获取当前日期时间及其它操作
    MySQL日期函数与日期转换格式化函数大全
    访问者模式
    享元模式
    中介者模式
    职责链模式
    命令模式
    桥接模式
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2264435.html
Copyright © 2011-2022 走看看