Forum Xamarin Xamarin.Forms

Need help about Stacklayout IsVisible Property

RamazanRamazan Member ✭✭

I am trying to do make a CRM app. Customer will search a text inside my app and webAPI will answer and customer can see that info(just 3 info inside listview) inside search page under search bar. I achieved to do that. When customer select the info he/she will be directed to detail page which has mode detail about what he/she searched.

My model returns 3 kind from webAPI. And i filter that model according to one of parameter inside returning model from webAPI(e.g CustomerType). I tried 3 different stacklayout with isvisible VisualElement but isvisible not working due to not triggerring. As i understand IsVisible binding works only with a triggger. For example pushing a button, make a label empty.

So if i cant use isvisible what can i use? Eventtrigger,datatrigger?


  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    IsVisible should be a boolean property. Set it to "true" or "false" in your ViewModel should work

  • seanydaseanyda GBMember ✭✭✭✭✭

    You don't need to use a trigger to set an IsVisible property. You just need to bind a boolean property and set it in code to either true or false.

    private bool areaListViewIsVisible = true;
            public bool AreaListViewIsVisible
                get { return areaListViewIsVisible; }
                set { 
                    areaListViewIsVisible = value;
Sign In or Register to comment.