ArcGISRuntimeXamarin.Samples.ChangeSublayerVisibility.SublayerDataSource.VisibilitySwitch_ValueChanged C# (CSharp) Метод

VisibilitySwitch_ValueChanged() приватный Метод

private VisibilitySwitch_ValueChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void VisibilitySwitch_ValueChanged(object sender, EventArgs e)
        {
            // Get the row containing the UISwitch that was changed
            var index = (sender as UISwitch).Tag;

            // Set the sublayer visibility according to the UISwitch setting
            var sublayer = sublayers[(int)index] as ArcGISMapImageSublayer;
            sublayer.IsVisible = (sender as UISwitch).On;
        }