RenderOptions not working with ImageBrush
I'm trying to put an image in a circle, but I can't seem to change the bitmap scaling mode to Nearest Neighbor like I can with regular images.
If it matters the ImageSource is a TextureSource.
Code: Select all
<Ellipse>
<Ellipse.Fill>
<ImageBrush ImageSource="{}" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
</Ellipise.Fill>
</Ellpise>
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: RenderOptions not working with ImageBrush
RenderOptions.BitmapScalingMode is only applied to Visual elements so you need to set it in the Ellipse instead:
Please let me know if this works as you expected.
Code: Select all
<Ellipse RenderOptions.BitmapScalingMode="NearestNeighbor">
<Ellipse.Fill>
<ImageBrush .../>
</Ellipse.Fill>
</Ellipse>
Who is online
Users browsing this forum: Ahrefs [Bot] and 24 guests