private void SetUpSwitchRow() { var switchRow = new SwitchRowView(); switchRow.Text = "Show and hide rows with animation"; switchRow.SwitchChanged += (sender, isOn) => { StackView.SetRowsHidden(hiddenRows, isHidden: !isOn, animated: true); }; StackView.AddRow(switchRow); }