Windows Phone/Kinect style tilt effect for WPF - 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.

Related

How to use the WinRT SwapChainPanel control in a WPF window?

I added references to WinRT dlls to a WPF project and I want to use SwapChainPanel inside of a WPF window.
Is it really possible? For now I cant get it work.
The NuGet package description for Microsoft.Toolkit.Wpf.UI.Controls mentions a SwapChainPanel but I have not found any samples using this control in WPF.
SwapChainPanel : Provides a hosting surface, where Microsoft DirectX swap chains provide content that can be rendered into a XAML UI. A SwapChainPanel element is a key component for an app that renders Microsoft DirectX graphics and then presents those visuals within a XAML page.
It's not currently officially supported - might require some private APIs in Windows, though since Stardock could implement its ModernMix - there might be some way to get it working. The thing is though - you don't have to do that. You can render content with DirectX to a WPF window in other ways. I haven't done that and it might be quite a bit of work to do, but so is anything in DirectX. You can look into DirectComposition or D3DImage class. Perhaps the article on using Direct2D with WPF can be a good sample solution.
You dont have to, as says Filip Skakun, but you can ! Just give a try to SlimDX or SharpDX. They're DirectX's implementations in C#.

Way to make SilverLight progressbar look good?

I have been playing around with the Silverlight progressbar a while and no matter what color (Foreground) I set it too it stays dull and ugly-ish.
I wonder why this is since I'm using Silverlight 5.0 on a windows 7 machine, .NET 4.5 and the windows 7 default progressbar looks stunning.
I searched a lot for it and I did find some commercial solutions where you could pay to get prettier controls, but I don't want to do that (since it may not work for all I know).
How can I make my progressbar look nicer?
Use styles or themes to change the visual of progress bar. You can get the copy of the style of the control in Blend as described here.
you might have a look at the blacklight controls.
In my opinien the loading animation is really nice (It is not a progress bar, but if you add a percentage loaded display it is kind of ;) ). You can find it under animated controls.
Hope this helps.
BR,
TJ

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

Building a presentation display for big screen using Silverlight

Our company wants to replace the powerpoint presentation (company info, etc) displayed on the big screen TV in the lobby with something more professional. I can do that easily using ASP.NET/HTML and JQuery (use JQuery to cycle through the DIVs), but I want to develop it in Silverlight - basically a web-based Silverlight application that fades in/out through the different "slides". It'll be tied to a SQL server database.
I'm new to Silverlight (my 1st project) and am not sure how to proceed (I'm pretty conversant with ASP.NET). I'm not sure which container (stackpanel, grid, canvas) to use in building the slides. I tried using stackpanels but couldn't get it to fade from one stackpanel to another.
Can someone please help me out??
Thanks.
My answer at "Animation target not specified issue - Silverlight storyboards." will do the trick at
Animation target not specified issue - Silverlight storyboards
When placing your Dia in a Grid you can easy use the PlaneProjection to move it around animating the LocalOffsetX property of the PlaneProjection for example.
<Grid>
<Grid.Projection>
<PlaneProjection />
</Grid.Projection>
<Dia />
</Grid>
If you need more explanation, let me know. I will be happy to elaborate in more detail.
Please let me know if this helped you.

Is there a WPF equaivalent to System.Windows.Forms.Screen?

I'm trying to create a WPF window that will encompass the entire Desktop working area. In WinForms I'd do this by getting the Union of all the bounds in System.Windows.Forms.Screen.AllScreens.
Is there an equivalent type or other mechanism to get the bounds of the entire desktop in WPF or do I need to use the WinForms type?
Try SystemParameters.VirtualScreen* (Top, Left, Height, and Width) properties. http://msdn.microsoft.com/en-us/library/system.windows.systemparameters.virtualscreenheight(v=VS.100).aspx
Don't use winforms api because it doesn't take into account the fact that WPF's measurement units are not pixels. I came across this issue just recently because I'm losing my vision and have my monitor set to a higher dpi. The codebase I was working on used the Winforms Settings and the UI was larger than my screen.
If you're going to use the winforms api. Look at this blog post on calculating the DPI factor.
I have successfully used WpfScreenHelper 0.3.0.0, currently on Github or Nuget,
https://github.com/micdenny/WpfScreenHelper
It does what the .NET framework should have done so many years ago.
I needed to check if some coordinates exist on any screen in WPF, as in these:
Very germane: Determine if an open WPF window is visible on any monitor
Forms-only and inadequate WPF suggestions: Determining if a form is completely off screen
Just use WinForms. I do not think there is a direct WPF equivalent.
You could try SystemParameters.VirtualScreenWidth and associated parameters. That might not provide as good as a result as continuing with the WinForms API.
The only downside I can see with the WinForms type is an extra dependency and the larger working set related to that.

Resources