6 changed files with 363 additions and 107 deletions
@ -0,0 +1,85 @@ |
|||
<!--********************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Reciprocal |
|||
License (Ms-RL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter. |
|||
|
|||
********************************************************************--> |
|||
<infControls:DemoView x:Class="Samples.Modules.Text.Views.MaskedTextBoxView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
|||
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
|||
Title="MaskedTextBox"> |
|||
<Grid> |
|||
|
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="The MaskedTextBox control lets you display and edit values based on a mask." |
|||
TextWrapping="Wrap" /> |
|||
|
|||
<GroupBox Header="Features" Grid.Row="1" Margin="5"> |
|||
<StackPanel Margin="5"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Include literals:" VerticalAlignment="Center" Margin="2" /> |
|||
<CheckBox x:Name="_literals" Grid.Column="1" VerticalAlignment="Center" Margin="5" /> |
|||
|
|||
<TextBlock Text="Include prompt:" Grid.Row="1" VerticalAlignment="Center" Margin="2" /> |
|||
<CheckBox x:Name="_prompt" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5" /> |
|||
</Grid> |
|||
<Grid Margin="0,5,0,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Mask:" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_mask" Grid.Column="1" VerticalAlignment="Center" Margin="5" Text="(000) 000-0000" /> |
|||
|
|||
<TextBlock Text="Value:" Grid.Row="1" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_value" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5" Text="1234567890" /> |
|||
|
|||
<TextBlock Text="Text:" Grid.Row="2" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_text" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="5" /> |
|||
</Grid> |
|||
</StackPanel> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="2" Margin="10"> |
|||
<extToolkit:MaskedTextBox IncludeLiterals="{Binding IsChecked, ElementName=_literals, Mode=TwoWay}" |
|||
IncludePrompt="{Binding IsChecked, ElementName=_prompt, Mode=TwoWay}" |
|||
Mask="{Binding Text, ElementName=_mask}" |
|||
Value="{Binding Text, ElementName=_value, Mode=TwoWay}" |
|||
Text="{Binding Text, ElementName=_text, Mode=TwoWay}" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
</infControls:DemoView> |
|||
@ -0,0 +1,35 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Reciprocal |
|||
License (Ms-RL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
using Microsoft.Practices.Prism.Regions; |
|||
using Samples.Infrastructure.Controls; |
|||
|
|||
namespace Samples.Modules.Text.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for MaskedTextBoxView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime( KeepAlive = false )] |
|||
public partial class MaskedTextBoxView : DemoView |
|||
{ |
|||
public MaskedTextBoxView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue