SIGN UP MEMBER LOGIN:    
ARTICLE

Blacklight Controls in Silverlight

Posted by Priya Linge Articles | Silverlight with C# August 02, 2011
This article demonstrate how we can use the Blacklight controls in Silverlight
Reader Level:
Download Files:
 


Introduction

This article demonstrate how we can use the Blacklight controls in Silverlight.

We can use the blacklight controls in Silverlight, they are open source controls.

Blacklight is designer focused controls for Silverlight.

We have to download the blacklight DLL in our application (Blacklight.Controls).

With the help of a blacklight assembly, we can use the controls in our application.

Step 1: Blacklight Controls

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

1. DragDockPanel:


Blacklight DragDockPanels are basically draggable containers.

2. DragDockPanelHost:

Used to place the dragdockpanel in host as below.

    <blacklight:DragDockPanelHost Margin="10,134,12,41">
   
           
<blacklight:DragDockPanel Style="{StaticResource DragDockPanelStyle}" Header="Customer Details">
                <twilight:TwilightBlueTheme>
                <Grid Margin="15">

                        <data:DataGrid x:Name="ProductsGrid"

                        AutoGenerateColumns="True"
                                  ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility
="Visible" >

                        </data:DataGrid>                       

                    <data:DataPager PageSize="10" Name="productpager"  />
                </Grid>
                </twilight:TwilightBlueTheme>
                <blacklight:DragDockPanel.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </blacklight:DragDockPanel.Background>
            </blacklight:DragDockPanel>
</
blacklight:DragDockPanelHost>


Step 2: Use Blacklight controls in Silverlight application

We can bind the datagrid, images or many others controls in dragdockpanels.

  xmlns:blacklight="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
      <blacklight:DragDockPanelHost Margin="10,134,12,41">

               <blacklight:DragDockPanel Style="{StaticResource DragDockPanelStyle}" Header="Customer Details">
                <twilight:TwilightBlueTheme>
                <Grid Margin="15">

                        <data:DataGrid x:Name="ProductsGrid"
                                  
                        AutoGenerateColumns="True"

                                  ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" >

                        </data:DataGrid>                       

                    <data:DataPager PageSize="10" Name="productpager"  />
                </Grid>
                </twilight:TwilightBlueTheme>
                <blacklight:DragDockPanel.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </blacklight:DragDockPanel.Background>
            </blacklight:DragDockPanel>
            <blacklight:DragDockPanel Style="{StaticResource DragDockPanelStyle}"
                                              Header=" Customer" Background="AliceBlue">
                <Grid Height="163" Width="256">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="10" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Image Source="/SilverlightApplication1;component/Images/customer1.PNG" Margin="0,1,0,70">

                    </Image>

                </Grid>

            </blacklight:DragDockPanel>
</ DragDockPanelHost>

Output looks like as follow

Blacklight controls in silverlight

We can add many dragdockpanel in Dragdockpanelhost as we want.

Blacklight controls in silverlight

We can drag and drop the panel as below

Blacklight controls in silverlight

Summary :

We can use the blacklight controls in our application; we can bind datagrids, images or other controls with dragdockpanel in blacklight control.
 

Login to add your contents and source code to this article
share this article :
post comment
 

Nice article. keep it up...

Posted by Rohatash Kumar Aug 03, 2011

Gr8 work priya

Posted by Shrikant S Aug 02, 2011
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor