I am a Silverlight developer and in Silverlight we made use of PlanarProjection to create such effects. Infact this is the article along with demo project in Silverlight by Mike Taulty:
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/27/silverlight-3-simple-flip-control-built-on-planeprojection.aspx
How can we make such a realistic control in WPF because there is no PlanarProjection (2.5D) in WPF4. Can you provide me any code or guideline or sample project along with source code?
WPF lacks the PlaneProjection of Silverlight. It's annoying that these incompatibilities exist, but admittedly the problem is usually Silverlight lacking a WPF feature. So this time for WPF developers the shoe is on the other foot!
If what you want is PlaneProjection, here is an article that implements a feature with similar capabilities:
PlaneProjection in WPF (previously, link is now dead)
which itself also references some other attempts.
But if what you want is a WPF dual-sided content control with flipping similar to the article you linked, you can use Josh Smith's ContentControl3D:
Introducing ContentControl3D
Rotating WPF Content in 3D Space (The Code Project)
This control can flip front and back content in a very configurable way. I wouldn't be surprised if Mike Taulty's implementation was inspired by it.
Someday WPF may have PlaneProjection and then the same technique will work for both Silverlight and WPF. Until then, you can easily adapt the simple PlaneProjection flipper to use the same API as ContentControl3D as a compromise.
Related
I have created a trading application in WPF, for which I am ashamed of it's shabby look since it is far from being impressive.
I would now like to redesign the user interface for my application, and make it similar to an example screen shot of a trading application
Can someone please advice tips on what path I should follow to make a UI of similar nature? eg., if there is an open source C# WPF application which has a similar look and feel, that would be great. or if there is a library which has cool listview, scrollbar and progress bars, ..
PS: I do not have microsoft blend
You should follow the MVVM pattern for creating UI's for wpf application
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx#id0090025
Refer the josh smith blog for WPF MVVM
http://joshsmithonwpf.wordpress.com/a-guided-tour-of-wpf/
Hopefully you would have completed your application by now. If not:
Try understanding the sample Stock Trader Reference Implementation application by MSDN built using WPF, MVVM, and Prism and you would get a head start for creating your kind of UI and implementation.
You can call it as a suggestion not an answer exactly. But posting for those who are new to WPF and learning screen designing or patterns. According to my experience with WPF I can say first get you hands dirty learn how binding works because that is the base of WPF.Simpler way to learn how binding works is learning how to bind controls with other controls. Then use simple classes and learn MVVM. Next go for command binding within MVVM perimeter. Keep the prism to the last, because you need good understanding of binding mechanisms, commands, MVVM and more to understand PRISM. After this you will have idea of how these things work together and will help you figure out how to play with data and screen together and design nice screens. Again, Not an answer to the above question. Just suggestions to those who are learning WPF and landed here looking for WPF UI designing.
I have seen some applications having such a rich layout that a person starts hating desktop applications like traditional c#.I was wondering how to make applications having GUI like this is it possible to make it in c#?
According to the title, this uses WPF, which can be used with C# and/or XAML. It can actually be used with any .NET language.
The problem is not the programming language. What you need is:
a UI framework that allows rich layouts (in C#, you'd use WPF),
and, even more important, a designer. With "designer", I mean a human, not a tool. If you look at your screenshot, you will notice that the colors of the background image match those of the buttons, that the buttons match the content circle, that the header of the content circle ("Getting Started") matches the header of the window.
So, really, this is not a matter of programming language. What you need is a design. Implementing it is the easy part (at least with technologies such as WPF).
Look at the window title... "Xceed DataGrid for WPF Recource Center". I might be going out on a limb here, but I'm guessing that it was written using WPF and C#.
Only the developers know for sure! Okay, the window title gives it away
Quick guess, they're using Windows Presentation Foundation, which isn't a language, but part of the .NET Framework (starting with 3.0).
Adding some resources here . . .
You have to use WPF for that, and probably with some custom controls.
For WPF have a look here:
Wikipedia
MSDN
Expression Studio
For already made controls you can check:
Xceed
Infragistics
Devexpress
There are a lot more out there even a lot of free ones. All the above are commercial but i think they have a few free samples.
So... I want to make a game, and I want to write it in C#. In the past, I've made a mario clone using C++ and OpenGL. I quite like OpenGL, but I don't know how well it's supported inside C#/WPF. Also, it might be beneficial to use an actual game library? I guess XNA is the game library for C#, so maybe I'll invest a bit of time learning that.
However, I want to use WPF form controls for my level editor... is there any way that I can embed an XNA (DirectX?) window inside a WPF app?
Specifically, I don't need any buttons or things inside the XNA/DirectX widget, just around it, so no mixing required...just need to get a graphics widget in my WPF form.
Nick Gravelyn explains how to do it on his blog.
Although, if it's just for an editor, you may find using WinForms is easier and better supported.
First of all, you should ask this on gamedev.stackexchange.com. But I've seen a tutorial embedding XNA.
You should check this question and this page. They are on Windows Forms, but they'll help.
Also check this and this articles.
Keep in mind one thing. XNA is meant to be used for the whole game, integration would be useful on making level editors like you say, but not for a full game.
WPF uses DirectX, and you can do direct "interop" here is a codeProject article on the subject. Here is an article i dug up where the author is using win-forms and WPF controls in an XNA project. Might be worth a look for you.
There are some projects that could use WPF at work, for the sake of adopting new technologies.
But the problem is, I can't jump start WPF easily. I recognize the learning curve is steeper than Winforms. Though even with Winforms one can start doing UIs and programmatically customize them in a day.
So the problem is:
I don't have any resource to quickly learn the fundamentals of WPF at work. I can't read a book from cover to cover before I do the simplest of things.
Most tutorials on the net, just does things that excludes the fundamentals. i.e. they post partial xaml code I can't even put into my xaml code correctly (VS highlights them in red).
I can't justify using WPF over Winforms where there is no significant gain for prety much all projects I can think of. And the learning curve just makes things worse.
So I can't suggest my manager to use this tech over the traditional Winforms, but I want to.
Is there a guide or a tutorial on the net, or a video that explains the fundamentals of WPF so I can explore everything else on my own, except the more complicated tasks?
Fundamental of WPF video from Mix07.
Windows Client .NET get started section has lots of WPF Videos.
Channel 9 WPF content.
Windows Presentation Unleashed is a very good book.
MSDN content for WPF.
MSDN magazine articles on WPF.
Well, the basics are there. You can drag and drop controls onto a XAML surface in VS.NET 2008 just about as easily as you can with Windows Forms. Sure, there's the binding syntax stuff, but getting started isn't too bad.
But you DEFINITELY need to buy a good book on it. You don't need to have read it from cover to cover in order to get started. A decent book will have you up and running in a chapter or two, and you can take it from there. Just make sure that whatever book you buy, it was published after .NET 3.5 (and SP1 preferably) came out.
Also, understand WHY you want to use WPF. Is it just because it's new? Then you're right, that's not a good enough answer. WPF does have some big benefits though:
A powerful binding expression syntax that actually works
No need to repaint your own windows in response to WM_PAINT messages
_ (corrollary to the previous point) It's much easier to owner-draw and make your own controls
MS is spending a LOT of effort to actually develop it
MS is spending minimal effort on developing WinForms
If you need 2d/3d data visualisation WPF will pay by itself quickly and it's very evolving...
Personally I've got in that boat because all 3d hardware acceleration (opengl) wrapper in c# are dying so the solution for a maintened 3d looks like wpf or xna...
I'd suggest you get either expression blend or vs2010 beta ... vs2008 just don't speak wpf enough to help someone who doesn't know exactly what he's trying to do.
I am about to write a front end app, which will be used as a media center app. It will plug directly into a high definition TV. Essentially transforming my laptop into a media player. While this concept is not new, I want custom functionality, so this is why I am not reusing existing products.
I'm a C# developer, so the app should ideally be written in C#. And there is 1 other consideration, I need to accept input via the MCE Remote.
I was considering using Silverlight for this. Would you recommend this? Or any other recommendations for frameworks before I begin planning around this.
Thanks in advance.
This is the type of stuff that the Windows Presentation Foundation was meant for. You'll get a lot more access to the hardware than Silverlight would provide (I.E. that MCE remote you mentioned). You mark up your UI with vector graphics/XAML, and then perform the logic with C#.
EDIT: WPF also has support out of the box for animations which can make your UI a lot more interactive.
EDIT 2: Scott Hanselman has written a really cool application called BabySmash and posted the source online. It basically intercepts keyboard input and shows shapes and sounds on the computer. It's a good "child-proofing" method for your PC. The code could provide you with some insight into WPF and how to do the animations and interactivity that you're looking for.
Is this a desktop app? If so I would use WPF. Silverlight is a subset of WPF, so using WPF you could potentially do more.
Silverlight or WPF, if you want some extra power. Both have a similar programming model (with XAML and code-behind) so you might be able to start with Silverlight and move up to WPF if you need.
The VLC api might be useful for playing your media, someone has created a C# wrapper for it:
http://wiki.videolan.org/.Net_Interface_to_VLC
WPF is certainly the way to go, and for playing media check out the excellent WPF MediaKit: http://wpfmediakit.codeplex.com/ I've used it successfully in many projects.