1
值必须重视的属性Width,我在做什么的:“自动”在绑定属性“宽度”
<ColumnDefinition Width="{Binding Path=TabPanelWidth, RelativeSource={RelativeSource TemplatedParent}}" />
-
public float TabPanelWidth
{
get {return (float) GetValue (TabPanelWidthProperty);}
set {SetValue (TabPanelWidthProperty, value);}
}
public static readonly DependencyProperty TabPanelWidthProperty = DependencyProperty.Register ("TabPanelWidth", typeof (float), typeof (BivTabControl), new UIPropertyMetadata (null));
但我需要的可能设置不只有固定值,但是以XAML表示的值为Auto
,0.5*
等。
任何想法?