WPF 依赖项属性[DependencyProperty]Text的绑定方式
方法一:
<TextBlock Style="{StaticResource NormalTextBlockStyle}" Width="80" FontWeight="Bold" Margin="25,5,5,5"> <TextBlock.Text> <Binding Path="RechargeInfo.ZeroValue" StringFormat="{}{0:F2}" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"></Binding> </TextBlock.Text> </TextBlock>
方法二:
<TextBlock Style="{StaticResource NormalTextBlockStyle}" Width="80" FontWeight="Bold" Margin="25,5,5,5" Text="{Binding Path = RechargeInfo.ZeroValue, Mode = TwoWay,UpdateSourceTrigger = PropertyChanged}"> </TextBlock>
本博客内容,如需转载请务必保留超链接。Contact Me:Mail此处省略好几个字...