I've an app written on VS12. I have to make it compatible with win8.1. I am just in to this and would like to know how to analyze an app from start on what it does and how it works.
It would be helpful if someone could provide pointers on the same.
My environment is C++/XAML.
Thanks !!Friday, September 13, 2013 2:56 AM
Firstly, you need to install Visual Studio 2013 Preview/ RC depending on whether you want to test on Windows 8.1 Release Preview/ RTM.
Then you will need to open your old project (developed in VS 2012) in Visual Studio 2013 and upgrade your app to target Windows 8.1. Check this link: http://msdn.microsoft.com/en-us/library/windows/apps/dn263113.aspx for more information.
For app analysis, you can run the app certification kit or if you want to perform performance tests you can perform Performance Analysis (Analyse --> Start Performance Analysis option in Visual Studio).
Hope that helps.
Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvzFriday, September 13, 2013 5:39 PMModerator
thanks for your response. I actually did not mean the performance part.
I was looking out for how to understand the working of any existing app through code. Where it starts and how to do efficient debugging to attain full knowledge of the flow it goes through.
Thanks !!Saturday, September 14, 2013 3:51 AM
Also, I went through the list of API's not going to be used from Win8.1. I see even layoutaware page class too will not be provided by default on creating a project and we being asked to use window's dimensions.
I see the samples from MS for !in 8.1. Why so ? I was expecting that the samples should be in complete alignment with the changes exposed for Win8.1
Thanks !!Sunday, September 15, 2013 2:51 AM
LayoutAware class will still work if you are migrating your Windows 8 app to Windows 8.1. Any "new" projects that you create will no longer use the LayoutAware class. There have been new controls introduced in Windows 8.1 which you can use and are better than the controls for Windows 8.0. You can probably take a look at this session from Tim Heuer that goes over the "What's new in XAML" from the build conference: http://channel9.msdn.com/Events/Build/2013/2-164
Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvzMonday, September 16, 2013 9:46 PMModerator
For debugging scenario - after opening the project in VS 2013 Preview, you can hit "F10" and the Visual Studio 2013 debugger will break at the first line of execution in your code. You can then study the flow using other commands in the "Debug" menu of Visual Studio.
-SagarTuesday, September 17, 2013 10:31 AM
Thank you all for your responses.
One more thing, as i told before, my app works fine in VS2012..I see we have implemented snap mode for all the pages we had in the app. Having said that, how should i make it work with Win8.1/VS13 given that there are no discrete states in 8.1.
Precisely, what should i do with the snapped controls in Win8 and how would i make it compatible with 8.1 ? I was researching a whole about this and got confused.
Thanks !!Tuesday, September 17, 2013 3:38 PM
If the application is targeted for Windows 8.0, then it should run on Windows 8.1 without any issues. If you re-target the application to Windows 8.1 Preview, then you can refer the following link for Windows Sizes at http://msdn.microsoft.com/en-us/library/windows/apps/bg182890.aspxTuesday, September 17, 2013 5:26 PM
Thanks again for your response. I dont have problems with retargeting. The document too clearly explains the items to do step by step.
But for removing snap modes, it asks to use windows current width and height as parameter. As i already told, we have explicit controls for showing up in snapped mode for Win8. It would be really helpful if someone could explain if there is a need to remove the controls for snapped mode in Win8 or how to achieve this compatibility with an example.
Thanks !!Tuesday, September 17, 2013 5:32 PM
You can have a look at the Application Views (Windows 8.1) sample which makes use of the SizeChanged event to get the dimensions of the Window being resized. Windows 8.1 Preview does not have fixed-width view states, you'll need to use the above event for providing the optimal experience for Windows 8.1 targeted apps. Please let me know if I missed something.
-SagarWednesday, September 18, 2013 12:00 PM
Thank you sagar !!
I took a look at the application views and i understand how views work currently.
Again i'm wondering how would i make the win8 app compatible with win.1 given that i have controls defined exclusively for snap mode as such.
Should i remove those controls and just handle windows size change event handler ?
In that case, would the controls scale across seamlessly without any issues?
Wednesday, September 18, 2013 1:10 PM
Can you please elaborate - "controls defined for snap mode" - part ? In Windows 8, typically you'd write code in <VisualStateManager> to change the controls or their arrangement in XAML. Since, this will change with Windows 8.1 , I believe that SizeChanged event-handler seems to the best approach. You'd be required to take necessary steps to ensure scalability.
-SagarWednesday, September 18, 2013 2:19 PM
You can use the same visual state managed Xaml you used in Windows 8, but you will need to change the calls to VisualStateManager::GoToState to choose the stare based on window size instead of on the view state itself. This can be changed purely within your LayoutAwarePage code.
--RobWednesday, September 18, 2013 3:16 PMModerator
Thanks Sagar/Rob. Meanwhile i was interpreting how snap mode works currently. @Sagar - Can you please elaborate, you mean to say the states supported by visual state manager are changed in win 8.1 and hence asking me to handle sizechanged event handler ? @Rob - If i get it right, you are advising to replace all state calls with the windows current bounds and width and that itself would let the app behave properly while its dragged / snapped across any size (like 50/50, 60/40, etc) ? Thanks so much for all the help.Thursday, September 19, 2013 5:27 PM
The available visual states are defined by the app, not by the system. The VisualStateManager can target any state defined in the Page's Xaml. This means that you can use the same states in Windows 8.1 as you used in Windows 8. The difference is that the Windows 8.1 app cannot just reflect the ApplicationViewStates to the visual states since there is no ApplicationViewState.Snapped on Windows 8.1. Instead, the app can listen for size changed events and then calculate the state it wants to be in. Here is some pseudo-code: you can remove states, add new ones, etc. as appropriate for your app
if (width <= 500) // default min size is 500. 320 (like Windows 8) is optional) VisualStateManager::GoToState("Snapped"); else if (height > width) VisualStateManager::GoToState("FullScreenPortrait"); else if (width:height is 4:3) // 1024x768 aspect ratio VisualStateManager::GoToState("Filled"); else VisualStateManager::GoToState("FullScreenLandscape");--Rob
Thursday, September 19, 2013 9:13 PMModerator
Thanks Rob !! Understanding now..Meanwhile, took some time to go through few examples.
Lets say for instance, a specific page's XAML has visual state defined as snapped and it uses storyboard and targets a control to transit to a new state (to adopt to the snap view), in this case, so is it like whenever the application detects that its in snap view, be it any page its in (assuming app has 4/5 pages in it), it moves to the visual state the application is in (i mean the page's controls gets automatically adapted per the states defined in XAML).
Am i getting it right (this is with reference to Win8)?
Thanks !!Tuesday, September 24, 2013 2:50 AM
Also, I tried this one.
I have a Wiin8 app, I used VS2012 on Win8.1 to compile it. I was expecting the black boxes that appear across while re-sizing apps (like when we go out of 30/70 range) should disappear / shouldn't come as we are on Win8.1, but I still see them.
Any idea on what could be the cause of this ?
Thanks !!Tuesday, September 24, 2013 3:40 AM
The application does not move to Snapped view but individual pages in the application do. So, when you target Windows 8.1 for the app, you can define in XAML the VisualState (same as Windows 8) for Snapped mode and then use Rob's code snippet above to use the "VisualStateManager" from the SizeChanged event handler to have the page go into Snapped mode.
-SagarTuesday, September 24, 2013 8:27 AM
If a previous template look like this (in Win8), we can remove Applicationviewstate alone and can still have different states defined under VisualStateGroups right ?
Thanks !!Wednesday, September 25, 2013 5:14 PM
As i told earlier, i'm just porting and want to make minimal changes (like deprecated API removals, redefining which states would go in for given current windows width and height, etc).
In case, i want to have working version of my app on both Win8 and Win8.1, i should have my source targeting Win8 and Win8.1 separately on VS13 right ?
Thanks !!Monday, September 30, 2013 4:59 PM
Your Windows 8 app should run as-is on Windows 8.1, but it won't have access to Windows 8.1 features such as fully flexible sizing (for example, it will show the snapped view with black bars if the user sizes the window to a size that between portrait and snapped which wasn't possible on Windows 8).
To get access to the new features you will need to build the app for Windows 8.1, in which case you will need separate projects to target Windows 8 and Windows 8.1.
--RobMonday, September 30, 2013 7:29 PMModerator
Thanks Rob. Currently, I am trying to build my project in VS13 targeting Windows 8. We also used certain libraries that were exclusively compiled on VS12 compiler.
I will get back with the results but thought of writing to know if i'm missing something for this.
Thanks again for helping out starters !!Tuesday, October 01, 2013 10:17 AM
I have one more clarification.
Currently an exisiting win8 app would have the controls in pages adapt to snap state whenever they are snapped (i.e 30/70).
Lets say, while re-targeting, i just make changes to deprecated API's and call out state definitions based on windows width, i understand it would be in snap state when the app is spread 30*70. Let's say now i extend it further and put my app in 40*60 or 50*50, will it work properly or should i handle that separately.
Thanks !!Thursday, October 03, 2013 1:36 PM
Probably, but it depends on the app and on what "works properly" means.
In general the pseudocode I gave will allow the app to switch between snapped, portrait, and landscape layouts. It is up to the app to lay out reasonably in each direction. I suspect that if your app laid out well in these modes on Windows 8 it will do so Windows 8.1, but if the app had a static layout then it may need more updating to handle window sizes which weren't possible in Windows 8.
You'll have to test this yourself in your app.
--RobThursday, October 03, 2013 2:19 PMModerator
If you have a dynamic layout which can reflow the controls to match the size of the screen then you should be fine. If you have a fixed layout where everything is always exactly in the same spot then you likely need to update it for new screen sizes. See Quickstart: Designing apps for different window sizes .
Most apps should be dynamic enough that they'll just work. You'll want to test your own app to make sure. We can't tell you if it's right or not since we don't know what your app does.
--RobThursday, October 03, 2013 7:39 PMModerator