page transition animation - silverlight

I started studying windows phone develop. I am now versed with page transitions. I looked through the standard library for animation transitions, such as Silverlight Toolkit for windows phone, but did not find anything like it. Tell me, how can I do the transition from page to page on the event, Flick, and that the first page went up, and the second followed immediately behind it without breaking.
image what be should:
http://dl.dropbox.com/u/65664856/pagetransition_question.png

Read this tutorial. It explains exactly how to use transitions in Windows Phone 7. However, the easiest is to use the toolkit (as explained in the tutorial)
You can also look towards this toolkit (Bewise Controls)

Related

Is there a way to add transitions to a ContentControl in Windows Phone 7.1?

I've searched all over but it seems like no one has figured out a way (or at least written about a way) to add transitions to a ContentControl (or equivalent) in Silverlight for Windows Phone.
I'm using Caliburn Micro, and I have a Screen Conductor that activates different user controls. All I want is a simple slide effect between activations, forward and back. You can do this in WPF but not in SL4WP it seems like.
The other alternative is to switch to using navigation between these views, but then I lose the "master-detail" style view model. I'd be open to an answer that kept my intention but used page navigation instead (since then I could use the Slide transitions from the Windows Phone Toolkit).
It's a step-by-step style conductor, I need to lead the user through a 2-3 step process, allowing them to go back or cancel out, each step using data from the previous.
Are you sure it cannot be done? There are various blog posts and articles on the internet that indicate that the TransitioningContentControl is part of the Silverlight for Window Phone Toolkit.
Note that 'Silverlight' and 'Silverlight for Windows Phone' are different things, so you must download the right toolkit.

WP7 and silverlight similar navigation flow

I am developing the application which consists of two pages. The first page is a menu where you can navigat to the second page which is some sort of a map. This application supposes to be run on Windows Phone 7 and Silverligth 4. Everything is built up on the MVVM pattern. For S4 I am using Unity, for WP7 I am creating very simply IoC container.
Getting to the bottom of the matter, I need to provide this application with a common navigation system. I know that S4 supports the new interface INavigationContentLoader which allows us to use our own content loader. Unfortunately, this does not work for WP7.
I am also thinking about taking advantage of the Shell/Frame approach. Basically we have a shell or a frame control with a replaceable content. The navigation in this case is about replacing content. But I am afraid that this solution won't work properly for WP7, since the BACK button will close the app instead of stepping back to the previous page.
Guys, do you have other ideas? What solution do you have? I want to stress that this solution should be consistent with MVVM.
Best regards Jarek
For such a small simple app I'd create my own wrapper around selecting the navigation mode dependent upon the platform.
Something like:
void MyNavigate(uri page)
{
#IFDEF WINDOWS_PHONE
NavigationService.Navigate(page);
#ELSEIF
NavigateTo(page); // or whatever is appropriate to your Silverlight 4 app
#ENDIF
}

Can I use the WP7 Panorama control outside of WP7?

I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.

Can I override the context menu in Silverlight for all browsers that support Silverlight 2.0?

It seems like a common question on Google, but I couldn't find a satisfactory answer (unless the answer is 'no')
I would like to add menu items or show a custom menu when a user right-clicks on my Silverlight app.
The closest thing that I found catches the context menu in IE, but not in Firefox, and Chrome shows the context menu and then shows the custom event.
(The tutorial I mentioned was here
http://silverlight.net/blogs/msnow/archive/2008/07/01/tip-of-the-day-14-how-to-right-click-on-a-silverlight-application.aspx)
Here you have an implementation but it's CTRL+Left click, then you get a context menu (about the text, sorry it's in spanish):
http://www.albloguera.es/?p=29
Another option, is the one pointed out do it via javascript, quite chunky solution, and not sure if now it's working in the current 2.0 version :-(.
Good Luck
Braulio
There is no way to do this natively in Silverlight.
I believe that the Telerik control noted elsewhere uses the HtmlBridge to intercept the context click, then draw their own menu, however it does not appear to be working with Silverlight 2.0.40115 now, so maybe Microsoft have closed that gap.
Having no right click is a design decision based on security concerns, rather than a technical one. However I believe that the Microsoft team are considering allowing context menu's in future versions (perhaps even v3)
I've come to the conclusion that it seems it is possible based on my use of Telerik's context menu which works fine on IE, Chrome and Firefox.
Check it out, http://demos.telerik.com/silverlight/#ContextMenu/FirstLook

Running a Silverlight Website

When using silverlight in a browser is there anyway to switch xaml pages? I'm also wondering how to go about using my encryption class I've wrote in c# to validate users in silverlight. Any help would be much appreciate!
If you're using Silverlight 3 Beta then what you're looking for is the Navigation system using the Frame and Page controls. There are lots of tutorials available online for this.
In Silverlight 2 the easiest solution is to replace the RootVisual with a Panel (like Grid or Canvas) and have your own code to switch the child elements (which are usually your own UserControls).
There's a good tutorial available at Flawless Code
We are using Jesse Liberty's method of doing the page switching in SL2. It is explained here. Jesse Liberty SL2 page switching
It also look or feels a lot like how SL3 does it with the Navigation mentioned above.
Caution: If you do this, the back button on the browser will need to be handled - users will exit out of your SL2 app when hitting the back button. SL3 has built in support for handling and responding correctly to the back button.

Resources