{"id":163135,"date":"2012-12-19T12:22:03","date_gmt":"2012-12-19T08:22:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=163135"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=163135","title":{"rendered":"<span class=\"post_title\">Watermark \u0434\u043b\u044f TextBox-\u0430 \u0432 Windows 8 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/269\/7c0\/dad\/2697c0dadf9c1cee2c41522b68126591.png\" align=\"left\"\/>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0441\u0442\u0430\u043b\u043e \u043c\u043e\u0434\u043d\u044b\u043c, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0449\u0435\u0439 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f TextBox-\u0430 \u0435\u0449\u0435 \u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c TextBox-\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443. \u0414\u043e\u043b\u0436\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0432\u0435\u043b, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u0442\u0435\u043a\u0441\u0442, \u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041d\u0435 \u0431\u043e\u0433 \u0432\u0435\u0441\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u043d\u043e \u0442.\u043a. \u0443 <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/windows.ui.xaml.controls.controltemplate(v=win.10).aspx#properties\">ControlTemplate<\/a> \u0432 Windows Store \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0438\u043b\u0435\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0432\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0434 Windows Store \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043c\u043e\u0436\u0435\u0442 \u043a\u0442\u043e-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u043a\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0435\u0445\u0430\u043b\u0438.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 Windows Store \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 Solution \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 (\u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043c\u044b\u0448\u0438 \u043d\u0430 Solution, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e Add -&gt; New Project):<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d80\/65a\/031\/d8065a0314b3073b334b46321fadda69.png\"\/><br \/>  \u0412 \u044d\u0442\u0443 \u0441\u0431\u043e\u0440\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 (\u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, Add -&gt; New Item):<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/8c5\/124\/f2f\/8c5124f2fd8fa9c1c4fc28539a1f15b4.png\"\/><br \/>  \u0412 \u0444\u0430\u0439\u043b\u0435 cs \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0430, \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u0434\u043a\u0430 \u043d\u0430 TextBox:  <\/p>\n<pre><code>public sealed partial class WaterMarkedTextBox : TextBox<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438 \u0443\u0434\u0430\u043b\u0438\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d78\/b54\/726\/d78b54726374c8ddc5c80430f5c55ab9.png\"\/><br \/>  \u042d\u0442\u0438 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0443 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e TextBox-\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u044d\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0443 TextBox-\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443. \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0430 TextBox-\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043d\u0435\u0433\u043e TextBlock, \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438:  <\/p>\n<pre><code>&lt;TextBox.Template&gt;     &lt;ControlTemplate TargetType=&quot;TextBox&quot;&gt;         &lt;Grid&gt;             &lt;TextBox Text=&quot;{Binding Text, RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}&quot; \/&gt;             &lt;TextBlock                  Text=&quot;{Binding WaterMark, RelativeSource={RelativeSource TemplatedParent}}&quot;                 Foreground=&quot;Gray&quot; Margin=&quot;5,0,0,0&quot; HorizontalAlignment=&quot;Left&quot; VerticalAlignment=&quot;Center&quot; Visibility=&quot;Collapsed&quot; IsHitTestVisible=&quot;False&quot;\/&gt;         &lt;\/Grid&gt;     &lt;\/ControlTemplate&gt; &lt;\/TextBox.Template&gt;<\/code><\/pre>\n<p>  \u0422.\u043a. \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0435\u0449\u0435 \u043d\u0435\u043b\u044c\u0437\u044f, \u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0432\u0441\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f:  <\/p>\n<pre><code> public WaterMarkedTextBox() {     this.InitializeComponent();                 Loaded += WaterMarkedTextBox_Loaded; } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0444\u043e\u043a\u0443\u0441 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0435:  <\/p>\n<pre><code> private bool _isFocused; <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f DependencyProperty, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438:  <\/p>\n<pre><code> \/\/\/ &lt;summary&gt; \/\/\/ \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \/\/\/ &lt;\/summary&gt; public string WaterMark {     get { return (string)GetValue(WaterMarkProperty); }     set { SetValue(WaterMarkProperty, value); } }   \/\/\/ &lt;summary&gt; \/\/\/ Static part of dependency property WaterMark \/\/\/ &lt;\/summary&gt; public static readonly DependencyProperty WaterMarkProperty =     DependencyProperty.Register(&quot;WaterMark&quot;, typeof(string), typeof(WaterMarkedTextBox), new PropertyMetadata(&quot;&quot;)); <\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u0432\u043e\u0434\u0430 \u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u0435\u0433\u043e:  <\/p>\n<pre><code> void WaterMarkedTextBox_Loaded(object sender, RoutedEventArgs e) {     var grid = (Grid)VisualTreeHelper.GetChild(this, 0);     TextBox innerTextBox = (TextBox)grid.Children[0];     innerTextBox.GotFocus += WaterMarkedTextBox_GotFocus;     innerTextBox.LostFocus += WaterMarkedTextBox_LostFocus;     ChangeWatermarkTextVisibility(); }   void WaterMarkedTextBox_LostFocus(object sender, RoutedEventArgs e) {     _isFocused = false;     ChangeWatermarkTextVisibility(); }   void WaterMarkedTextBox_GotFocus(object sender, RoutedEventArgs e) {     _isFocused = true;     ChangeWatermarkTextVisibility(); } <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438:  <\/p>\n<pre><code> private void ChangeWatermarkTextVisibility() {     var grid = (Grid)VisualTreeHelper.GetChild(this, 0);     TextBlock watermarkText = (TextBlock)grid.Children[1];     if (!string.IsNullOrEmpty(Text) || _isFocused)     {         watermarkText.Visibility = Visibility.Collapsed;     }     else     {         watermarkText.Visibility = Visibility.Visible;     } } <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<br \/>  \u0422.\u043a. \u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u0437\u044f\u043b Blank App, \u0442\u043e \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0432\u043d\u0435\u0441 \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443:  <\/p>\n<pre><code> &lt;Page x:Class=&quot;App11.MainPage&quot;            xmlns:MyControls=&quot;using:MyControls&quot;           xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;     xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;     xmlns:local=&quot;using:App11&quot;     xmlns:d=&quot;http:\/\/schemas.microsoft.com\/expression\/blend\/2008&quot;     xmlns:mc=&quot;http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006&quot;     mc:Ignorable=&quot;d&quot;&gt;       &lt;StackPanel Background=&quot;{StaticResource ApplicationPageBackgroundThemeBrush}&quot;&gt;         &lt;TextBlock Text=&quot;\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430:&quot; \/&gt;         &lt;MyControls:WaterMarkedTextBox WaterMark=&quot;\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0430\u0441\u0442\u044c \u0424\u0418\u041e \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter&quot; \/&gt;     &lt;\/StackPanel&gt; &lt;\/Page&gt; <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 namespace, \u044f \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u0438\u0432\u0430\u044e \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 \u0438\u0437 \u043f\u0430\u043d\u0435\u043b\u0438 Tools:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/55b\/f30\/ba9\/55bf30ba9ee5195aa454252cbb92d103.png\"\/><br \/>  \u041d\u0443 \u0430 \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430, \u043d\u0443 \u0438\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0432 \u043c\u043e\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/163135\/\"> http:\/\/habrahabr.ru\/post\/163135\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/269\/7c0\/dad\/2697c0dadf9c1cee2c41522b68126591.png\" align=\"left\"\/>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0441\u0442\u0430\u043b\u043e \u043c\u043e\u0434\u043d\u044b\u043c, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0449\u0435\u0439 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f TextBox-\u0430 \u0435\u0449\u0435 \u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c TextBox-\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443. \u0414\u043e\u043b\u0436\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0432\u0435\u043b, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u043b \u0442\u0435\u043a\u0441\u0442, \u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041d\u0435 \u0431\u043e\u0433 \u0432\u0435\u0441\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u043d\u043e \u0442.\u043a. \u0443 <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/windows.ui.xaml.controls.controltemplate(v=win.10).aspx#properties\">ControlTemplate<\/a> \u0432 Windows Store \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0438\u043b\u0435\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0432\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0434 Windows Store \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043c\u043e\u0436\u0435\u0442 \u043a\u0442\u043e-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u043a\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-163135","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163135"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163135\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}