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

Binding listview row height

$
0
0

Hi!
I want to bind the row height of a list view, so i can dynamically change it. Is it possible?

So far i've created a bindable property:

public static BindableProperty RowHeightProperty =
        BindableProperty.Create<LanguageCell, double> (
            b => b.Height,
            0
        );


    public double RowHeight {
        get {
            return (double)GetValue (RowHeightProperty);
        }
        set {
            SetValue (RowHeightProperty, value);
        }
    }

    this.SetBinding (LanguageCell.RowHeightProperty, "RowHeight");

I have that code inside a ViewCell (Called LanguageCell) but when I do RowHeight = 40 it does nothing... What i'm I missing?

Thanks!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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