All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.7 KiB

<!--*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2014 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views.WatermarkTextboxView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="WatermarkTextBox">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
The WatermarkTextBox is simply a TextBox that allows you to sepcify an object, usually a String, to represent null or missing text.
</Paragraph>
</local:DemoView.Description>
<Grid>
<StackPanel Margin="10">
<TextBlock Text="Default:" Style="{StaticResource Header}" />
<xctk:WatermarkTextBox Margin="5" MinWidth="200" Watermark="Enter Text" />
<TextBlock Text="Image Watermark:" Style="{StaticResource Header}" />
<xctk:WatermarkTextBox Margin="5">
<xctk:WatermarkTextBox.Watermark>
<StackPanel Orientation="Horizontal">
<Image Source="..\Resources\PencilTool16.png" Stretch="None" />
<TextBlock Text="Enter Text" Margin="4,0,0,0" />
</StackPanel>
</xctk:WatermarkTextBox.Watermark>
</xctk:WatermarkTextBox>
<TextBlock Text="Custom WatermarkTemplate:" Style="{StaticResource Header}" />
<xctk:WatermarkTextBox Margin="5" Watermark="Enter Text">
<xctk:WatermarkTextBox.WatermarkTemplate>
<DataTemplate>
<Border BorderBrush="Green" BorderThickness="1" Padding="5">
<ContentControl Content="{Binding}" Foreground="DarkRed" FontWeight="Bold" Focusable="False" />
</Border>
</DataTemplate>
</xctk:WatermarkTextBox.WatermarkTemplate>
</xctk:WatermarkTextBox>
</StackPanel>
</Grid>
</local:DemoView>