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>

  • 相关阅读:
    [Postman]历史(8)
    [Postman]响应(7)
    [Postman]请求(6)
    [Postman]查找替换(5)
    ORA-02050故障诊断一例
    转 js实践篇:例外处理Try{}catch(e){}
    转 PHP
    HTML DOM getElementById() 方法
    地点选择
    9i 和 11 g 区别
  • 原文地址:https://www.cnblogs.com/sczmzx/p/10731027.html
Copyright © 2011-2022 走看看