A control toolkit for Windows 8 XAML applications. Contains some UI controls to make it easier to create Windows UI style apps for the Windows Store in accordance with Windows UI guidelines.
I have added a command button like what you see in the search charm (with the magnifying glass) to the WatermarkTextBox. I'm not totally clear how to provide the code, so here it is, in case anybody is interested:
in WatermarkTextBox.cs:
///
/// ShowCommandButton Dependency Property
///
public static readonly DependencyProperty ShowCommandButtonProperty =
DependencyProperty.Register("ShowCommandButton", typeof(bool), typeof(WatermarkTextBox),
new PropertyMetadata((bool)false));
///
/// Gets or sets the ShowCommandButton property. This dependency property
/// indicates ....
///
public bool ShowCommandButton
{
get { return (bool)GetValue(ShowCommandButtonProperty); }
set { SetValue(ShowCommandButtonProperty, value); }
}
///
/// CommandButtonCommand Dependency Property
///
public static readonly DependencyProperty CommandButtonCommandProperty =
DependencyProperty.Register("CommandButtonCommand", typeof(ICommand), typeof(WatermarkTextBox),
new PropertyMetadata(null));
///
/// Gets or sets the CommandButtonCommand property. This dependency property
/// indicates ....
///
public ICommand CommandButtonCommand
{
get { return (ICommand)GetValue(CommandButtonCommandProperty); }
set { SetValue(CommandButtonCommandProperty, value); }
}
///
/// CommandButtonStyle Dependency Property
///
public static readonly DependencyProperty CommandButtonStyleProperty =
DependencyProperty.Register("CommandButtonStyle", typeof(Style), typeof(WatermarkTextBox),
new PropertyMetadata((Style)null));
///
/// Gets or sets the CommandButtonStyle property. This dependency property
/// indicates ....
///
public Style CommandButtonStyle
{
get { return (Style)GetValue(CommandButtonStyleProperty); }
set { SetValue(CommandButtonStyleProperty, value); }
}
In Generic.Xaml:
In the WatermarkTextBox grid resources
I understand what this is, but not going to pull it into the project. This can be accomplished by subclass-retemplate and not a general purpose control currently.
I have added a command button like what you see in the search charm (with the magnifying glass) to the WatermarkTextBox. I'm not totally clear how to provide the code, so here it is, in case anybody is interested: in WatermarkTextBox.cs: ///
/// ShowCommandButton Dependency Property ///
public static readonly DependencyProperty ShowCommandButtonProperty = DependencyProperty.Register("ShowCommandButton", typeof(bool), typeof(WatermarkTextBox), new PropertyMetadata((bool)false));
///
/// Gets or sets the ShowCommandButton property. This dependency property /// indicates .... ///
public bool ShowCommandButton { get { return (bool)GetValue(ShowCommandButtonProperty); } set { SetValue(ShowCommandButtonProperty, value); } }
///
/// CommandButtonCommand Dependency Property ///
public static readonly DependencyProperty CommandButtonCommandProperty = DependencyProperty.Register("CommandButtonCommand", typeof(ICommand), typeof(WatermarkTextBox), new PropertyMetadata(null));
///
/// Gets or sets the CommandButtonCommand property. This dependency property /// indicates .... ///
public ICommand CommandButtonCommand { get { return (ICommand)GetValue(CommandButtonCommandProperty); } set { SetValue(CommandButtonCommandProperty, value); } }
///
/// CommandButtonStyle Dependency Property ///
public static readonly DependencyProperty CommandButtonStyleProperty = DependencyProperty.Register("CommandButtonStyle", typeof(Style), typeof(WatermarkTextBox), new PropertyMetadata((Style)null));
///
/// Gets or sets the CommandButtonStyle property. This dependency property /// indicates .... ///
public Style CommandButtonStyle { get { return (Style)GetValue(CommandButtonStyleProperty); } set { SetValue(CommandButtonStyleProperty, value); } }
In Generic.Xaml: In the WatermarkTextBox grid resources
and in the grid
And finally to use it, set up a style in your page:
and use it: