zoukankan      html  css  js  c++  java
  • (WPF)实现DataGrid中当某一列的值显示为密码样式

                                                <!--变量值-->
                                                <DataGridTextColumn Binding="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,
                                                    NotifyOnTargetUpdated=True}" Header="变量值">
                                                    <DataGridTextColumn.ElementStyle>
                                                        <Style TargetType="TextBlock">
                                                            <Setter Property="HorizontalAlignment" Value="Center"/>
                                                            <Setter Property="VerticalAlignment" Value="Center"/>
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding Type,UpdateSourceTrigger=PropertyChanged}" Value="{x:Static RpaModelVariable:ValueTypeConstants.Password}">
                                                                    <Setter Property="Foreground" Value="Transparent"/>
                                                                    <Setter Property="TextDecorations">
                                                                        <Setter.Value>
                                                                            <TextDecorationCollection>
                                                                                <TextDecoration>
                                                                                    <TextDecoration.Pen>
                                                                                        <Pen Thickness="10" Brush="Black"   EndLineCap="Round" StartLineCap="Round"     DashCap="Round"  >
                                                                                            <Pen.DashStyle>
                                                                                                <DashStyle Dashes="0.0,1.2" Offset="0.6"/>
                                                                                            </Pen.DashStyle>
                                                                                        </Pen>
                                                                                    </TextDecoration.Pen>
                                                                                    <TextDecoration.Location>
                                                                                        <TextDecorationLocation>Strikethrough</TextDecorationLocation>
                                                                                    </TextDecoration.Location>
                                                                                </TextDecoration>
                                                                            </TextDecorationCollection>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </DataGridTextColumn.ElementStyle>
  • 相关阅读:
    Angular
    linux mysql 5.7.25 安裝
    J2CACHE 两级缓存框架
    MYSQL 事务测试
    安装配置ftp服务器
    使用docker 安装 GITLIB
    Elastic serarch 安装
    centos firewalld 基本操作【转】
    KAFKA 监控管理界面 KAFKA EAGLE 安装
    redis 的一主二从三哨兵模式
  • 原文地址:https://www.cnblogs.com/xietianjiao/p/14884503.html
Copyright © 2011-2022 走看看