。(button使用contont写的时候) 当。button使用 <button.content><textBlock/></button.content>依然会覆盖

 这段代码能消除全局textblock对button的影响

 <DataTemplate DataType="{x:Type System:String}">
        <TextBlock Text="{Binding}">
            <TextBlock.Resources>
                <Style TargetType="{x:Type TextBlock}"/>
            </TextBlock.Resources></TextBlock>
    </DataTemplate>
View Code

相关文章:

  • 2022-12-23
  • 2021-10-17
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-11-16
  • 2022-01-23
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案