首页 > 代码库 > 关于绑定的C#代码+转换器

关于绑定的C#代码+转换器

  BindingOperations.SetBinding(
                exp, Expander.IsExpandedProperty,
                new Binding()
                {
                    Path = new PropertyPath("SelectedExpander"),
                    Mode = BindingMode.TwoWay,
                    Converter = this.TryFindResource("ExpanderToBoolConverter") as IValueConverter,
                    ConverterParameter = convertParameter
                }
            );

关于绑定的C#代码+转换器