Updated WatermarkTextBox (markdown)

master
DianeXceed 9 years ago
parent
commit
69f606af92
  1. 58
      WatermarkTextBox.md

58
WatermarkTextBox.md

@ -3,18 +3,23 @@ Derives from Xceed.Wpf.Toolkit.AutoSelectTextBox
The WatermarkTextBox is simply a TextBox that allows you to specify an object, usually a String, to represent null or missing text. The WatermarkTextBox is simply a TextBox that allows you to specify an object, usually a String, to represent null or missing text.
## Using Text ### Using Text
![](WatermarkTextBox_watermarktextbox.jpg)
![](WatermarkTextBox_watermarktextbox_withtext.jpg) [[WatermarkTextBox_watermarktextbox.jpg]]
{{
[[WatermarkTextBox_watermarktextbox_withtext.jpg]]
```
<xctk:WatermarkTextBox Watermark="Enter First Name" /> <xctk:WatermarkTextBox Watermark="Enter First Name" />
}} ```
### Using an Image with Text
[[WatermarkTextBox_watermarktextbox_image.jpg]]
[[WatermarkTextBox_watermarktextbox_imagename.jpg]]
## Using an Image with Text ```
![](WatermarkTextBox_watermarktextbox_image.jpg)
![](WatermarkTextBox_watermarktextbox_imagename.jpg)
{{
<xctk:WatermarkTextBox> <xctk:WatermarkTextBox>
<xctk:WatermarkTextBox.Watermark> <xctk:WatermarkTextBox.Watermark>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
@ -23,11 +28,13 @@ The WatermarkTextBox is simply a TextBox that allows you to specify an object, u
</StackPanel> </StackPanel>
</xctk:WatermarkTextBox.Watermark> </xctk:WatermarkTextBox.Watermark>
</xctk:WatermarkTextBox> </xctk:WatermarkTextBox>
}} ```
## Custom WatermarkTemplate ### Custom WatermarkTemplate
![](WatermarkTextBox_watermarktextbox_template.jpg)
{{ [[WatermarkTextBox_watermarktextbox_template.jpg]]
```
<xctk:WatermarkTextBox Watermark="Enter First Name"> <xctk:WatermarkTextBox Watermark="Enter First Name">
<xctk:WatermarkTextBox.WatermarkTemplate> <xctk:WatermarkTextBox.WatermarkTemplate>
<DataTemplate> <DataTemplate>
@ -37,15 +44,16 @@ The WatermarkTextBox is simply a TextBox that allows you to specify an object, u
</DataTemplate> </DataTemplate>
</xctk:WatermarkTextBox.WatermarkTemplate> </xctk:WatermarkTextBox.WatermarkTemplate>
</xctk:WatermarkTextBox> </xctk:WatermarkTextBox>
}} ```
## Properties ### Properties
|| Property || Description | Property | Description |
| AutoMoveFocus | Gets or sets a value indicating if the focus can navigate in the appropriate flow direction (e.g., from one cell to another when a cell is being edited) when the cursor is at the beginning or end of the auto-select text box. (Inherited from AutoSelectTextBox) | --- | --- |
| AutoSelectBehavior | Gets or sets a value indicating how the content of the auto-select text box is selected (Never or OnFocus). By default, Never. (Inherited from AutoSelectTextBox) | AutoMoveFocus | Gets or sets a value indicating if the focus can navigate in the appropriate flow direction (e.g., from one cell to another when a cell is being edited) when the cursor is at the beginning or end of the auto-select text box. (Inherited from AutoSelectTextBox) |
| KeepWatermarkOnGotFocus | Gets or sets if the **Watermark** will be displayed when the focus is set on the watermarkTextBox, when text is empty. Default is False. | AutoSelectBehavior | Gets or sets a value indicating how the content of the auto-select text box is selected (Never or OnFocus). By default, Never. (Inherited from AutoSelectTextBox) |
| Watermark | Gets or sets the object to use in place of null or missing Text. | KeepWatermarkOnGotFocus | Gets or sets if the **Watermark** will be displayed when the focus is set on the watermarkTextBox, when text is empty. Default is False. |
| WatermarkTemplate | Gets or sets the DataTemplate to use to display the **Watermark**. | Watermark | Gets or sets the object to use in place of null or missing Text. |
| WatermarkTemplate | Gets or sets the DataTemplate to use to display the **Watermark**. |
**Support this project, check out the [Plus Edition](https://xceed.com/xceed-toolkit-plus-for-wpf/).**
--- ---
**Support this project, check out the [Plus Edition](https://xceed.com/xceed-toolkit-plus-for-wpf/).**
Loading…
Cancel
Save