How to design your interface?

Docking/MDI for WPF Forum

Posted 14 years ago by Kasper
Version: 9.2.0515
Avatar
I have no WPF experience, but since I'm such an Actipro fan, I knew that if I choose to migrate, I would likely end up using the Actipro WPF suite and thereby the docking controls. So I downloaded the trial and started VS 2008... and then I was kinda lost. The designer support seems non-existing when you come from the WinForms world. I couldn't figure out how to add new Tool windows and areas. After reading the documentation, it seems that you can either load one of the pre-defined layouts or you can start typing your layout in XAML - is that really the WPF way? No dragging and dropping my various Actipro controls around? It seemed like a huge step down, so hopefully I'm just missing something - how do you really design your UI with WPF and the Actipro controls? :)

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kasper,

While most of our other WPF controls do have a lot of designer functionality, unfortunately we haven't gotten a chance to implement it for Docking/MDI as of yet. That's something that is on our TODO list. In the meantime you will have to create the docking layout via XAML, which really isn't too hard at all. Just take a look at the documentation on control hierarchy and look at our many samples and that should get you going.


Actipro Software Support

Posted 14 years ago by Kasper
Avatar
Okay, I guess I will have to look into it some more. Last time, I spent a couple of hours and got nowhere, which seemed like quite a letdown, for someone who has been using visual designers for 12 years now :). One of the things that really puzzled me, was that I couldn't seem to adjust the sizes of the tool windows etc. For instance, if I had a layout with one tool window to the left, one to the right and a document area in the middle, I wasn't allowed to decide how big each of the three elements should be, compared to each other. Or at least, so it seemed. I will likely give it another try, but if you have any tips for me, I would be happy to hear them :)

Also, your company seems to be very into WPF, with the WinForms products down prioritized a lot, but for me, I still can't seem to find anyone who can tell me why WPF is better than WinForms. Sure, it's a newer technology, but what are the advances? What do I get by migrating, which will be a whole lot of work? To be honest, the only reason I'm looking into it, is because your controls are lagging behind on the WinForms platform, with no timeline telling me when they will be brought up to the same level as your WPF controls, if ever. It's not a critique at all, I can certainly understand you betting on the technology you think is the best, but what are the advantages to an old WinForms programmer like me? I hope you can clarify things for me here, because typing my UI in XAML is really not that hot to me :D
Posted 14 years ago by SledgeHammer01
Avatar
I came straight from MFC/C++ with a very short stint on Winforms. I thought Winforms were horrible, so I stayed away. The performance was really poor, lots of flicker, etc. WPF is all hardware accelerated, so there is no flicker and performance is great. Some things that were hard / impossible in Winforms / MFC are super easy in WPF. Other things that were super easy in MFC/C++ and Winforms are very difficult in WPF. Not difficult in the sense of writing complicated code, but difficult in the sense that you can spend many, many hours finding which XAML tag to modify and how to modify it. For example, selecting the first item in a list box when your window pops up used to be a one line change... in WPF, its about 10 lines of code that involves event handlers, etc.


[Modified at 03/26/2010 12:30 PM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kasper,

For adjusting initial sizes, take a look at the last section in this documentation topic:
"Docking & MDI Docking Window Features / Lifecycle and Docking Management"

Some of our samples show use of the attribute too.

WinForms isn't going away any time soon however Microsoft has made it pretty clear that long term, the future of development is in WPF/Silverlight. WPF and Silverlight are separate entities right now but will likely merge at some point in the future. The biggest benefit of them is the way the UI can be completely separated from functionality and data. Given any sort of data, you can make things look however you want with very little difficulty. Plus there is almost no reliance on Win32 other than at the root Window level. Every control has been natively built from scratch using WPF's base classes. Therefore we aren't stuck with behaviors and APIs that were made 15 years ago.

This article does a good job of explaining benefits of WPF:
http://msdn.microsoft.com/en-us/magazine/cc163662.aspx

Consider where Microsoft is taking their own applications. VS 2010 is mostly a WPF UI. Expression products are all WPF. Microsoft has open source toolkits for both platforms. As cloud computing becomes more mainstream, Silverlight and XBAP apps will become more important.

The downside of course is that WPF/Silverlight do have a bit of a learning curve compared to WinForms. Sometimes you may spend hours figuring out how to do something, that once you know how to do it is pretty easy. However if you are able to spend some time to learn it, you'll find that you have a lot more capabilities and will enjoy working in them much more.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.