Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions and controls to the right namespace and more #1297

Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
07b59d9
Moved extensions from the Controls library/namespace to Microsoft.Too…
edwinvandriel Jul 6, 2017
8a7ed8c
Moved extensions from the Microsoft.Toolkit.Uwp.UI namespace to Micr…
edwinvandriel Jul 6, 2017
3348b02
TextBoxMask replaced DependencyObject with the right property target …
edwinvandriel Jul 6, 2017
b916727
Broke ListViewBase into 3 partials
edwinvandriel Jul 6, 2017
9000fcf
Changed namespaces in samples
edwinvandriel Jul 6, 2017
ca54b61
Moved extensions in folders for better readability
edwinvandriel Jul 6, 2017
81ba458
Fixed the WrapPanel namespace and samples
edwinvandriel Jul 6, 2017
291c062
Fixes things from #1297 except the wrappanel
edwinvandriel Jul 8, 2017
fc1092f
Readme fixes
edwinvandriel Jul 8, 2017
1080e90
The obsolete classes inherit the new class or class in new namespace.
edwinvandriel Jul 8, 2017
0474673
WrapPanel restored to original namespace to prevent breaking changes
edwinvandriel Jul 8, 2017
8734b47
Changed the namespace on wrappanel and the requested changes to the s…
edwinvandriel Jul 10, 2017
bb1f5f1
Correct namespace
edwinvandriel Jul 11, 2017
ee3c3ac
Changed the TextBox parameter back to DependencyObject because it doe…
edwinvandriel Jul 12, 2017
55b6254
Extensions group in the sample app
edwinvandriel Jul 13, 2017
60c5d27
Updated documentation and moved extensions to seperate directory
edwinvandriel Jul 13, 2017
4068e0a
ListViewBase extensions sample
edwinvandriel Jul 13, 2017
8eeda8e
Small text change
edwinvandriel Jul 13, 2017
170fb7d
Merge branch 'dev' into Attached-properties-in-right-namespace
edwinvandriel Jul 13, 2017
36bd692
Changed al the extension namespace names to extension in documentation
edwinvandriel Jul 13, 2017
963eedf
Changed enumeration from All to Both to be consistent with Windows.UI…
edwinvandriel Aug 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
<Content Include="SamplePages\Scale\ScaleBehavior.png" />
<Content Include="SamplePages\SlidableListItem\SlidableListItem.png" />
<Content Include="SamplePages\Object Storage\ObjectStorage.png" />
<Content Include="SamplePages\SurfaceDialTextboxHelper\SurfaceDialTextboxHelper.png" />
<Content Include="SamplePages\SurfaceDialTextbox\SurfaceDialTextbox.png" />
<Content Include="SamplePages\TextBoxMask\TextBoxMask.png" />
<Content Include="SamplePages\TextBoxRegex\TextBoxRegex.png" />
<Content Include="SamplePages\Toast\icon.jpg" />
Expand Down Expand Up @@ -373,7 +373,7 @@
<Content Include="SamplePages\TileControl\TileControl.bind">
<SubType>Designer</SubType>
</Content>
<Content Include="SamplePages\SurfaceDialTextboxHelper\SurfaceDialTextboxHelperCode.bind">
<Content Include="SamplePages\SurfaceDialTextbox\SurfaceDialTextboxCode.bind">
<SubType>Designer</SubType>
</Content>
<Content Include="SamplePages\WrapPanel\WrapPanel.bind" />
Expand Down Expand Up @@ -558,8 +558,8 @@
<Compile Include="SamplePages\Object Storage\ObjectStoragePage.xaml.cs">
<DependentUpon>ObjectStoragePage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\SurfaceDialTextboxHelper\SurfaceDialTextboxHelperPage.xaml.cs">
<DependentUpon>SurfaceDialTextboxHelperPage.xaml</DependentUpon>
<Compile Include="SamplePages\SurfaceDialTextbox\SurfaceDialTextboxPage.xaml.cs">
<DependentUpon>SurfaceDialTextboxPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\SystemInformation\SystemInformationPage.xaml.cs">
<DependentUpon>SystemInformationPage.xaml</DependentUpon>
Expand Down Expand Up @@ -831,7 +831,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\SurfaceDialTextboxHelper\SurfaceDialTextboxHelperPage.xaml">
<Page Include="SamplePages\SurfaceDialTextbox\SurfaceDialTextboxPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.SurfaceDialTextboxPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid x:Name="Root"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center">

<TextBox HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="0"
Width="106"
extensions:SurfaceDialTextbox.StepValue="@[StepValue:DoubleSlider:1:0.1-10]"
extensions:SurfaceDialTextbox.ForceMenuItem="@[ForceMenuItem:Bool:true]"
extensions:SurfaceDialTextbox.EnableHapticFeedback="@[EnableHapticFeedback:Bool:true]"
extensions:SurfaceDialTextbox.EnableMinMaxValue="@[EnableMinMaxValue:Bool:true]"
extensions:SurfaceDialTextbox.MinValue="@[MinValue:DoubleSlider:0:0-100]"
extensions:SurfaceDialTextbox.MaxValue="@[MaxValue:DoubleSlider:100:0-100]"
extensions:SurfaceDialTextbox.Icon="@[Icon:Enum:RadialControllerMenuKnownIcon.Ruler]"
extensions:SurfaceDialTextbox.EnableTapToNextControl="@[EnableTapToNextControl:Bool:true]"/>
</StackPanel>
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.SurfaceDialTextboxPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
mc:Ignorable="d">

<Grid x:Name="Root"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center">

<TextBox Width="250"
Margin="0,0,0,10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
extensions:SurfaceDialTextbox.EnableHapticFeedback="{Binding DataContext.EnableHapticFeedback.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.EnableMinMaxValue="{Binding DataContext.EnableMinMaxValue.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.EnableTapToNextControl="{Binding DataContext.EnableTapToNextControl.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.ForceMenuItem="{Binding DataContext.ForceMenuItem.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.Icon="{Binding DataContext.Icon.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.MaxValue="{Binding DataContext.MaxValue.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.MinValue="{Binding DataContext.MinValue.Value, ElementName=Root, Mode=OneWay}"
extensions:SurfaceDialTextbox.StepValue="{Binding DataContext.StepValue.Value, ElementName=Root, Mode=OneWay}"
Text="0" />
</StackPanel>
</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

using Microsoft.Toolkit.Uwp.SampleApp.Models;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
public sealed partial class SurfaceDialTextboxHelperPage : Page
public sealed partial class SurfaceDialTextboxPage : Page
{
public SurfaceDialTextboxHelperPage()
public SurfaceDialTextboxPage()
{
InitializeComponent();
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.TextBoxMaskPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down Expand Up @@ -29,21 +29,21 @@
<RowDefinition />
</Grid.RowDefinitions>

<TextBox controls:TextBoxMask.Mask="9a9a-a9a*"
<TextBox extensions:TextBoxMask.Mask="9a9a-a9a*"
Header="Text box with Mask 9a9a-a9a* (9 allows from 0 to 9, a allow from a to Z and * allows both a and 9)"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}" />

<TextBox Grid.Row="1"
controls:TextBoxMask.Mask="+1999-9999"
controls:TextBoxMask.PlaceHolder=" "
extensions:TextBoxMask.Mask="+1999-9999"
extensions:TextBoxMask.PlaceHolder=" "
Header="Text box with Mask +1999-9999 and placeHolder as space (placeholder represents the characters the user can change on runtime)"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}" />

<TextBox Grid.Row="2"
controls:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
controls:TextBoxMask.Mask="a5c-5c*9"
extensions:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
extensions:TextBoxMask.Mask="a5c-5c*9"
Header="Text box with CustomMask in case you want to define your own variable character like a,9 and * , mask: a5c-5c*9, 5: [1-5], c: [a-c]"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.TextBoxMaskPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down Expand Up @@ -36,7 +36,7 @@
</Grid.RowDefinitions>
<StackPanel>
<TextBox Name="AlphaTextBox"
controls:TextBoxMask.Mask="9a9a--a9a*"
extensions:TextBoxMask.Mask="9a9a--a9a*"
Header="Text box with Mask 9a9a--a9a* (9 allows from 0 to 9, a allow from a to Z and * allows both a and 9) with initial value"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}"
Expand All @@ -55,15 +55,15 @@
</StackPanel>

<TextBox Grid.Row="1"
controls:TextBoxMask.Mask="+1999-9999"
controls:TextBoxMask.PlaceHolder=" "
extensions:TextBoxMask.Mask="+1999-9999"
extensions:TextBoxMask.PlaceHolder=" "
Header="Text box with Mask +1999-9999 and placeHolder as space (placeholder represents the characters the user can change on runtime)"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}" />

<TextBox Grid.Row="2"
controls:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
controls:TextBoxMask.Mask="a5c-5c*9"
extensions:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
extensions:TextBoxMask.Mask="a5c-5c*9"
Header="Text box with CustomMask in case you want to define your own variable character like a,9 and * , mask: a5c-5c*9, 5: [1-5], c: [a-c]"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource MaskedTextBoxStyle}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="using:Microsoft.Toolkit.Uwp.SampleApp.Common"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down Expand Up @@ -33,56 +33,56 @@

<StackPanel Margin="10,0,10,0">
<TextBox Name="PhoneNumberValidator"
controls:TextBoxRegex.Regex="^\s*\+?\s*([0-9][\s-]*){9,}$"
extensions:TextBoxRegex.Regex="^\s*\+?\s*([0-9][\s-]*){9,}$"
Header="Text box with Regex extension for phone number, validation occurs on TextChanged"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource TextBoxRegexStyle}" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Is Valid: " />
<TextBlock Text="{Binding (controls:TextBoxRegex.IsValid), ElementName=PhoneNumberValidator, Converter={StaticResource StringFormatConverter}}" />
<TextBlock Text="{Binding (extensions:TextBoxRegex.IsValid), ElementName=PhoneNumberValidator, Converter={StaticResource StringFormatConverter}}" />
</StackPanel>

</StackPanel>

<StackPanel Grid.Row="1"
Margin="10,0,10,0">
<TextBox Name="PhoneNumberValidatorForce"
controls:TextBoxRegex.ValidationMode="Forced"
controls:TextBoxRegex.ValidationType="PhoneNumber"
extensions:TextBoxRegex.ValidationMode="Forced"
extensions:TextBoxRegex.ValidationType="PhoneNumber"
Header="Text box with ValidationType=PhoneNumber, validation occurs on TextChanged and force occurs on lose focus with ValidationMode=Force"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource TextBoxRegexStyle}"
Text="+61616161611" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Is Valid: " />
<TextBlock Text="{Binding (controls:TextBoxRegex.IsValid), ElementName=PhoneNumberValidatorForce, Converter={StaticResource StringFormatConverter}}" />
<TextBlock Text="{Binding (extensions:TextBoxRegex.IsValid), ElementName=PhoneNumberValidatorForce, Converter={StaticResource StringFormatConverter}}" />
</StackPanel>
</StackPanel>

<StackPanel Grid.Row="2"
Margin="10,0,10,0">
<TextBox Name="EmailValidatorForce"
controls:TextBoxRegex.ValidationType="Email"
extensions:TextBoxRegex.ValidationType="Email"
Header="Text box with ValidationType=Email, validation occurs on TextChanged"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource TextBoxRegexStyle}" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Is Valid: " />
<TextBlock Text="{Binding (controls:TextBoxRegex.IsValid), ElementName=EmailValidatorForce, Converter={StaticResource StringFormatConverter}}" />
<TextBlock Text="{Binding (extensions:TextBoxRegex.IsValid), ElementName=EmailValidatorForce, Converter={StaticResource StringFormatConverter}}" />
</StackPanel>
</StackPanel>

<StackPanel Grid.Row="3"
Margin="10,0,10,0">
<TextBox Name="DecimalValidatorForce"
controls:TextBoxRegex.ValidationMode="Forced"
controls:TextBoxRegex.ValidationType="Decimal"
extensions:TextBoxRegex.ValidationMode="Forced"
extensions:TextBoxRegex.ValidationType="Decimal"
Header="Text box with ValidationType=Decimal, validation occurs on TextChanged and force occurs on lose focus with ValidationMode=Force (333,111 or 333.111)"
HeaderTemplate="{StaticResource HeaderTemplate}"
Style="{StaticResource TextBoxRegexStyle}" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Is Valid: " />
<TextBlock Text="{Binding (controls:TextBoxRegex.IsValid), ElementName=DecimalValidatorForce, Converter={StaticResource StringFormatConverter}}" />
<TextBlock Text="{Binding (extensions:TextBoxRegex.IsValid), ElementName=DecimalValidatorForce, Converter={StaticResource StringFormatConverter}}" />
</StackPanel>
</StackPanel>

Expand Down
Loading