I need a taper-effect on my transform in WPF.
Charles Petzold wrote some nice stuff about it for example :
http://www.charlespetzold.com/blog/2009/07/Using-the-Matrix3DProjection-Class-in-Silverlight-3.html
But now it seems that the used Matrix3DProjection class only exists in Silverlight, and NOT in WPF..?
(Why would Mirosoft think it could only be useful in Silverlight and not in WPF ?)
Is there any way to get around this ?
Matrix3DProjection is in Silverlight because Silverlight doesn't have full 3D support like WPF has.
You can do everything by using the 3D support.
Yes, Matrix3DProjection is easy and "real" 3D is really difficult and I personally struggled to do something in 3D that would have been easy with Matrix3DProjects and I hope Matrix3DProjection will make it into a future version of WPF - but now that you know the reason don't you feel better? (I don't)
Related
Not sure if this an appropriate forum for this, but I need some guidance from those who are further down the road than I am with WPF.
I've used Telerik Winform controls for a years and have mixed feelings about them. They look good, but they are deeply nested, have a steep learning curve, and sometimes don't perform the best. For example, just working with a RadWindow in the WPF designer, it's slow compared with native wpf controls.
I like Caliburn.Micro MVVM framework and MahApps metro styles, but to keep the same look and feel for a ribbon bar I'd need to use another third party tool (like Fluent) or just use the Microsoft Ribbon View control and figure out how to use templates and styles myself (or find an existing metro template for it).
I tried to combine Telerik and Caliburn but had trouble getting them to work. There is a Caliburn Telerik library but its based on Caliburn Micro 1.5.2 and I'm trying to use Caliburn.Micro 2.0.2. Problem is I always get an aero-looking full window title bar and frame wrapped around the Telerik styled window.
I just don't know enough about conventions and such to make it all work together. And frankly, not sure it's worth the trouble. I'm looking for a more streamlined approach that lessens my dependence on pricy and heavy third party controls.
So, I'm looking for guidance on whether I should use straight Telerik, straight caliburn or go through the work of trying to get them to work together.
What I would prefer is to use Caliburn as the mvvm framework with a layer of styling, like what MahhAps provides. And for those controls that aren't styled, like the Ribbon Bar, to either use Microsoft's ribbon bar and find templates and styles that would work or maybe a 3rd party control like Fluent. But would I be getting in over my head in trying to learn templates and styles?
Sorry for the ramble, but I'm frustrated and need some help in working through this. Thanks.
I found a great resource that maybe others new to WPF and struggling with similar questions would benefit from: MarkPad, a Code52 project on CodePlex.
It's written in WPF using Caliburn Micro MVVM framework (although it's version 1.5.2 rather than the current 2.0) and MahApps metro styles with some "roll your own" windows. It's a great looking app with the kind of simple menuing system I was looking for AND an MDI implementation. It's also a good example on how to organize a somewhat complex WPF application, something I was also unsure about.
It answers the question: Do I need to use Telerik? The answer is a definite NO. It's a great learning tool for me and maybe will be useful to others.
Can any of you tell me of a place that I can download a fancy rotating progressbar? Or else to use WPF to develop one? Problem with that though is I don't have any WPF templates. I am looking for a quick solution also, with little development required.
Basic introduction to templating, has a few examples for ProgressBars as well: MSDN
If you want an indeterminate rotating thing that is fairly easy (e.g. here), but for it to fill up that might be quite difficult.
I'm a newbie to WPF and I'm developing a brand new windows desktop application and I would like your opinion on what WPF framework I should use. I know this question has been asked before, but the last question was asked at least several months ago. A lot has changed since then.
Right now, I'm using MVVM Light which is more of a library than an actual framework, as the name suggests. I’m looking for something more comprehensive. I prefer a framework that I can use on future WPF projects. Consequently, it should be general purpose and productive.
Any insights or suggestions?
If you are a newby I would suggest that you try to use PLAIN WPF first to get a feeling for it instead of right away extending WPF with other frameworks.
Your title is a bit confusing. WPF is just a graphics/UI layer. WVVM is a Model View ViewModel framework, for implementing a MVVM pattern using WPF ( or Silverlight ).
So, are you asking what design pattern you should use for your WPF application? ( As in MVC, MVVW, MVP, etc... ) Or are you asking which MVVM frameworks are compatible with WPF?
Ugh, acronym soup.
As to my answer, if you are new to WPF and want to learn WPF, I would start with no framework, you can always refactor later once you have a good solid grasp of the underlying technology.
It's definitely on the heavy weight end, and plenty of people will warn you about it, but you seem to be asking for CAG
http://compositewpf.codeplex.com/
It's a pattern that comes with a sample implementation that you can bend into your own. For example, it comes with Unity for IoC, but you should be able to put in another IoC container.
The download comes with a lot of samples for both Silverlight and WPF.
Caliburn (http://caliburn.codeplex.com/) handles a lot of shortcomings of the WPF inherent model (like writing a ton ot stupid routing code for events) and introduces MVVM ;) My bet ;)
You might have a look at the WPF Application Framework (WAF). The sample applications show:
View composition
UI Workflow (Wizards)
Command binding / Shortcut Keys
MVVM pattern, Unit Testing
Validation
Entity Framework
Open/Save FileDialog
Print Preview / Print Dialog
Localization
I'm porting my application from Winforms+XNA to WPF (+ XNA?) and I would like to know if the combination WPF + XNA makes sense or not. If it brings some advantages or if it is rather a bad choice.
A few points about my game:
It's a desk game with simple 2D animations (movement)
Main window contains panels like available games/players etc. + console.
I would like to add some fancy scenes to my program (at end of game, ...)
http://www.codeproject.com/KB/WPF/XnaInWPF.aspx is the code I would like my program base on.
So the appearance is quite similar to a chess program.
Thank you for suggestions!
The approach in that article works quite for XNA/WPF integration. There really aren't major issues, and WPF will perform quite well.
That being said, depending on what you're doing, you could potentially do your graphics directly in WPF without XNA - I just mention this, since WPF provides quite rich 2D graphics, and is very easy to use. If you're working in 3D, however, XNA is far superior.
If you want to do more elaborate integration, there are still some issues. Unfortunately, XNA uses the DirectX Managed Pool for resource management, which means it's still (so far) incompatible with D3DImage. There is no way to do fancy WPF brush style usage (like you can with DX) safely with XNA.
Look at this : How well does WPF blend with XNA in real life?
This question already exists:
Closed 14 years ago.
DUPE: When is Windows Forms the correct choice vs WPF?
We have to decide these days whether or not to go with WPF as a platform for building our next generation of our product.
Personally I am a little afraid of using this technology especially because of performance and because it's not mature (I am not sure about the quality of the UI editors such as Blend).
Personally, I absolutely adore WPF.
It requires a fundamental shift in thinking from Winforms. Winforms you drag and drop stuff on to a form. That gets you 80% of the way really quickly and easily, but when you need to move outside of the things that WinForms explicitly covers, you enter a world of pain.
In WPF, first thing you do is turn off the visual editor. The code for your UI goes from an ugly mess to something beautiful. Also, it is remarkably powerful and flexible, once you get the hang of it the things you can do are absolutely amazing.
The downside to WPF is that it is more heavy then WinForms, and the learning curve is relatively huge. However, it is the way of the future, and unless it is a trivial app you are making, I would choose WPF hands down.
If you don't need a very glossy UI with animations and so on, I see little reason to jump to WPF... just yet.
If you are worried about performance, you should check these MSDN pages:
Windows Presentation Foundation Performance
My guess is that WPF is even outperforming Winforms as long as there is appropriate DirectX hardware because rendering can be done by the GPU directly then.
Considering MS is building their next version of VS with a WPF based code editor, I find it hard to find support for WPF not being 'mature' or having performance issues.
I would say if you are able to migrate anyway, you might as well upgrade to increase the longevity of your code base. If your code is written properly in Winforms, it should not be very difficult to start moving this forward into WPF.
I started about 10 weeks ago teaching myself WPF, and then in the last 2 weeks I have actually written an application in WPF.
I came from ASP.NET and I love WPF. I love the XAML markup, it just makes more sense than dragging items over and making sure they are in the right place in a WinForm.
The styling is easier in WPF, you can quickly make a border with rounded corners.
Using Expression Blend you can design a really nice interface with animation.
I developed a WPF app on Vista (home), and XP (work) and they both look really nice.
I have been very pleased with WPF and would not go back to WinForms.
My sense would be that if you are happy with the look and feel of winforms, then stick with it. If you think you will be doing any visual customization, then go WPF. But then I have been working with winforms for a long time and WPF very little. If I was starting out, I would probably focus on learning WPF since it really is much more flexible