locked
Windows 10 Preview and App restarting in previous resized state problem.

    Question

  • I know I may be jumping the gun here a little bit, but I am starting to develop for Windows 10 Technical Preview to adjust to different window sizes. My apps are Windows Store Apps built with C# and XAML.  I have created a new class with methods to handle the resizing of the different UI objects and everything is working as planned within the application. My problem comes when closing the app in a resized state. Within the App.cs OnLaunched I am able to get the width of the maximized window with Window.Current.Bounds.Width; , but I am not sure which event is the best to get the saved window size of the resized window.  I have tried to get the smaller resized window size in the Window_SizeChanged event, OnNavigatedTo event and Loaded event of my main page with inconsistent success.  Sometimes it resizes my UI on launch, sometimes it does not(Always works in debugging, inconsistent when just deployed).  Since this reloading of the previous window size is new to Windows 10(my app resizes exactly as expected in Windows 8 and 8.1 as apps always open in a maximized window) I was wondering if anyone knows where(what event) reloads the previous window size?  If this information is not available, I would like to be able to maximize the window on start.  Can this be done programmically for Modern Apps?  It is easy in Window Form, but I have no idea if this functionality is available in Metro Apps, because up until this point apps opened by default to this mode.  Thanks a lot for your help.  I have been struggling with this for a few days now and have not been able to find a solution.

    Nevin Morrison

    Thursday, October 30, 2014 6:44 AM

Answers

  • Ideally there should not be any compatibility issues after Microsoft has finished the compatibility testing. It's still worth it to have a look and see if everything works as planned in your App. It's also possible that Apps that work in the W10 Technical Preview today might not work in the Preview version next week. They are making lots of changes in there fast (and again - this is a case against extensive testing of Apps right now). Some people with HTML5 Apps reported a different behavior of some controls (which might be due to the newer IE engine).

    So long story short: once Microsoft has done compatibility testing with Apps targeting older versions of the OS there ideally should be no issues. There might be some however and we can't really predict them.

    Friday, October 31, 2014 6:19 AM

All replies

  • In all likelihood there will be new APIs that give you all the required information and functionality in Windows 10. Inconsistent behavior unfortunately is to be expected right now as Microsoft has not yet done compatibility testing for old Apps. So I fear optimizing your App right now might lead you to implement workarounds that might:

    a) be unnecessary or

    b) introduce issues later on.

    If the new resizing behavior is beneficial and working fine in 8.1 right now that is definitely valuable work but I would suggest to wait until closer to release to do actual commpatibility testing/changes to your App. The best would likely be to only test that once the new developer tools are released as that is likely to signify a reasonable stability of the developer APIs).

    • Proposed as answer by Oliver Ulm Thursday, October 30, 2014 8:35 PM
    Thursday, October 30, 2014 7:09 AM
  • I think that is good advice. I think that some of the coming builds will be addressing different resizing options as well.  Where ever modern apps are currently saving screen state in Windows 10 when it previously was not a feature seems to be unavailable at this time.  I think your right in that the API will likely become available later if this remains a feature of Windows 10.  Since all of my apps are working correctly in Windows 8.1 I think I will just wait to see what is coming.  I just wanted to check to make sure I was not missing an event in the App lifecycle that may have exposed this information.

    Nevin Morrison

    Thursday, October 30, 2014 6:05 PM
  • Question.  Is there an update to VS 2013 especially for W10 I'm not aware of?
    Thursday, October 30, 2014 7:06 PM
  • No, there has not been a release of a Windows 10 SDK yet. That is the main reason why I advise people to wait with their testing.

    Right now you can install VS2013 on Windows 10 and run/test/debug Windows 8.1 Apps there but sometimes there will be issues that Microsoft will fix before a SDK is released and you also can't really adapt your Apps for W10 compatibility without it.

    Thursday, October 30, 2014 8:35 PM
  • No, there has not been a release of a Windows 10 SDK yet. That is the main reason why I advise people to wait with their testing.

    Right now you can install VS2013 on Windows 10 and run/test/debug Windows 8.1 Apps there but sometimes there will be issues that Microsoft will fix before a SDK is released and you also can't really adapt your Apps for W10 compatibility without it.

    Ok.

    While I haven't tried out W10 yet, I've asked people who have W10 installed to try out my main app and they've all said it works just fine on W10. 

    This makes me wonder.  Any idea what kind of compatibility issues we should be expecting in the future here? 

    Thursday, October 30, 2014 9:37 PM
  • Ideally there should not be any compatibility issues after Microsoft has finished the compatibility testing. It's still worth it to have a look and see if everything works as planned in your App. It's also possible that Apps that work in the W10 Technical Preview today might not work in the Preview version next week. They are making lots of changes in there fast (and again - this is a case against extensive testing of Apps right now). Some people with HTML5 Apps reported a different behavior of some controls (which might be due to the newer IE engine).

    So long story short: once Microsoft has done compatibility testing with Apps targeting older versions of the OS there ideally should be no issues. There might be some however and we can't really predict them.

    Friday, October 31, 2014 6:19 AM