Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

XAML Binding and Attached Properties (AbsoluteLayout in my case)

$
0
0

In XAML only I can't get this binding to work (the layout bounds don't get updated when the source property changes):
<BoxView x:Name="leftCropBox" LayoutBounds="{Binding LeftCropBox, Mode=OneWay}" AbsoluteLayout.LayoutFlags="None"/>
If I manually do the binding in code by listening for changes on my pseudo-view model (CropViewModel) it does work:
AbsoluteLayout.SetLayoutBounds(leftCropBox, CropViewModel.LeftCropBox);
The binding context is properly set on the view. Is there anyway to get this to work in XAML-only? I did try all the binding modes and leaving that off entirely.


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>