Elwig: Fix most compiler warnings
Test / Run tests (push) Successful in 2m29s

This commit is contained in:
lorenz.stechauner committed 2026-11-24 19:37:13 +01:00
1 parent 9e110a467a
commit 2cc58f8df6
24 files changed
+112 -125

No files matched your search

+4 -4
View File
@@ -74,7 +74,7 @@ namespace Elwig.Controls {
private bool _viewHandled;
private bool _modelHandled;
private TextBlock _textBox;
private TextBlock? _textBox;
public CheckComboBox() {
SelectionMode = SelectionMode.Multiple;
@@ -131,11 +131,11 @@ namespace Elwig.Controls {
AllItemsSelected = null;
}
if (SelectedItems.Count > 1 && SelectedItems.Count == ItemsSource.Cast<object>().Count() && AllItemsSelectedContent != null) {
_textBox.Text = AllItemsSelectedContent;
_textBox?.Text = AllItemsSelectedContent;
} else if (SelectedItems.Count == 0) {
_textBox.Text = "";
_textBox?.Text = "";
} else {
_textBox.Text = string.Join(Delimiter,
_textBox?.Text = string.Join(Delimiter,
dmp == null ? SelectedItems.Cast<object>() :
SelectedItems.Cast<object>()
.Select(i => i.GetType().GetProperty(dmp)?.GetValue(i))