Seminar with a bunch of tips and tricks and lessons learned regarding windows 8 modern UI app developement.
Topics include: Blend/design time data, view states, touch, navigation and Windows Store.
18. Filled view
• Usually nothing strange about this
• You have minimum of 1024 pixel of place,
might be more
• Can perhaps show a little less than in full
view
• Be aware that user might not reach
controls with their thumbs
23. Use same view, reposition elements
• Difficult to maintain in blend
• Easy to accidently alter something in the
other when doing a change in one. We have
dependencies between states.
24. Use same view with visibility
• Could very easy create duplicate data
• Make sure you use usercontrols, bindings etc
25. Navigate to a different page
• Catch OnSizeChanged
• ApplicationView.Value will tell you your state.
• Do your navigation etc here.
• Advantage if you want your app to always show
the same snapped content. Tip: Put this in a
base class.
35. Screen table - "Surface"/FlatFrog
no up or down
difficult with global UI elements
Use popups or duplicates
36. Concurrent popup
One concurrent event per UI Element, e.g.
Canvas
double-click better than tap-n-hold
ugly trick: Put a grid with many elements inside
the canvas (Routed events)
44. Parameter serialization & suspend
• Now there is a possibility to use object to
navigate by. Great?
• It was only possible to use strings before.
• Now these types can be serialized by
Frame.GetNavigationState:
• numbers
• characters
• strings
• guids
• boolean
45. Parameter serialization & suspend
GetNavigationState doesn't support serialization of a
parameter type which was passed to Frame.Navigate
46. Parameter serialization & suspend
There are a few ways around this example:
• Use strings (or other approved types)
• In your complexd object serialize and
deserialize manually using strings.
• Save object globally and reference object by
strings when navigate
47. page caching
Page caching works both back and forward
• You can not just turn on caching back which is
what we usually want to have
49. Summary
It is nice to use a own rootframe to be
able to have the same background
image/animation/sound etc in all views
It is more convenient to use approved
parameters until all serializable object are
allowed
If you turn on page caching make sure
you clear the cache on the correct level
Unlike WP and earlier XAML versions, the Data tab in Blend is missing cannot use XML data for view models.
What we like to do is:Design view model on pageIn code, set view model in ctorviewModel.Init in OnNavigatedTo
Appbar inherits binding from ancestors.If a separate DataContext is needed, it cannot be set on the AppBar itself, will not apply.
There are thesethree states.
Shows the windows store
Can check which side by checking Window.Current.Bounds.Left == 0Mightwant to movebuttonsetc to bettersuitefilled
Store does not handlesnappedverywell. This is onlyallowedifyourappdoes not haveanything to really show in snapped mode.Can be both on left or right sideCan check which side by checking Window.Current.Bounds.Left == 0Ifyouwant to knowifsnappedchangessideonecanuse a timer whileapp is snapped. Havn´tseenanybetteridea.
In blend it is easy to changebetweenstates
It willquickly be verymuch data in xaml
Easy to havebackground, animation, audio etc in common for all views.
In xamlcreate a frame
Havecreated a staticclasswhichhandles all navigation.
Wehave to handleNavigate, Back,CanGoBacketc
If you try to use a different typethiserrorwilloccur:
Twotypeof cachemodeRequired and EnabledRequired is the strongerone and reaminsevenif cache size is exceeded.
Great tool, checks all kinds of things.Leave machine alone while it runs!Probably runs as step 1 of the certification process you have to pass. (we’ll get back to that...)
Talked about a lot, majority of rejects was this error.Must provide – both in app and in metadata (=on the web)Privacy policy: http://bit.ly/RWGouoPublish an app: http://bit.ly/R28Rtj
Everything done via live account.Often you publish as a customer – tell them to create a separate live account and forward the email.Really tedious to have to ask for confirmation codes and have them (not) tell you when an email has arrived.Clicking ’remember me’ saves you a lot of hassle.
Company: must be identical to papers.Abbreviations cause delays.E.g. MTG Radio ABWe have always gone for age 12+, to be on the safe side.E.g. radio streams could contain anything...
Not agent like windows phone, but an element in the app that prevents suspend = the app continues to run.But... The WACK does not understand this. We had to disable autoplay for MTG Apps
Can be done.Reserve new nameChange name everywhere in appPublish updateOld name can now be removed
Appscannot be removed!What you can do is to publish an update that is not available in any countries!Will cause the app to disappear from the Store, but get an update on the machines that it has been installed on.You can never force-delete an app on all machines that it’s installed on.