如何在DataGrid中定义PasswordBox类型列?

时间:2009-06-30 18:58:22

标签: wpf datagrid wpftoolkit passwordbox

如何在WPFToolkit中创建一个列:DataGrid PasswordBox像?

2 个答案:

答案 0 :(得分:1)

<DataGridTemplateColumn Header="Password">
    <DataGridTemplateColumn.HeaderStyle>
        <Style TargetType="{x:Type DataGridColumnHeader}">
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
        </Style>
    </DataGridTemplateColumn.HeaderStyle>
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <PasswordBox Name="PasswordBoxPass"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

答案 1 :(得分:-2)

通过DataGridTemplateColumn