C1DockControl快速入门 > 第一步:创建一个WPF应用程序 |
在这一步中,您将使用WPF及Silverlight版DockControl在Visual Studio中创建一个WPF或Silverlight应用程序。
您需要完成以下步骤来建立一个工程并添加一个C1DockControl控件到您的应用程序中:
WPF XAML |
拷贝代码
|
---|---|
<Window 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:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <c1:C1DockControl></c1:C1DockControl> </Grid> </Window> |
Silverlight XAML |
拷贝代码
|
---|---|
<UserControl xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" x:Class="C1DockControlQuickStart.MainPage" 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" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <c1:C1DockControl></c1:C1DockControl> </Grid> </UserControl> |
![]() |
注意:C1.WPF.Docking或C1.Silverlight.Docking的命名空间与<c1:C1DockControl></c1:C1DockControl>标签已经被添加到工程中。 |
在下一步中,您将添加一个附有C1DockTabItems的C1DockTabControl。