WPF Get Multibinding Expression, Update Source,

2016-08-20 10:37:39来源:http://muzizongheng.blog.51cto.com/856912/1333105作者:muzizongheng人点击


<?xml version="1.0" encoding="UTF-8"?> wpf 拿到某个control的multibinding以及其中每个Binding
1. 拿到multibindingMultiBindingExpressionmbe = BindingOperations.GetMultiBindingExpression((child as TextBox), TextBox.TextProperty);
2. 拿到其中每个Binding的Path Binding bd = mbe.ParentMultiBinding.Bindings[0] as Binding; bindingPath = bd.Path.Path;
3. 拿到其中的ValidationRuleValidationRulevr = mbe.ParentMultiBinding.ValidationRules[0];
4. 更新MultiBindingmbe.UpdateSource();

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台