1

All, I would like to implement the ability to float certian sections of a windows form. What is the best way to achieve something like the following...

This is before the float (the electric blue panel indicates the section being moved).

Before Float

This is after the float.

After Float

Can I make the MDI container local to a certian panel of a given form?

Sorry for the poor question, I have not done this before.

MoonKnight
  • 23,214
  • 40
  • 145
  • 277
  • There are 3rd party controls, IE: DevExpress, Telerik that have docking controls which allow for this functionality. I'm not sure if the Msft controls have it out of the box though. – mservidio May 11 '12 at 12:41
  • Use a docking library for WinForms, it's not a trivial task if you want to manage everything users will want/need (and various OS versions/settings combinations) – Adriano Repetti May 11 '12 at 12:41
  • Thanks but this project specifically requires _no_ third party libraries. Any other ideas? Thanks very much for your time lads... – MoonKnight May 11 '12 at 12:44
  • 1
    if you dont want third party things youll have to do it yourself, this functionality itsnt implemented for traditional controls – RhysW May 11 '12 at 12:57

2 Answers2

3

You need docking manager. There are a lot of them out there in market, payer or not.

For example:

DockPanel Suite

Tigran
  • 61,654
  • 8
  • 86
  • 123
  • Thanks for that this will definately come in useful! I have just attempted to use the control by adding a reference to the .dll in my project but nothing was added to the toolbox. i have tried to add componants to the toolbox but I cannot find the DockingControls, can you advise? Thanks very much for your time. – MoonKnight May 11 '12 at 13:06
2

If you are designing something new, better use WPF and go with WPF Controls. It is the future! :)

And you can try out free AvalonDoc

Bek Raupov
  • 3,782
  • 3
  • 24
  • 42
  • 1
    Erm, wait, Metro is the future. Same kind of problem, expecting somebody to completely rewrite the UI of his app just isn't a practical answer. – Hans Passant May 11 '12 at 13:04
  • I agree. I wish that was the case, bing bang might not always work or possible, but we have done it gradually (i.e. hosting windows forms inside WPF or the other way around) and most of the new UI we try to do in WPF, otherwise you will never get to use it – Bek Raupov May 11 '12 at 13:06
  • Metro is still using WPF/Silverlight under the covers i would have taught ? – Bek Raupov May 11 '12 at 13:07
  • @HansPassant, do you know a native way to do something like the above? The docking approach is fine but as an absolute minimum I want to create multiple tabs at runtime, each containing the same set of controls (a `DataGridView` being the main player). I want to avoid doing to much control construction and manipulation etc. Thanks. – MoonKnight May 11 '12 at 13:10
  • 1
    No, WPF and Silverlight are not supported in WinRT Metro apps. You picked the wrong future. – Hans Passant May 11 '12 at 13:10
  • 1
    @Killercam - of course you can write it is native code. You can write it in Winforms too. Or whatever you like. The limitation you set yourself is that you have to write a *lot* of code and you don't know how to get started. The least you could do is actually *look* at the source code for such a library to know what you are in for. – Hans Passant May 11 '12 at 13:12
  • 1
    @HansPassant Thx for warning :) I was thinking that once I know WPF and that should be enough. Looks like maybe not! :) – Bek Raupov May 11 '12 at 13:14
  • @HansPassant There is hope for the future. Up to now it seems that not so many RT apps exist, and the existing ones are mostly only small programs. Maybe we can live a few more decades with native programs. Sells are low, so hopefully RT is dead. – Offler Jun 05 '13 at 08:08
  • Hmm, Windows version 1.0 sold very poorly as well. – Hans Passant Jun 05 '13 at 08:45