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-lib闯关秘籍之1-10关
    简单的SQL注入
    五分钟带你读懂 TCP全连接队列(图文并茂)
    Ambari HDP集群搭建全攻略
    Spring Cloud Security OAuth2.0 认证授权系列(入门篇)
    敲黑板:InnoDB的Double Write,你必须知道
    重要,知识点:InnoDB的插入缓冲
    你不知道的内存知识
    每日一个知识点:关于磁盘的一些事儿
    Spring Boot 系列:日志动态配置详解
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2264435.html
Copyright © 2011-2022 走看看