bindingtoctrl.xaml
来自「学习WPF的好东西」· XAML 代码 · 共 18 行
XAML
18 行
<Window x:Class="DTSample.BindingToCtrl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:qq="clr-namespace:DTSample"
Title="DTSample" Height="300" Width="300" Loaded="Onload"
>
<StackPanel>
<!--,UpdateSourceTrigger= Explicit LostFocus PropertyChanged-->
<TextBox x:Name="MyTextBox" Width="100" Height="50" Text="{Binding Path=Content}"></TextBox>
<TextBlock Text="{Binding ElementName=MyTextBox, Path=Text}" Width="300" Height="50"></TextBlock>
<TextBlock x:Name="MyTextBlock" Text="{Binding Path=Content}" Width="300" Height="50"></TextBlock>
<Button>lost focus</Button>
<Button Click="OnClick">Update</Button>
</StackPanel>
</Window>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?