在WPF应用程序中,我有一个登录命令,它接受SecureString作为参数。我使用xaml转换器将密码框中的值传递给命令。
<PasswordBox
Name="PasswordBox"
Grid.Row="2"
Grid.Column="2" />
<Button
Grid.Row="3"
Grid.Column="3"
Command="{Binding LoginCommand}"
Content="{x:Static p:Resources.LoginView_LoginButtonContent}">
<Button.CommandParameter>
<MultiBinding
Converter="{c:PasswordBoxConverter}"
Mode="TwoWay"
UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="PasswordBox" />
</MultiBinding>
</Button.CommandParameter>
</Button>我想在UWP中使用xbind做一些类似的事情。可以使用xbind将参数传递给事件处理程序吗?
发布于 2017-02-17 13:01:57
UWP应用程序不支持多重绑定,并且您不能使用xbind传递事件处理程序。Bind是针对强类型对象的,您需要找到另一种方法来实现此目的。
使用UWP,您可以直接绑定到WPF中控件的密码属性,这是不可能的。
如下所示:
<PasswordBox
Margin="0,12,0,0"
Header="Contraseña"
Password="{Binding Password, Mode=TwoWay}"
PasswordRevealMode="Peek"
PlaceholderText="Escribe tu contraseña" />诚挚的问候
https://stackoverflow.com/questions/42280345
复制相似问题