Silverlight TabControl和Accordion控件使用介绍

简介: 1、引入Silverlight Toolkit中控件Controls的引用xmlns:sdk="http://schemas.

1、引入Silverlight Toolkit中控件Controls的引用

xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"

 

2、页面中添加控件

<sdk:TabControl  Style="{StaticResource tabStyle}" HorizontalAlignment="Left" Margin="0" x:Name="tabControl1" Width="276" Height="400" VerticalAlignment="Top">
                            <!--第一个TabItem-->
                            <sdk:TabItem Style="{StaticResource tabItemStyle}" Header="    防 汛 抢 险 " x:Name="tabItem2" Width="122" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Grid Width="269" Margin="0" HorizontalAlignment="Left" Height="362" VerticalAlignment="Top">
                                    <layoutToolkit:Accordion x:Name="accordion" Margin="0,1,3,3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FontSize="14.667" BorderBrush="DarkGray" Width="266">
                                        <layoutToolkit:AccordionItem Header="仓库物资" IsSelected="False" Cursor="Hand" VerticalAlignment="Center">
                                            <layoutToolkit:AccordionItem.Content>
                                                <Grid>
                                                    
                                                </Grid>
                                            </layoutToolkit:AccordionItem.Content>
                                        </layoutToolkit:AccordionItem>
                                        <layoutToolkit:AccordionItem Header="抢险队伍" IsSelected="False">
                                            <layoutToolkit:AccordionItem.Content>
                                                <Grid Width="269" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="292">
                                                    
                                                </Grid>
                                            </layoutToolkit:AccordionItem.Content>
                                        </layoutToolkit:AccordionItem>
                                        <layoutToolkit:AccordionItem Header="防汛责任人">
                                            <layoutToolkit:AccordionItem.Content>
                                                <Grid Width="272" Margin="0" HorizontalAlignment="Left" Height="300" VerticalAlignment="Top">
                                                  
                                                </Grid>
                                            </layoutToolkit:AccordionItem.Content>
                                        </layoutToolkit:AccordionItem>
                                    </layoutToolkit:Accordion>
                                </Grid>
                            </sdk:TabItem>
                            <!--第二个TabItem-->
                            <sdk:TabItem  Style="{StaticResource tabItemStyle}" Header=" 预 警 短 信 发 送" x:Name="tabItem1" FontFamily="Microsoft YaHei" FontSize="13.333" VerticalAlignment="Center" Cursor="Hand" Width="146">
                                <Grid>
                                   
                                </Grid>
                            </sdk:TabItem>
                        </sdk:TabControl>

 

3、效果如下图:

 

 

 

相关文章
Silverlight ListBox 控件使用介绍
1、ListBox的单选和多选 默认情况下只支持单选 通过设定其SelectionMode可以支持多选SelectionMode - 选择模式 [System.
757 0
|
开发框架 .NET
Silverlight RadTreeView 控件使用介绍
1、RadTreeView是Telerik公司提供的控件,与之对应的也有SL平台下的控件,使用方法跟Silverlight ToolKit中的TreeView中使用的HierarchicalDataTemplate类似,可以实现多级递归。
779 0

热门文章

最新文章