zoukankan      html  css  js  c++  java
  • ListBox控件

    1.sys的程序集:xmlns:sys="clr-namespace:System;assembly=mscorlib"

      ListBox的数据呈现可以用:<sys:String></sys:String>或<ListBoxItem Content="" />的形式进程呈现

    <ListBox>
                <ListBoxItem Content="ListBoxItem Method" />
                <sys:String>sys:a</sys:String>
                <sys:String>sys:b</sys:String>
                <sys:String>sys:c</sys:String>            
    </ListBox>   

    ListBox绑定数据集

    <ListBox Name="lbRoot">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <CheckBox />
                            <Image Source="{Binding Img}" />
                        </StackPanel>                    
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

    ListBox使用ItemsPanelTemplate改变数据排列方式

    <ListBox Name="lbRoot">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <CheckBox />
                            <Image Source="{Binding Img}" />
                        </StackPanel>                    
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
  • 相关阅读:
    [POJ 2096]Collecting Bugs
    [SPOJ 375]Query on a tree
    [BZOJ 4423][AMPPZ2013]Bytehattan
    [BZOJ 2038][2009国家集训队]小Z的袜子(hose)
    [SDOI 2017]数字表格
    [NOI 2010]能量采集
    [HNOI 2014]世界树
    [HNOI 2016]序列
    [HNOI 2016]大数
    [HEOI 2014]大工程
  • 原文地址:https://www.cnblogs.com/kelei12399/p/2618153.html
Copyright © 2011-2022 走看看