How to correctly resize a XAML DirectX App on Windows 10 ? RRS feed

  • Question

  • I've installed Windows 10 and now all metro apps can be resized at arbitrary sizes.

    I have my app as an XAML DirectX App that uses a ISurfaceImageSourceNative in order to have support both for C++ code and C# for various reasons.

    Under this setup I don't have control over the swap chain.

    Initially when my ISurfaceImageSourceNative derived class initializes it has the size 1920x1040 (my desktop is at 1920x1080).

    I then resize it to 500x800 (the minimum size for some reason).

    I receive a SizeChanged event ( I don't call VisualStateManager.GoToState since it's neither narrow or fullscreen ) for 500x800. At this point I internally resize my render targets for 500x800, but the final texture I render on (due to the lack of swap chain textures ) is a RTV from

    m_sisNative->BeginDraw(updateRectNative, &surface, &offset);

    this surface/texture 2D actually has the size 1952x1056 at all times. Before and after resize.

    The problem is that I think I need to resize the ISurfaceImageSourceNative in order to have a proper resize to the actual screen size. I now get this effect :

    If I try and pretend like ISurfaceImageSourceNative is 500x800 I actually render less than the centered image above, since the image centered is considered to be 1920x1050 at all times. I tried changing the size of the <Image> element where I set the source to be the ISurfaceImageSourceNative  derived class but that doesn't change anything either :|.

    This is strictly a windows 10 issue though where apps don't launch in fullscreen anymore.


    Sunday, March 8, 2015 7:35 PM


All replies

  • Hi Ciprian,

    Since Windows 10 is still in preview, may I know if the app works fine under Windows 8.1?

    If yes, it could related with Windows 10, you may submit a feedback to us via feedback tool on Win10 desktop. There is no official documentation for that and we could not answer you with a accurate answer. Thanks for your understanding.

    If it does not work with Win8.1 we could take a further look, however I don't think we can resize Windows Store App on Win8.1.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 9, 2015 3:17 AM
  • In Windows 8.1 it used to work well, however, even there, there was the option of making a metro app like 3/4 the screen width while the other 1/4 had the desktop or vice versa. In that case my app would automatically get scroll bars. I never bothered to implement resizing accurately to 1/4 or 3/4 of the screen width but now in Windows 10 I can't test that behavior either. I just hope there will be a solution for this by the time Windows 10 ships.


    Tuesday, March 10, 2015 8:43 PM
  • Hi Ciprian,

    See A first look at the Windows 10 universal app platform for an overview of the Windows 10 Developer platform.  Tune in to our Build conference in April for the full story.


    Tuesday, March 10, 2015 8:48 PM