Permalink
Browse files

Added focus examples.

  • Loading branch information...
1 parent ecf700a commit d0f6275ebe7584b5a8e4eb8ff091b893216bf1b4 @JoshClose committed Nov 18, 2011
Showing with 30 additions and 1 deletion.
  1. +3 −1 NuGet/WindowsPhoneControls.nuspec
  2. +17 −0 src/ExampleApp.WP7/MainPage.xaml
  3. +10 −0 src/ExampleApp.WP7/MainPage.xaml.cs
@@ -2,12 +2,14 @@
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>WindowsPhoneControls</id>
+ <title>Windows Phone Controls</title>
<version>0.3.0</version>
<authors>Josh Close</authors>
+ <copyright>Josh Close 2011</copyright>
<licenseUrl>http://www.opensource.org/licenses/ms-pl.html</licenseUrl>
<projectUrl>https://github.com/JoshClose/WindowsPhoneControls</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Controls for Windows Phone: WatermarkTextBox, WatermarkPasswordBox</description>
- <tags>watermark watermarktextbox watermarkpasswordbox textbox passwordbox windows phone 7</tags>
+ <tags>wp7 watermark watermarktextbox watermarkpasswordbox textbox passwordbox windows phone 7</tags>
</metadata>
</package>
@@ -61,6 +61,18 @@
</Style>
</Controls:WatermarkTextBox.WatermarkStyle>
</Controls:WatermarkTextBox>
+
+ <TextBlock Text="Disabled WatermarkTextBox" />
+ <Controls:WatermarkTextBox WatermarkText="this is the watermark" />
+
+ <TextBlock Text="WatermarkTextBox Focus On Click" />
+ <Controls:WatermarkTextBox WatermarkText="this is the watermark"
+ x:Name="watermarkTextBoxClick"/>
+ <Button Content="click to focus" Click="Button_Click_3" />
+
+ <!-- ***************************** -->
+ <!-- WatermarkPasswordBox Examples -->
+ <!-- ***************************** -->
<TextBlock Text="PasswordBox" />
<PasswordBox />
@@ -92,6 +104,11 @@
</Controls:WatermarkPasswordBox>
<Button Click="Button_Click">Button</Button>
+
+ <TextBlock Text="WatermarkPasswordBox Focus On Click" />
+ <Controls:WatermarkTextBox WatermarkText="this is the watermark"
+ x:Name="watermarkPasswordBoxClick"/>
+ <Button Content="click to focus" Click="Button_Click_4" />
</StackPanel>
</ScrollViewer>
</Grid>
@@ -43,5 +43,15 @@ private void Button_Click_2( object sender, RoutedEventArgs e )
{
( (MainPageViewModel)DataContext ).FillPasswordBoxButtonClick( sender, e );
}
+
+ private void Button_Click_3( object sender, RoutedEventArgs e )
+ {
+ watermarkTextBoxClick.Focus();
+ }
+
+ private void Button_Click_4( object sender, RoutedEventArgs e )
+ {
+ watermarkPasswordBoxClick.Focus();
+ }
}
}

0 comments on commit d0f6275

Please sign in to comment.