开发者

Weird style behavior. Please explain

开发者 https://www.devze.com 2023-02-20 05:32 出处:网络
I have a style: <Style TargetType=\"Image\"> <Setter Property=\"RenderOptions.BitmapScalingMode\" Value=\"HighQuality\" />

I have a style:

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

It resizes all images inside a panel, as it was inten开发者_Go百科ded. However, it doesn't affect images inside DataGrid rows. Why? How to fix this?


As far as i know DataGrid overrides all styles since it applies two different styles of its own, one for editing the cell and one for its normal appearance.

0

精彩评论

暂无评论...
验证码 换一张
取 消