Click here to Skip to main content
15,888,610 members
Articles / Desktop Programming / XAML

Custom Busyindicator style in Silverlight 4

Rate me:
Please Sign up or sign in to vote.
4.73/5 (7 votes)
5 Jul 2010CPOL2 min read 68.6K   2.6K   31  
How to create a silverlight 4 Busyindicator style with custom progressbar
  • cslighttheme.zip
    • CSTemplateApp
      • CSTemplateApp.sln
      • CSTemplateApp
        • App.xaml
        • App.xaml.cs
        • Assets
        • Bin
          • Debug
            • AppManifest.xaml
            • ar
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • bg
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • ca
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • cs
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • CSTemplateApp.dll
            • CSTemplateApp.xap
            • CSTemplateAppTestPage.html
            • da
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • de
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • el
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • es
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • et
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • eu
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • fi
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • fr
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • he
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • hr
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • hu
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • id
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • it
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • ja
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • ko
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • lt
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • lv
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • ms
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • nl
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • no
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • pl
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • pt
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • pt-BR
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • ro
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • ru
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • sk
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • sl
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • sr-Cyrl-CS
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • sr-Latn-CS
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • sv
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • System.ComponentModel.DataAnnotations.dll
            • System.ComponentModel.DataAnnotations.xml
            • System.Windows.Controls.Data.DataForm.Toolkit.dll
            • System.Windows.Controls.Data.DataForm.Toolkit.xml
            • System.Windows.Controls.Data.dll
            • System.Windows.Controls.Data.Input.dll
            • System.Windows.Controls.Data.Input.xml
            • System.Windows.Controls.Data.Toolkit.dll
            • System.Windows.Controls.Data.Toolkit.xml
            • System.Windows.Controls.Data.xml
            • System.Windows.Controls.DataVisualization.Toolkit.dll
            • System.Windows.Controls.DataVisualization.Toolkit.xml
            • System.Windows.Controls.dll
            • System.Windows.Controls.Input.dll
            • System.Windows.Controls.Input.Toolkit.dll
            • System.Windows.Controls.Input.Toolkit.xml
            • System.Windows.Controls.Input.xml
            • System.Windows.Controls.Layout.Toolkit.dll
            • System.Windows.Controls.Layout.Toolkit.xml
            • System.Windows.Controls.Navigation.dll
            • System.Windows.Controls.Navigation.xml
            • System.Windows.Controls.Toolkit.dll
            • System.Windows.Controls.Toolkit.Internals.dll
            • System.Windows.Controls.Toolkit.xml
            • System.Windows.Controls.xml
            • System.Windows.Data.dll
            • System.Windows.Data.xml
            • th
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • tr
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • uk
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • vi
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.resources.dll
            • zh-Hans
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
            • zh-Hant
              • System.ComponentModel.DataAnnotations.resources.dll
              • System.Windows.Controls.Data.Input.resources.dll
              • System.Windows.Controls.Data.resources.dll
              • System.Windows.Controls.Input.resources.dll
              • System.Windows.Controls.Navigation.resources.dll
              • System.Windows.Controls.resources.dll
              • System.Windows.Data.resources.dll
        • CSTemplateApp.csproj
        • CSTemplateApp.csproj.user
        • Data
        • ErrorWindow.xaml
        • ErrorWindow.xaml.cs
        • MainPage.xaml
        • MainPage.xaml.cs
        • Properties
        • Views
<navigation:Page x:Class="CSTemplateApp.Views.SDK" 
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                mc:Ignorable="d"
                xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
                xmlns:local="clr-namespace:CSTemplateApp"
                d:DesignWidth="640" d:DesignHeight="480"
                Title="Silverlight 4 SDK controls themes" x:Name="Page">
    <navigation:Page.Resources>      
    </navigation:Page.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <ContentControl x:Name="PageHeader" Grid.Row="0" Style="{StaticResource PageHeaderStyle}">
            <CheckBox x:Name="checkEnable" Content="Enabled" IsChecked="True"/>
        </ContentControl>


        <Grid Grid.Row="1" Margin="25" >
            <StackPanel Orientation="Vertical">
                
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Data controls" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">DataGrid</TextBlock>
                        <sdk:DataGrid x:Name="dataGrid" Height="250" HorizontalAlignment="Stretch" Margin="5" 
                                 IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}" CanUserResizeColumns="True"
                                      CanUserReorderColumns="True" RowDetailsVisibilityMode="VisibleWhenSelected" ItemsSource="{Binding}"
                                      SelectionMode="Extended" HeadersVisibility="Column" GridLinesVisibility="None" >
                        </sdk:DataGrid>
                        <TextBlock Margin="5 5 0 0">DataPager</TextBlock>
                        <sdk:DataPager x:Name="dataPager1" HorizontalAlignment="Left" Margin="5" Source="{Binding}"
                                     IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}" PageSize="8"/>
                        <sdk:DataPager x:Name="dataPager2" HorizontalAlignment="Left" Margin="5" DisplayMode="FirstLastPreviousNextNumeric"
                                     IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}" PageSize="8" Source="{Binding}"/>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="AutoCompleteBox" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">AutoCompleteBox</TextBlock>
                        <sdk:AutoCompleteBox IsTextCompletionEnabled="True" ItemsSource="{Binding}" ValueMemberPath="Name" Width="150"
                                             IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}"
                                             ValueMemberBinding="{Binding Path=Name, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" HorizontalAlignment="Left" x:Name="acbox" Margin="5"
                                             SelectedItem="{Binding Path=SelectedItem, ElementName=dataGrid, Mode=TwoWay,ValidatesOnDataErrors=True, NotifyOnValidationError=True}" 
                                             >
                            <sdk:AutoCompleteBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Name}" FontWeight="Bold"/>
                                        <TextBlock Text="Rating" Margin="10 0 0 0"/>
                                        <TextBlock Text="{Binding Path=Rating}" Margin="5 0 0 0"/>
                                    </StackPanel>
                                </DataTemplate>
                            </sdk:AutoCompleteBox.ItemTemplate>
                        </sdk:AutoCompleteBox>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Date &amp; time controls" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">Calendar</TextBlock>
                        <sdk:Calendar HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5"
                                      IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}"/>
                        <TextBlock Margin="5 5 0 0">DatePicker</TextBlock>
                        <sdk:DatePicker HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Width="150"
                                        IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}"/>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Child Window" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">ChildWindow</TextBlock>
                        <Button Content="Open" Width="150" HorizontalAlignment="Left" Margin="5"
                                IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}" Click="Button_Click"/>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="TreeView" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">TreeView</TextBlock>
                        <sdk:TreeView Width="200" HorizontalAlignment="Left" Margin="5" Height="200"
                                IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}">
                            <sdk:TreeViewItem Header="Tree View item 1">
                                <sdk:TreeViewItem Header="Sub Item 1"/>
                                <sdk:TreeViewItem Header="Sub Item 2"/>
                                <sdk:TreeViewItem Header="Sub Item 3"/>
                                <sdk:TreeViewItem Header="Sub Item 4"/>
                                <sdk:TreeViewItem Header="Sub Item 5"/>
                            </sdk:TreeViewItem>
                            <sdk:TreeViewItem Header="Tree View item 2">
                                <sdk:TreeViewItem Header="Sub Item 1"/>
                                <sdk:TreeViewItem Header="Sub Item 2"/>
                                <sdk:TreeViewItem Header="Sub Item 3"/>
                                <sdk:TreeViewItem Header="Sub Item 4"/>
                                <sdk:TreeViewItem Header="Sub Item 5"/>
                            </sdk:TreeViewItem>
                            <sdk:TreeViewItem Header="Tree View item 3">
                                <sdk:TreeViewItem Header="Sub Item 1"/>
                                <sdk:TreeViewItem Header="Sub Item 2"/>
                                <sdk:TreeViewItem Header="Sub Item 3"/>
                                <sdk:TreeViewItem Header="Sub Item 4"/>
                                <sdk:TreeViewItem Header="Sub Item 5"/>
                            </sdk:TreeViewItem>
                        </sdk:TreeView>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="TabControl" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Margin="5 5 0 0">TabControl</TextBlock>
                        <sdk:TabControl Width="350" Height="250" HorizontalAlignment="Left" Margin="5"
                                IsEnabled="{Binding Path=IsChecked, ElementName=checkEnable}" TabStripPlacement="Top">
                            <sdk:TabItem Header="Item 1"/>
                            <sdk:TabItem Header="Item 2"/>
                            <sdk:TabItem Header="Item 3" IsEnabled="False"/>
                            <sdk:TabItem Header="Item 4"/>
                        </sdk:TabControl>
                    </StackPanel>
                </Grid>

                <Path HorizontalAlignment="Stretch" VerticalAlignment="Center"
                      Stretch="UniformToFill" Data="M0,0 H100" Stroke="Black"
                      StrokeThickness="1" StrokeDashArray="1 2" UseLayoutRounding="False" Margin="0 15"/>


                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Grid Splitter" TextWrapping="Wrap" Grid.Column="0" Margin="5"/>

                    <StackPanel Orientation="Vertical" Grid.Column="1">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontStyle" Value="Italic"/>
                            </Style>
                        </StackPanel.Resources>
                        
                        <TextBlock Margin="5 5 0 0">Horizontal</TextBlock>
                        <Grid Width="300" Height="300" HorizontalAlignment="Left" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            
                            <Border Background="#FFEEEEEE" Grid.Column="0" CornerRadius="6" Margin="0 0 10 0"/>
                            <Border Background="#FFEEEEEE" Grid.Column="1" CornerRadius="6"/>
                            <sdk:GridSplitter Grid.Column="0" ShowsPreview="True" HorizontalAlignment="Right" 
                                              VerticalAlignment="Stretch" Width="10"/>
                        </Grid>

                        <TextBlock Margin="5 5 0 0">Vertical</TextBlock>
                        <Grid Width="300" Height="300" HorizontalAlignment="Left" >
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <Border Background="#FFEEEEEE" Grid.Row="0" CornerRadius="6" Margin="0 0 0 10"/>
                            <Border Background="#FFEEEEEE" Grid.Row="1" CornerRadius="6"/>
                            <sdk:GridSplitter Grid.Column="0" ShowsPreview="True" HorizontalAlignment="Stretch" 
                                              VerticalAlignment="Bottom" Height="10"/>
                        </Grid>
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Grid>
            
    </Grid>
</navigation:Page>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Bulgaria Bulgaria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions