0

I'm converting an app from WinForms to WPF in VB and run in to the following error. In the original WinForms application, there's a line of code that controls the rotation of an image. Here it is:

bmpmetband.RotateFlip(RotateFlipType.RotateNoneFlipY)

Now when I use this code in my WPF version, it has a red line under it. I can't find anywhere on the internet how to fix this or what the WPF equivalent of RotateFlipType.RotateNoneFlipY is. Can someone here help me?

Martin
  • 47
  • 8
  • Have you tried https://stackoverflow.com/questions/33914140/wpf-how-to-rotate-a-bitmapsource-by-any-angle – the.Doc Oct 06 '21 at 09:25

1 Answers1

0

Yes, equivalent is available in WPF, kindly look into RenderTransform

<Rectangle IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5" >
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Rectangle.RenderTransform>
        </Rectangle>
Mak Ahmed
  • 578
  • 5
  • 16