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*
等。
任何想法?