junio 07, 2011

Silverlight dynamic panel component

Well this component is not mine... I downloaded it from a webpage but it was very hard to find it... it seems like codeplex doesn't have it anymore...

Download DLL

The trick is...
adding this to your xmlns lines...

xmlns:blackcontrols="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"

and this to your layout...

<blackcontrols:DragDockPanelHost x:Name="MainContainer"
                                         VerticalAlignment="Stretch"
                                         HorizontalAlignment="Stretch"
                                         Background="Transparent"
                                         MinimizedPosition="Bottom" />

Then in your code behind, you'll need to create as many panels as you need... here is an example of what I added...

this goes in your using section....
       using BIOnline.Components.DataComponents;

this is what actually creates panels...

            Blacklight.Controls.DragDockPanel Panel1 = new Blacklight.Controls.DragDockPanel();
            Blacklight.Controls.DragDockPanel Panel2 = new Blacklight.Controls.DragDockPanel();
            Blacklight.Controls.DragDockPanel Panel3 = new Blacklight.Controls.DragDockPanel();
            Panel1.Header = "Hours by Team";
            Panel2.Header = "Indirect Hours by Team";
            Panel3.Header = "Employees";
            MainContainer.Items.Add(Panel1);
            MainContainer.Items.Add(Panel2);
            MainContainer.Items.Add(Panel3);


and that's it... any comments????

No hay comentarios:

Publicar un comentario

Share or claim... =P