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

MVVM Forms Switch on load set on/off

$
0
0

Hello, i need little help from you guys how to set switch ON/OFF
Explanation
I set 3 switches to database on new load of form wanna set them to last known value.

    public Boolean POMPA_URUCH_ROB_SWITCH_T
    {
        get { return this.POMPA_URUCH_ROB_SWITCH.IsSelected;

        }
        set { 
            this.POMPA_URUCH_ROB_SWITCH.IsSelected = value;
            SetSelected(POMPA_URUCH_ROB_SWITCH);
            OnPropertyChanged();
        }
    }

and view is
POMPA_URUCH_ROB_SWITCH.SetBinding(Switch.IsToggledProperty, "POMPA_URUCH_ROB_SWITCH_T", BindingMode.TwoWay);


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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