reset password
Author Message
ketchupacket
Posts: 8
Posted 14:13 Feb 19, 2013 |

I tried submitting an app for the Windows Store, and the app I submitted was rejected for not working with the snap feature. Does anyone know how to fix this? I did everything exactly the same as my first app, and that passed through the certification process without changing anything to the snap. This app was made through Construct2.

Last edited by ketchupacket at 14:14 Feb 19, 2013.
JackStrauss
Posts: 236
Posted 15:02 Feb 19, 2013 |

Try to create events featuring the snap feature as a conditional statement, and make sure you program it into each layer that is associated with the entire game.  For example, if you have a splash page layer, a layer 1 where the game is, and a credits page layer, then program the snap feature into each layer, assuming you have different event sheets for each separate layer.

Use the Windows 8 built-in object in Construct 2, and experiment with the various conditionals related to "game states", that is, snapped and unsnapped.

 

You can try adding a pause layer as well.  The pause layer is a bit tricky, but it works.  Construct 2 gives you a default Windows 8 template that show the snap and unsnap feature in play.  Try that out, and see how it goes...

 

 

 

 

Last edited by JackStrauss at 17:01 Feb 19, 2013.
asmiths
Posts: 12
Posted 14:34 Feb 20, 2013 |

This isn't for Construct 2, but if you're doing a C++ app and trying to use snap, (this should be able to be used for landscape / vertical orientation too), this example helped a lot.

http://code.msdn.microsoft.com/windowsapps/Snap-Sample-2dc21ee3

 

Note areas using

Windows::UI::ViewManagement (and its variables/functions)

and

this->SizeChanged += ref new SizeChangedEventHandler(this, &MainPage::MainPage_SizeChanged);
Scenarios->SelectionChanged += ref new SelectionChangedEventHandler(this, &MainPage::Scenarios_SelectionChanged);
Last edited by asmiths at 14:34 Feb 20, 2013.
BryanYeh
Posts: 38
Posted 21:44 Feb 26, 2013 |
asmiths wrote:

This isn't for Construct 2, but if you're doing a C++ app and trying to use snap, (this should be able to be used for landscape / vertical orientation too), this example helped a lot.

http://code.msdn.microsoft.com/windowsapps/Snap-Sample-2dc21ee3

 

Note areas using

Windows::UI::ViewManagement (and its variables/functions)

and

this->SizeChanged += ref new SizeChangedEventHandler(this, &MainPage::MainPage_SizeChanged);
Scenarios->SelectionChanged += ref new SelectionChangedEventHandler(this, &MainPage::Scenarios_SelectionChanged);

The sample is a bit confusing. Does the snap require more than the MainPage.xaml? like the Senerio1.xaml?

asmiths
Posts: 12
Posted 23:52 Feb 26, 2013 |

I'm still trying to understand it all myself, but I think the scenario1 is how the program deals with the snap, but detection only requires the namespace and the couple checks.

asmiths
Posts: 12
Posted 15:03 Mar 10, 2013 |

EVERYONE!

If you want a QUICK (sort of) fix for snap, fill, portrait, etc for a XAML C++ project, go into the xaml code and find the main grid that surrounds everything and surround it with this tag:

<Viewbox>

<Grid>the rest of your project</Grid>

</Viewbox>

It will scale to whatever size the screen is.

I don't know if this counts as snap / if this will let you pass certification as when it is not in its desired / native orientation, it gets the dreaded black background, but at least you can play around with it in different parts of code.

EDIT:

Found a solution to black background:

So, what we want to do here is make our main background grid stay the way it normally is (filling the screen), but make our controls scale.

The Viewbox can only hold 1 item, so if you want to hold more than one item in it, they have to be all inside of a container like a grid.

So we write it like this:

<Grid x:Name="That_one_that_has_your_background">

<Viewbox>

<Grid>The rest of your project</Grid>

</Viewbox>

</Grid>

This way, the rest of your project is scaled, but the background still fills the window.  I still don't know how the testers would react to this, however, but I imagine it's worth a shot with all the stuff that has gotten through.

Last edited by asmiths at 16:52 Mar 10, 2013.