【问题标题】:Weird style behavior. Please explain奇怪的风格行为。请解释
【发布时间】:2011-03-27 04:53:31
【问题描述】:

我有一种风格:

    <Style TargetType="Image">
        <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
        <Setter Property="Width" Value="24" />
        <Setter Property="Height" Value="24" />
    </Style>

它会按照预期调整面板内所有图像的大小。但是,它不会影响 DataGrid 行中的图像。为什么?如何解决这个问题?

【问题讨论】:

    标签: .net wpf xaml


    【解决方案1】:

    据我所知,DataGrid 会覆盖所有样式,因为它应用了自己的两种不同样式,一种用于编辑单元格,另一种用于正常外观。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-20
      • 1970-01-01
      • 2017-04-30
      • 1970-01-01
      • 2013-05-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多