zoukankan      html  css  js  c++  java
  • WPF-ListView单元格设置文字换行

    第2-6行

     1 <ListView Name="HumidifyEventLog" Style="{StaticResource ListViewStyle}" ItemContainerStyle="{StaticResource ResourceKey=ListViewItemStyle}">
     2     <ListView.Resources>
     3         <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
     4             <Setter Property="TextWrapping" Value="Wrap"></Setter>
     5         </Style>
     6     </ListView.Resources>
     7     <ListView.View>
     8         <GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle}">
     9             <GridViewColumn Header="设备" Width="{Binding ElementName=HumidifyEventLogCol0,Path=ActualWidth}" DisplayMemberBinding="{Binding Path=Source, Converter={StaticResource ChamberNameEnToCn}}"/>
    10             <GridViewColumn Header="故障ID" Width="{Binding ElementName=HumidifyEventLogCol1,Path=ActualWidth}" DisplayMemberBinding="{Binding Path=Code}"/>
    11             <GridViewColumn Header="故障描述" Width="{Binding ElementName=HumidifyEventLogCol2,Path=ActualWidth}" DisplayMemberBinding="{Binding Path=Remark}"/>
    12             <GridViewColumn Header="故障开始时间" Width="{Binding ElementName=HumidifyEventLogCol3,Path=ActualWidth}" DisplayMemberBinding="{Binding Path=StartTime}"/>
    13             <GridViewColumn Header="故障结束时间" Width="{Binding ElementName=HumidifyEventLogCol4,Path=ActualWidth}" DisplayMemberBinding="{Binding Path=EndTime}"/>
    14         </GridView>
    15     </ListView.View>
    16 </ListView>
  • 相关阅读:
    Spring配置文件中使用ref local与ref bean的区别
    基于JDK动态代理和CGLIB动态代理的实现Spring注解管理事务
    Spring事务配置的五种方式
    [codeforces-543B]bfs求最短路
    [hdu5218]DP-约瑟夫环变形
    [hdu5215]无向图找奇偶环
    [hdu5216]排序
    [zoj3591]Nim 游戏
    [zoj3596]DP(BFS)
    [zoj3593]扩展欧几里得+三分
  • 原文地址:https://www.cnblogs.com/zwh1993/p/12795377.html
Copyright © 2011-2022 走看看