Results 1 to 2 of 2

Thread: [RESOLVED] [WPF] How can I set RenderOptions in code?

  1. #1

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Resolved [RESOLVED] [WPF] How can I set RenderOptions in code?

    I'm able to get an (inherited) Canvas to render its content with NearestNeighbor scaling by using this XAML:

    Code:
    <my:ZCanvas x:Name="ZCanvas1" RenderOptions.BitmapScalingMode="NearestNeighbor">
    I want to allow the user to select the rendering quality at run time, but I can't find a way to do it in code. There appears to be a SetRenderOptions method but I can't find how or where to apply it. Any suggestions?

    BB

  2. #2

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: [WPF] How can I set RenderOptions in code?

    Suddenly the penny dropped:
    Code:
    RenderOptions.SetBitmapScalingMode(Me, BitmapScalingMode.NearestNeighbor)
    And all the time I assumed RenderOptions had to be a property of something. BB.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width