private void cbProfile_SelectedIndexChanged(object sender, RoutedEventArgs e) { if (cbProfile.SelectedIndex == -1) { return; } var index = cbProfile.SelectedIndex; var profile = (FixedProfiles)index; editrow._Rights = AccessLevel.SetFixedProfile(editrow._Rights, profile); }