ControlUtils: Fix FinAllChildren

This commit is contained in:
2023-09-28 20:03:00 +02:00
parent ca1b68aa4f
commit 3be6371be1
2 changed files with 6 additions and 2 deletions

View File

@ -157,9 +157,12 @@ namespace Elwig {
protected void OnPrintingReadyChanged(EventArgs evt) {
foreach (Window w in Windows) {
foreach (var b in ControlUtils.FindAllChildren<Button>(w).Where(b => "Print".Equals(b.Tag))) {
foreach (var b in ControlUtils.FindAllChildren<Button>(w).Where(b => b.Tag?.ToString() == "Print")) {
b.IsEnabled = IsPrintingReady;
}
foreach (var i in ControlUtils.FindAllChildren<MenuItem>(w).Where(i => i.Tag?.ToString() == "Print")) {
i.IsEnabled = IsPrintingReady;
}
}
}
}