zoukankan      html  css  js  c++  java
  • wpf 窗口打开后默认设置控件焦点

    https://blog.csdn.net/Vblegend_2013/article/details/81771872

    <Grid FocusManager.FocusedElement="{Binding ElementName=pwd}">
    <Grid.RowDefinitions>
    <RowDefinition Height="40" />
    <RowDefinition />
    </Grid.RowDefinitions>
    <Button Style="{StaticResource CloseImageButtonStyle}" HorizontalAlignment="Right"
    Margin="0,0,5,0"
    IsCancel="True"
    Command="{Binding CloseCommand}" />
    <DockPanel Margin="45,0" Grid.RowSpan="2" VerticalAlignment="Center">
    <Button
    IsDefault="True"
    DockPanel.Dock="Right" Margin="10,0,0,0" Style="{StaticResource NormalButtonStyle}" Content="确定"
    Command="{Binding ConfirmCommand}" />

    <PasswordBox
    x:Name="pwd"
    converter:PasswordBoxHelper.Password="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
    Height="30" Style="{StaticResource DefaultPasswordBoxStyle}" />
    </DockPanel>
    </Grid>

  • 相关阅读:
    文件系统
    用户
    Kali Linux命令(3)
    Kali Linux命令(2)
    Kali Linux命令(1)
    文件上传测试 bugku
    Seay源代码审计系统
    实验吧 BrainFuck
    zigbee学习之路(十一):看门狗
    zigbee学习之路(十):串口(接收)
  • 原文地址:https://www.cnblogs.com/sczmzx/p/10731027.html
Copyright © 2011-2022 走看看