//when checked/unchecked any checkbox, and when text changed of any textbox void _AnyCheckTextBoxComboValueChanged(object source) { if (!_noeventValueChanged) { _noeventValueChanged = true; //print.it("source", source); if (source is KCheckBox c) { bool on = c.IsChecked; if (c == controlC) { if (_useCon = on) { _wnd.MapClientToClientOf(_con, ref _rect); } else { _con.MapClientToClientOf(_wnd, ref _rect); } rectC.c.IsChecked = false; } else if (c == wiflagsC.c) { if (_image != null) { TUtil.InfoTooltip(ref _ttInfo, c, "After changing 'Window pixels' may need to capture again.\nClick Test. If not found, click Capture."); } } else if (c == skipC.c) { if (on) { allC.IsChecked = false; } } else if (c == allC) { if (on) { skipC.c.IsChecked = false; } } } else if (source is TextBox t && t.Tag is KCheckTextBox k) { _noeventValueChanged = _formattedOnValueChanged = false; //allow auto-check but prevent formatting twice k.CheckIfTextNotEmpty(); if (_formattedOnValueChanged) { return; } } else if (source is ComboBox u && u.Tag is KCheckComboBox m) { _noeventValueChanged = _formattedOnValueChanged = false; //allow auto-check but prevent formatting twice m.c.IsChecked = true; if (_formattedOnValueChanged) { return; } }