Binding height to UserControl using converter

BitSmithy 2,206 Reputation points
2023-10-10T12:26:28.8733333+00:00

Hello I try to bing height to user control using converter:

Height="{Binding Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource HeightConventer}}"

I found in net that I must do something like that:

    <UserControl.Height>
        <x:Double {Binding Height}></x:Double>
    </UserControl.Height>

But I cant find right syntax. Please tell me how to write right XAML.

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.