Skip to content

Commit 3dfef93

Browse files
authored
Merge pull request #12217 from lhsrebel72/master
added clear function to combobox
2 parents fa0a534 + cbfa327 commit 3dfef93

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Avalonia.Controls/ComboBox.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,5 +517,14 @@ private void MoveSelection(int startIndex, int step, bool wrap)
517517
}
518518
}
519519
}
520+
521+
/// <summary>
522+
/// Clears the selection
523+
/// </summary>
524+
public void Clear()
525+
{
526+
SelectedItem = null;
527+
SelectedIndex = -1;
528+
}
520529
}
521530
}

0 commit comments

Comments
 (0)