namespace OSSDOM.DataQuality.CommonSL.Control
{
public partial class SelectToMonth : UserControl
{
#region select title property
public static readonly DependencyProperty SelectTitleProperty =
DependencyProperty.Register("SelectTitle", typeof(String), typeof(
SelectToMonth), null
);//这块是类型 public string SelectTitle
{
get { return (string)GetValue(SelectTitleProperty); }
set
{
SetValue(SelectTitleProperty, value);
}
}
#endregion
<UserControl x:Class="OSSDOM.DataQuality.CommonSL.Control.SelectToMonth"
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:DesignHeight="27" d:DesignWidth="220" x:Name="userControl">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="63"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="64"/>
<ColumnDefinition Width="15*"/>
</Grid.ColumnDefinitions>
<TextBlock Height="20" Margin="2,3,1,0" Name="title" HorizontalAlignment="Stretch" VerticalAlignment="Top" Text="{Binding SelectTitle, ElementName=userControl}" /> //这块是控件名称userControl
<my:SelectToMonth Grid.Row="1" x:Name="结束时间" SelectTitle="结束时间" />
posted on 2013-10-21 17:05
天书 阅读(1395)
评论(0) 编辑 收藏 引用