0

My UWP app has the ability to be rotated 180 degrees (it's being designed for a horizontal touch screen).

I find that I can rotate pretty much everything in the app, e.g. controls / framework elements etc, using code like this...

    public static void RotateElement(FrameworkElement e)
    {
        RotateTransform rot = new RotateTransform();
        rot.Angle = 180;
        e.RenderTransformOrigin = new Windows.Foundation.Point(.5, .5);
        e.RenderTransform = rot;
    }

I have found that this will also rotate Tooltips and ContentDialogs (although the dialogs appear unrotated for a split second before being shown rotated).

But I've now hit a road block...

The UWP File Picker dialogs do not have any RenderTransform properties. So I cannot rotate File Pickers.

Is there any solution to this?

I'm assuming there is no point in me trying to roll my own pickers because I can only gain access to various files and folders using the UWP pickers.

NigelP
  • 219
  • 2
  • 6
  • 2
    Why are you render transforming everything? You can configure the display orientation in Windows (Settings -> System -> Display -> Orientation) on the target device which would solve your problem (and most related future ones) with zero code changes. – Johnny Westlake Jul 03 '18 at 15:26
  • RenderTransform allows for rendering elements at any angle. Orientation settings are restricted to 90 degree increments. My app is allowing multiple users around the table so requires transform flexibility on individual items – NigelP Jul 04 '18 at 17:31
  • Will this be distributed through the Windows Store? With the latest SDK you can request broadFileAccess permissions in your manifest which would let you roll your own file picker, but becomes a large hassle when submitting to the store (lots of getting and justification and analysis required - quite rightly too) – Johnny Westlake Jul 04 '18 at 20:32
  • I will probably be side loading in the first release. Windows Store approval process is currently painfully slow and not conducive to rolling out app quick maintenance updates. Are you saying broadFileAccess will only be granted after going through Store approval? – NigelP Jul 05 '18 at 08:43
  • broadFileAccess you can use at any time during sideloading - however when you submit to the store it goes through a different submission process than a normal UWP app - closer to a desktop bridged application with additional security reviews as they need to manually verify you're not screwing with a users files / machine. – Johnny Westlake Jul 05 '18 at 09:04
  • Thanks Johnny. Useful info – NigelP Jul 05 '18 at 09:36

0 Answers0