zoukankan      html  css  js  c++  java
  • WPF数据绑定(ItemTemplate和DataTemplate)

    <ListBox Name="lb_fileInfo" Grid.Row="1" Grid.ColumnSpan="3" ItemsSource="{Binding}" SelectionMode="Single" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> 

    <ListBox.ItemsPanel> 
    <ItemsPanelTemplate> 
    <WrapPanel IsItemsHost="True" /> 
    </ItemsPanelTemplate> 
    </ListBox.ItemsPanel> 
    <ListBox.ItemTemplate> 
    <DataTemplate> 
    <Border Margin="3" BorderThickness="1" BorderBrush="SteelBlue" CornerRadius="2"> 
    <StackPanel Margin="3"> 
    <!--<StackPanel.ToolTip> 
    <Image Margin ="3" HorizontalAlignment="Center" Source="{Binding Path=bigThumbNail}" Stretch="None"></Image>

    </StackPanel.ToolTip>--> 
    <Image Margin ="3" HorizontalAlignment="Center" Source="{Binding Path=thumbNail}" Stretch="None"></Image>

    <TextBlock FontWeight="Bold" HorizontalAlignment ="Center" Margin ="3" Text="{Binding Path=name}"></TextBlock>

    <ProgressBar Height="10" Name="progressBar1" Width="200" /> 
    <TextBlock FontStyle="Italic" HorizontalAlignment="Center" FontSize="10" Margin ="3" Text="{Binding Path=revitType}"></TextBlock>

    </StackPanel> 
    </Border> 
    </DataTemplate> 
    </ListBox.ItemTemplate> 
    </ListBox>

  • 相关阅读:
    t-SNE可视化(MNIST例子)
    numpy得到数组的index
    Latex的各种帽子
    Mac OSX安装 GitLab 5.x
    yii2 关系...
    基于git的源代码管理模型——git flow
    spl_autoload_register
    如何創建一個自己的 Composer/Packagist 包 (PHP)
    正则表达式语法
    sublime php插件
  • 原文地址:https://www.cnblogs.com/lipf/p/2473853.html
Copyright © 2011-2022 走看看