有两种方式可以实现在模板中元素绑定到父对象

1、<ContentPresenter Margin=”{TemplateBinding Padding}”/>

2、Color=”{Binding RelativeSource={RelativeSource TemplatedParent},
Path=Background.Color}”/>

相关文章:

  • 2022-12-23
  • 2021-11-13
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2022-03-09
  • 2021-12-13
  • 2021-09-12
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
相关资源
相似解决方案