I’m looking for the XAML equivalent of Winforms’ Anchor
property.
I want to anchor a TextBox
that’s on a Canvas
(on a UWP app) to the left and right so it’s always 260 from the left and 10 from the right. I’ve tried many things, but the one that looks most promising was:
<TextBox Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap" Text="TextBox" Margin="260,10,10,10"/>
It does not, however anchor to the right.