【发布时间】:2011-12-27 17:25:06
【问题描述】:
必须附加到属性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* 等的值。
有什么想法吗?
【问题讨论】: