ANIMATING Page Transition in WP7 in C# - silverlight

Can anyone tell me how to animate a page transition in windows phone 7 by using C#. I have seen some samples which explain this in xaml. But I need to do it in C#.

you can follow this awesome tutorial: http://windowsphonegeek.com/articles/Windows-Phone-7-Navigation-Transitions-Step-By-Step-guide

Related

Build similar Windows Phone 7 animated buttons

Does anyone know a tutorial an how the buttons from the main screen of the Windows Phone 7 were build in Silverlight ?
Thanks.
Take a look at the HubTile control from the wp7 toolkit. It might be what you are looking for. :)

Convert Silverlight App to WPF

I need to convert a Silverlight App to WPF (to finally run it on Microsoft Surface 1.0).
I didn't write the original solution and it is quite big. I've never worked with Silverlight and I'm just a little bit familiar with WPF.
Can you offer some advice on completing this project?
Here's my current plan (high level view):
Recreate all Silverlight projects in WPF (User Control in Silverlight = WPF User Control Library ?)
References are not the same so I'll need to make some changes ... I think :)
Hope all controls are compatible with WPF ...
Have I missed something big? Is something wrong? Incomplete?
I'm open to all your suggestions and advice!
Any development tips ?
I recently converted a Silverlight app to WPF. You can find my notes on how I did it here:
http://robertsmyth.blogspot.com.au/2011/12/migrating-from-silverlight-to-wpf.html
Hope it helps you.
"User Control in Silverlight = WPF User Control Library ?" Not exactly.
which version of silverlight do you use? Most difficult issue I have faced while porting WPF to Silverlight was with converters. Silverlight 4.0 or lower doesn't support Ancestor RelativeSource Binding. But supported in Silverlight 5!
Hope this link will help you. WPF and Silverlight 2 Compatibility

Windows Phone/Kinect style tilt effect for WPF

Anyone know how to go about achieving the tilt effect you see on Windows Phone 7 tiles or on the tiles in the Kinect UI on XBOX in WPF?
Sample screenshot:
There are a number of libraries that do it for Silverlight but all rely on the PlaneProjection which isn't in WPF.
Here is a link that shows what I mean and how to do it in Silverlight. http://www.scottlogic.co.uk/blog/colin/2011/05/metro-in-motion-part-4-tilt-effect/?utm_source=Silverlight-Zone.com&utm_medium=SilverlightZone&utm_campaign=kunal2383
Thanks
Finally I created my own Tilt effect behavior for WPF, take a look to my post and tell me what you think.
I have updated it with KeepDraging Property and TiltFactor Property and the possibility to add it directly to the panel. I hope you enjoy it now
The tilt effect on WP7 relies on PlaneProjection which is exclusive to Silverlight.
There are several projects out there that have attempted to port PlaneProject to WPF but the tilt effect itself has not been ported yet.

WPF Menu on Winforms

Is it possible to show WPF Context menu on WinForms?
If yes, how could we do that?
OK, so I've found the answer myself... (I tried to give a 50 point bounty, but I don't think I can award myself :P)
We have a lot of legacy WinForms... forms... still in our project at work. And here's the secret code that is needed to display a WPF Context Menu in a WinForms project!
var myMenu = new System.Windows.Controls.ContextMenu();
myMenu.Items.Add("One");
myMenu.Items.Add("Two");
myMenu.Items.Add("Three");
myMenu.IsOpen = true;
Tada!!! - There is no secret code needed... you can write this code in a WPF App or a WinForms app and it works the same.
And there's your answer :)
You can mix the 2 technologies using WindowsFormsHost (WinForm inside WPF window) and ElementHost (WPF inside WinForm window).
You will not encounter the Airspace issue as you are adding a WPF menu into a Winform application. But you will if you create WPF windows with Winform UserControls. This Blog post has some ideas about solving it, but it is not pretty.
I don't know if it can be done, but this article might help point you in the right direction. As a WPF developer, it seems strange to me to want to mix winforms and wpf, but i can see the case for re-use.

Windows Phone 7 Charting/Graphing Controls

We're working on a Windows Phone 7 prototype application and we need a Graphing/Charting control to work with. We looked at the Silverlight Toolkit, which has some controls that look like they would work great. However, we can't get that to work. Whenever we add a control to the XAML from that toolkit, it will throw an exception when trying to load the XAML at runtime, even though it appears to work in the designer. I think that it's because there's some dependencies that the phone doesn't actually support.
Does anyone know how to fix the problem or know of charting software that works on Windows Phone 7?
Here's an example of code that doesn't work. We downloaded and installed the 4.0 beta of Silverlight Toolkit. Added the DLL as a reference. Added this to import the namespace:
xmlns:c="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"`
then added this to make a chart:
<c:Chart>
<c:PieSeries>
<c:PieSeries.ItemsSource>
<l:IntList>
<sys:Int32>23</sys:Int32>
<sys:Int32>2</sys:Int32>
<sys:Int32>1</sys:Int32>
<sys:Int32>34</sys:Int32>
</l:IntList>
</c:PieSeries.ItemsSource>
</c:PieSeries>
</c:Chart>
the designer shows the pie perfectly, however when I try to compile and deploy it throws an exception saying that it can't find the MainPage.xaml. Which leads me to believe that MainPage.xaml isn't compilign correctly (not sure, as I'm still a newbie at Silverlight)
Here's the exception:
System.Windows.Markup.XamlParseException occurred
Message=2255 An error has occurred. [Line: 36 Position: 2]
LineNumber=36
LinePosition=2
StackTrace:
...
on this line:
System.Windows.Application.LoadComponent(this, new System.Uri("/Twitpic;component/MainPage.xaml", System.UriKind.Relative));
You can probably reuse some of the things provided by the silverlight toolkit, which is open source:
http://silverlight.codeplex.com/Wikipage
You might have to recompile some stuff against the win phone APIs, but it should work :-)
It looks like someone else has had the same issue as you and solved it by using the Silverlight Toolkit version 3
http://silverlightfeeds.com/post/2502/Windows_Phone_7_RTM_charting_using_the_Silverlight_Control_Toolkit.aspx
Just found these free WP7 charts: amCharts for Windows Phone 7
If you are looking for great charting on WP7, I suggest Visifire. Note that its a commercial offering. Has gesture support too! I've seen very less charting vendors who've optimized charting for mobile-form-factor like these guys do.
You can try MS Toolkit, if you are looking for free basic charts.
Playing around more, I was actually able to get Visifire to work. Just had to browse and add the reference to System.Windows.Browser. I don't know if this is the best way to make it work. But it'll do until the Silverlight Toolkit gets updated.
Macadamian team developed and gives for free a Chart Control. You can pick it up at http://themobileexperience.macadamian.com/2010/05/chart-control-for-windows-phone-7.html
Ani
Just a quick plug for my own graph control I recently released to open source:
Check it out, it scales to hundreds of thousands of points and responds to pinch,zoom,translate and tap gestures:
http://touchgraphwp7.codeplex.com/
A couple of options worth a look.
David Anson's blog and thread posting on charting.
Chart Control for Phone
Why didn't I think of that in the first place? [Windows Phone 7 Charting example updated to include reusable, platform-consistent Style and Templates] - Delay's Blog
And a commercial offering.
Silverlight, WPF & WP7 Chart Controls
This one too
http://www.visiblox.com/examples

Resources