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

Height BindableProperty on VisualElement Readonly

$
0
0

I know there are probably layout/measurement reasons for why the Height property is only read-only bindable. But why isn't the HeightRequest a BindableProperty? To me the equivalent in WPF is ActualHeight (Forms Height) and Height (Forms HeightRequest). In traditional XAML you are able to bind to Height.

Maybe you can help me with my design, so I can avoid having to do this altogether.

I'm trying to display a list of posts. The posts always contain images, and when I download the appropriate list of posts I also get information about the image dimensions prior to downloading the image. My reasoning is that I can render an appropriate amount of space for the image and a place-holder (BoxView) of appropriate size before I've downloaded the image.

Maybe it's poor design for my ViewModel to dictate UI dimensions, but I've used the abstracted IDisplay from Xamarin.Forms.Labs inside my ViewModel to calculate the appropriate image height that needs to be downloaded and it the provides the HeightRequest information that I would like to Bind to.

Any ideas on how to better solve this problem?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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