<Window x:Class="WpfApp10.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp10"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<StackPanel>
<TextBox x:Name="tb" Margin="5" Text="Hello"></TextBox>
<TextBox Text="{Binding ElementName=tb, Path=Text.[3],Mode=OneWay}" Margin="5"/>
</StackPanel>
</Grid>
</Window>
下面不指定Binding Mode就会报错
最新推荐文章于 2023-12-26 15:26:00 发布