开发者

Binding to Auto-value in XAML

I guess the auto-value is set after parsed by the binding.

Binding code:

Width="{Binding Capacity, Converter=开发者_如何学编程{StaticResource CapacityConverter}, ElementName=LayoutPath}" 
Height="{Binding Capacity, Converter={StaticResource CapacityConverter}, ElementName=LayoutPath}" 

Source:

<LayoutPath 
    x:Name="LayoutPath" 
    SourceElement="{Binding ElementName=ellipse}" 
    FillBehavior="NoOverlap" 
    Orientation="OrientToPath" 
    Capacity="auto" 
    Padding="34" 
    Distribution="Even"/>

It works if I set capacity to a fixed value, but not when it auto-calculates based on total nodes in xml.

Any solution?

-


Try binding to ActualCapacity instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜