Velkommen
Velkommen

Reputation: 121

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?

-

Upvotes: 0

Views: 416

Answers (1)

brunnerh
brunnerh

Reputation: 184441

Try binding to ActualCapacity instead.

Upvotes: 1

Related Questions