I like to wire up XAML as much as I can. I don't think it is all that much code really... the MessageBus and NavigationHandler (which is the same thing as your IMyAppNavigationService) are very small. I replace the dependency you have on the nav service with a dependency on the message bus, which provides me additional capabilities. Too each there own... whatever works for the apps you build. Just thought it was an interesting alternative.
Comments
-
-
@Ganesh: Not really. This was more of an effort to illustrate different ways to incorporate XAML and design-time support rather than deal with event routing /messaging per se. PRISM is great, but for a lot of apps it is also overkill so this was just a nice, simple way to get some of the goodness provided by things like Event Aggregator without having to dive into PRISM.
-
@cellra: I am constructing the dependency in XAML and then binding it to the property I want to inject into. There is no code behind used for the injection itself.
-
@mark: Hi mark. Sorry for the video problems. I messed something up somewhere along the way. I have re-processed the vid and the HiQuality files are much better. The default vid may still be choppy depending on bandwidth.
-
Confirmed that the flicker is a known issue and entered as a bug.
-
Interesting. I hadnt really noticed it because I was always using the back button to navigate between pages when I was in landscape mode. Problem when you have a demo app that has TWO WHOLE pages.
I'm not sure what is going on. It appears to have
something to do with sliding content into the various content controls that make up the TCC and the phone having to figure out that the new content should be in landscape rather than portait. I would lean toward this being a bug in the phone but I have spent
about 5 minutes looking at it. I will try and dig deeper into it tomorrow.UPDATE: Ok, this happens on pages with our without the TCC. I have sent an email to the dev team to see if this is by design, emulator issue, or bug.
-
I dont think TCC would do the trick. I took just a quick look, but an orientation change does not actually change the page content, so the TCC would not be invovled in at all. It would just behave "as normal". You would need to wire up the OnOrientationChanged event at the page level and control an animation from there I think. I want to say Peter Torr has a MIX10 video that shows him doing this.
-
You can see a quick fix to getting the TransitioningContentControl working with the April CTP here - http://channel9.msdn.com/posts/SlickThought/Windows-Phone-7-April-CTP-and-TransitioningContentControl/
-
I just got the project working under the April CTP. At this point, I brute forced it by putting the TransitioningContentControl source directly into my project. I am working on a blog post / screencast to show how to get things working. I have a couple of other things I want to explore before I finish it up. Keep an eye here or on my blog - http://slickthought.net for details. Hopefully in the next day or so...
-
Thanks for the info Jeff!
For the TopLevelNavigationService... (I don't have the code in front of me - on a different laptop), if it is what I am thinking of, you will have to use the Application.Current.RootVisual and cast it to a PageNavigationFrame and grab the Nav service from there. That's my guess...