You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: input/docs/styles/combobox.md
+134-1Lines changed: 134 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,137 @@ Title: ComboBox
2
2
Description: The ComboBox styles
3
3
---
4
4
5
-
_coming soon_
5
+
## Default Style
6
+
7
+
The standard `ComboBox` is automatically styled when you include the MahApps.Metro library. You can enhance it with helper properties from `TextBoxHelper`.
8
+
9
+
-----
10
+
11
+
## Watermark
12
+
13
+
You can add placeholder text, known as a watermark, which appears when the `ComboBox` has no selected item.
14
+
15
+
Add the following attribute to your `ComboBox`: `mah:TextBoxHelper.Watermark="Your placeholder text..."`
16
+
17
+
```xml
18
+
<ComboBox mah:TextBoxHelper.Watermark="Please select an item..."
19
+
Width="200">
20
+
<ComboBoxItemContent="Item 1" />
21
+
<ComboBoxItemContent="Item 2" />
22
+
</ComboBox>
23
+
```
24
+
25
+
-----
26
+
27
+
## ClearText Button
28
+
29
+
A button to clear the selected item can be added to the `ComboBox`.
30
+
31
+
Set `mah:TextBoxHelper.ClearTextButton="True"` to make the button always visible.
0 commit comments