<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Elegant Code &#187; Visual Studio</title>
	<atom:link href="http://elegantcode.com/tag/vsts/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buy Betnovate Without Prescription</title>
		<link>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-your-first-winrt-watermarktextbox-control</link>
		<comments>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:44:05 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Metro]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[winrt]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/</guid>
		<description><![CDATA[Unless you have been living under a rock the past few days you already know about the recent release of Windows 8 Consumer Preview and Visual Studio 11 Beta Buy Betnovate Without Prescription, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to [...]]]></description>
			<content:encoded><![CDATA[<p> <p>Unless you have been living under a rock the past few days you already know about the recent release of <a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview" target="_blank">Windows 8 Consumer Preview</a> and <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank">Visual Studio 11 Beta</a> <b>Buy Betnovate Without Prescription</b>, .&#160; Since I know you already downloaded and installed all the shiny new toys, let’s take a quick look at how to get started writing a custom control for the new metro style applications.&#160; There is no better control to start with than the ever popular WatermarkTextBox control.</p>  <h4>Setting up the Solution</h4>  <p>First start off by creating a new metro style application in Visual Studio 11 beta.&#160; A blank application will work just fine for our purposes.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb1.png" width="644" height="394" /></a></p>  <p>When your solution loads right click the project and select&quot; “Add New Item”.&#160; When the dialog appears choose the “Template Control” item template.&#160; Of course give it a name of WatermarkTextBox.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image2.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb2.png" width="644" height="394" /></a></p>  <p>You will notice that the Template control is just like a Silverlight or WPF custom control.&#160; It comes with a class file and a corresponding style in the Generic.xaml file.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image3.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb3.png" width="288" height="371" /></a></p>  <h4>Writing the Control</h4>  <p>Our WatermarkTextBox control is going to derive from the TextBox class that is already provided by Microsoft.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9e5d5c90-24fd-472a-a206-1342f112d743" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">sealed</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">class</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000"> : </span><span style="background:#ffffff;color:#2b91af">TextBox</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br>     <span style="background:#ffffff;color:#000000">{</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000">}</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Having said that, we don’t want to reinvent the wheel when it comes to styling the TextBox we are deriving from.&#160; So let’s save some time by dropping a TextBox onto the BlankPage.xaml page.&#160; Now right click the TextBox on the design surface and select “Edit Template –&gt; Edit a Copy”.&#160; This will create the default TextBlock style that we can use in our WatermarkTextBox ControlTemplate.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb4.png" width="403" height="459" /></a></p>  <p>Now open up the Generic.xaml file and replace this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfe3553a-3424-479e-bc5a-6aa2734cf447" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>With this:</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739afa4b-520d-4687-b6b9-afbfbafefb7d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinWidth&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinWidth}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;MinHeight&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxMinHeight}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderThickness&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> InputControlBorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontFamily&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontFamily}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;FontSize&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ContentFontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.HorizontalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.VerticalScrollBarVisibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Hidden&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;ScrollViewer.ZoomMode&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Padding&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxPaddingThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;local:WatermarkTextBox&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButtonStyle&quot;</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;Template&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#ff0000"> TargetType</span><span style="background:#ffffff;color:#0000ff">=&quot;Button&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;/&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonHoverGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Pressed&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;&gt;</span><br>                                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonPressedGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;GlyphElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxButtonGlyphBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> FontFamily</span><span style="background:#ffffff;color:#0000ff">=&quot;Segoe UI Symbol&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;X&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Center&quot;/&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.Resources</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;*&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ColumnDefinition</span><span style="background:#ffffff;color:#ff0000"> Width</span><span style="background:#ffffff;color:#0000ff">=&quot;Auto&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid.ColumnDefinitions</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;CommonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Disabled&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Background&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledFillBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderBrush&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledBorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Foreground&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxDisabledTextBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Normal&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxRestBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PointerOver&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverFillOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;/&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DoubleAnimation</span><span style="background:#ffffff;color:#ff0000"> Duration</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;</span><span style="background:#ffffff;color:#ff0000"> To</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> TextBoxHoverBorderOpacity}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Opacity&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;/&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;Focused&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonStates&quot;&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonVisible&quot;&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ButtonCollapsed&quot;/&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateManager.VisualStateGroups</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Grid</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ControlTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Style</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Let’s test what we have so far.&#160; Add an instance of our WatermarkTextBox control to the BlankPage.xaml.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5b472f91-aaa4-4de0-a251-52d2d2c82795" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Page</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Class</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTextBoxControl.BlankPage&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">x</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">local</span><span style="background:#ffffff;color:#0000ff">=&quot;using:WatermarkTextBoxControl&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">d</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> xmlns</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">mc</span><span style="background:#ffffff;color:#0000ff">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span><br>    <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> mc</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Ignorable</span><span style="background:#ffffff;color:#0000ff">=&quot;d&quot;&gt;</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Page</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb5.png" width="275" height="60" /></a></p>  <p>Looks great.&#160; Just like the default Windows TextBox.&#160; Now we need to start adding our Watermark elements to it.&#160; Obviously we need a property for our Watermark.&#160; Your first thought maybe to define it as a type of string, but I want to support any element, not just text, so I will define it as a type of Object.&#160; This will allow me to nest controls inside of the Watermark property instead of being restricted to a simple string.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:db082020-3ed1-4025-b979-4d938ab172a9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;Watermark&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> Watermark</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>I also want to define a DataTemplate that will be used to define the ContentTemplate for the Watermark.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fd631c4b-41c5-442b-8fb7-9704ba9c139b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">static</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000"> WatermarkTemplateProperty = </span><span style="background:#ffffff;color:#2b91af">DependencyProperty</span><span style="background:#ffffff;color:#000000">.Register(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">), </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">PropertyMetadata</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#0000ff">null</span><span style="background:#ffffff;color:#000000">));</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000"> WatermarkTemplate</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">get</span><span style="background:#ffffff;color:#000000"> { </span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">DataTemplate</span><span style="background:#ffffff;color:#000000">)GetValue(WatermarkTemplateProperty); }</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">set</span><span style="background:#ffffff;color:#000000"> { SetValue(WatermarkTemplateProperty, </span><span style="background:#ffffff;color:#0000ff">value</span><span style="background:#ffffff;color:#000000">); }</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>  <p>Now we need to modify our control template to support our new Watermark property. We will do this by simply adding a ContentPresenter to our Template.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4431129a-2a62-4f39-abc1-6c7e0c47b874" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate price, coupon</b>, <b>Where to buy Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BackgroundElement&quot;</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Background}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Border</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;BorderElement&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderBrush</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.ColumnSpan</span><span style="background:#ffffff;color:#0000ff">=&quot;2&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ScrollViewer</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;ContentElement&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> HorizontalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.HorizontalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Padding</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollBarVisibility</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollBarVisibility}&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalScrollMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.VerticalScrollMode}&quot;</span><span style="background:#ffffff;color:#ff0000"> ZoomMode</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> ScrollViewer</span><span style="background:#ffffff;color:#0000ff">.ZoomMode}&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Button</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;DeleteButton&quot;</span><span style="background:#ffffff;color:#ff0000"> BorderThickness</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> BorderThickness}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Grid.Column</span><span style="background:#ffffff;color:#0000ff">=&quot;1&quot;</span><span style="background:#ffffff;color:#ff0000"> FontSize</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> FontSize}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><span style="background:#ffffff;color:#ff0000"> Style</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DeleteButtonStyle}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;</span><span style="background:#ffffff;color:#ff0000"> VerticalAlignment</span><span style="background:#ffffff;color:#0000ff">=&quot;Stretch&quot;/&gt;</span></div> </div> </div>  <p>Oh, <b>effects of Betnovate</b>, <b>Is Betnovate safe</b>, and don’t forget the ContentTemplate that will define the default look for our watermark.&#160; This is placed at the top of the Generic.xaml.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:baa07ca8-8bac-40b7-aece-36f27dedd0e5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>purchase Betnovate online no prescription</b>, <b>Online buy Betnovate without a prescription</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Key</span><span style="background:#ffffff;color:#0000ff">=&quot;DefaultWatermarkTemplate&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentControl</span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">Binding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#ff0000"> Foreground</span><span style="background:#ffffff;color:#0000ff">=&quot;Gray&quot;</span><span style="background:#ffffff;color:#ff0000"> IsTabStop</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DataTemplate</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>And we need to set the default value in a style setter.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7175292-1fca-49aa-85ae-7ff859ab8ec2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate gel, ointment, cream, pill, spray, continuous-release, extended-release</b>, <b>Buy Betnovate online cod</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Setter</span><span style="background:#ffffff;color:#ff0000"> Property</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkTemplate&quot;</span><span style="background:#ffffff;color:#ff0000"> Value</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> DefaultWatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot; /&gt;</span></div> </div> </div>    <p>As you can see, I placed the ComtentPresenter after the ContentElement and before the DeleteButton elements.&#160; You may have also noticed that I set the visibility to Collapsed.&#160; This is because by default I want the Watermark hidden.&#160; So that means we need to add some code to show the watermark when the text box has no focus and it has no text.&#160; First we need to add some visual states to the VisualStateManager.</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b482c41e-77da-4f54-ad99-4493ac8b1f73" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from canada</b>, <b>Betnovate without prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkStates&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkVisible&quot;&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetProperty</span><span style="background:#ffffff;color:#0000ff">=&quot;Visibility&quot;</span><span style="background:#ffffff;color:#ff0000"> Storyboard.TargetName</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#ff0000"> KeyTime</span><span style="background:#ffffff;color:#0000ff">=&quot;0&quot;&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><span style="background:#ffffff;color:#000000">Visible</span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Visibility</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame.Value</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>                 <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">DiscreteObjectKeyFrame</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">ObjectAnimationUsingKeyFrames</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">Storyboard</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">VisualState</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;WatermarkCollapsed&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">VisualStateGroup</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>  <p>Next we need to add some code to handle the GotFocus and LostFocus events of the TextBox.&#160; Start by adding event handlers for the events in the constructor.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e05e8b51-c571-48bc-9ee7-10b58950f385" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>buy Betnovate from mexico</b>, <b>Japan, craiglist, ebay, overseas, paypal</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.DefaultStyleKey = </span><span style="background:#ffffff;color:#0000ff">typeof</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#2b91af">WatermarkTextBox</span><span style="background:#ffffff;color:#000000">);</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.GotFocus += WatermarkTextBox_GotFocus;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.LostFocus += WatermarkTextBox_LostFocus;</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>Now add the code that does the heavy lifting.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:367568eb-5f40-4e4a-9861-50bab0c05329" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate brand name</b>, <b>Purchase Betnovate</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_GotFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, <b>where can i buy cheapest Betnovate online</b>, <b>Canada, mexico, india</b>, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState();</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> WatermarkTextBox_LostFocus(</span><span style="background:#ffffff;color:#0000ff">object</span><span style="background:#ffffff;color:#000000"> sender, </span><span style="background:#ffffff;color:#2b91af">RoutedEventArgs</span><span style="background:#ffffff;color:#000000"> e)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> hasFocus = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//if our text is empty and our control doesn&#39;t have focus then show the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//otherwise the control eirther has text or has focus which in either case we need to hide the watermark</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (</span><span style="background:#ffffff;color:#2b91af">String</span><span style="background:#ffffff;color:#000000">.IsNullOrEmpty(Text) &amp;&amp; !hasFocus)</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkVisible&quot;</span><span style="background:#ffffff;color:#000000">); </span><span style="background:#ffffff;color:#008000">//TODO: create constants for our magic strings</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">else</span><br>         <span style="background:#ffffff;color:#000000">GoToVisualState(</span><span style="background:#ffffff;color:#800000">&quot;WatermarkCollapsed&quot;</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span><br> <br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> GoToVisualState(</span><span style="background:#ffffff;color:#0000ff">string</span><span style="background:#ffffff;color:#000000"> stateName, <b>herbal Betnovate</b>, <b>Taking Betnovate</b>, </span><span style="background:#ffffff;color:#0000ff">bool</span><span style="background:#ffffff;color:#000000"> useTransitions = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">)</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">VisualStateManager</span><span style="background:#ffffff;color:#000000">.GoToState(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, stateName, <b>rx free Betnovate</b>, <b>Order Betnovate online c.o.d</b>, useTransitions);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>One last thing is to make sure we set the visual state when the template is applied.&#160; So override the OnApplyTemplate method as follows.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d36c00a9-70e0-4692-9b7c-92d0a6de7deb" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>Betnovate schedule</b>, <b>Betnovate dosage</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">protected</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">override</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> OnApplyTemplate()</span><br> <span style="background:#ffffff;color:#000000">{</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">base</span><span style="background:#ffffff;color:#000000">.OnApplyTemplate();</span><br> <br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#008000">//we need to set the initial state of the watermark</span><br>     <span style="background:#ffffff;color:#000000">GoToWatermarkVisualState(</span><span style="background:#ffffff;color:#0000ff">false</span><span style="background:#ffffff;color:#000000">);</span><br> <span style="background:#ffffff;color:#000000">}</span></div> </div> </div>    <p>That should do it.&#160; Now let check it out in action. Be sure to provide a watermark for our control.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0630f9fd-701c-4d59-bcdb-4c659a352180" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>Betnovate cost</b>, <b>Betnovate no prescription</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Background</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">StaticResource</span><span style="background:#ffffff;color:#ff0000"> ApplicationPageBackgroundBrush}</span><span style="background:#ffffff;color:#0000ff">&quot;&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#ff0000"> Watermark</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot; /&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb6.png" width="279" height="60" /></a></p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb7.png" width="279" height="63" /></a></p>  <h4>Yes, <b>Betnovate from mexico</b>, <b>Betnovate description</b>, we found a bug</h4>  <p>Everything seems to be working perfectly.&#160; Until you actually try to use a watermark that isn’t text.&#160; Try using this as your watermark.</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:31c7fdd2-45ff-4ca5-86cb-5fe1adc8c10e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, <b>online buying Betnovate</b>, <b>Betnovate pics</b>, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#ff0000"> Orientation</span><span style="background:#ffffff;color:#0000ff">=&quot;Horizontal&quot;&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">Image</span><span style="background:#ffffff;color:#ff0000"> Source</span><span style="background:#ffffff;color:#0000ff">=&quot;Images/PencilTool16.png&quot;</span><span style="background:#ffffff;color:#ff0000"> Stretch</span><span style="background:#ffffff;color:#0000ff">=&quot;None&quot;</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff"> /&gt;</span><br>             <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">TextBlock</span><span style="background:#ffffff;color:#ff0000"> Text</span><span style="background:#ffffff;color:#0000ff">=&quot;Edit Text&quot;</span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;4,0, <b>Betnovate interactions</b>, <b>Get Betnovate</b>, 0,0&quot; /&gt;</span><br>         <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">StackPanel</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br>     <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox.Watermark</span><span style="background:#ffffff;color:#0000ff">&gt;</span><br> <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;/</span><span style="background:#ffffff;color:#a31515">local</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#a31515">WatermarkTextBox</span><span style="background:#ffffff;color:#0000ff">&gt;</span></div> </div> </div>    <p>Now let’s see our results.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb8.png" width="275" height="60" /></a></p>  <p>Hey!&#160; Where is my watermark?&#160; Well there appears to be a bug with a ContentPresenter/ContentControl that will not display content when the ContentTemplate has been set and the Content is anything else except a string.&#160; This just so happens to be the exact same bug that exists in Silverlight.&#160; Interesting I know.&#160; So how do we fix it?&#160; We have to delete the usage of our Watermarktemplate until this gets fixed.</p>  <p>Change:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:715e6953-8e22-4e2e-8b8f-a4700760cfa9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>real brand Betnovate online</b>, <b>Betnovate steet value</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> ContentTemplate</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> WatermarkTemplate}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>To:</p>    <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6f626a1e-1d1c-489a-96cb-7f056392a0a8" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', <b>my Betnovate experience</b>, <b>Betnovate wiki</b>, Courier, Monospace; font-size: 10pt"> <div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">&lt;</span><span style="background:#ffffff;color:#a31515">ContentPresenter</span><span style="background:#ffffff;color:#ff0000"> x</span><span style="background:#ffffff;color:#0000ff">:</span><span style="background:#ffffff;color:#ff0000">Name</span><span style="background:#ffffff;color:#0000ff">=&quot;PART_Watermark&quot;</span><span style="background:#ffffff;color:#000000"> </span><br>               <span style="background:#ffffff;color:#000000">                                         </span><span style="background:#ffffff;color:#ff0000"> Content</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Watermark}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><span style="background:#ffffff;color:#000000"></span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> IsHitTestVisible</span><span style="background:#ffffff;color:#0000ff">=&quot;False&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Margin</span><span style="background:#ffffff;color:#0000ff">=&quot;{</span><span style="background:#ffffff;color:#a31515">TemplateBinding</span><span style="background:#ffffff;color:#ff0000"> Padding}</span><span style="background:#ffffff;color:#0000ff">&quot;</span><br>                  <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#ff0000"> Visibility</span><span style="background:#ffffff;color:#0000ff">=&quot;Collapsed&quot;/&gt;</span></div> </div> </div>    <p>Now let’s see what happens.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2012/03/image9.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://elegantcode.com/wp-content/uploads/2012/03/image_thumb9.png" width="276" height="59" /></a></p>  <p>Now that’s much better.&#160; Let’s hope this is just a beta bug.</p>  <p><a href="http://brianlagunas.com/downloads/source/WatermarkTextBoxControl.zip" target="_blank">Download the source</a></p>, <b>low dose Betnovate</b>.  Order Betnovate from mexican pharmacy.  Online Betnovate without a prescription.  Betnovate long term.  Betnovate photos.  Betnovate samples.</p>
<p></p>
<p><b>Similar posts:</b> <a href='http://elegantcode.com/?p=4354'>Glucophage For Sale</a>. <a href='http://elegantcode.com/?p=4681'>Betnovate For Sale</a>. <a href='http://elegantcode.com/?p=4291'>Buy Vibramycin Without Prescription</a>. <a href='http://elegantcode.com/?p=4268'>Soma For Sale</a>. <a href='http://elegantcode.com/?p=4276'>Buy Viagra Without Prescription</a>. <a href='http://elegantcode.com/?p=4831'>Buying Glucophage online over the counter</a>. <a href='http://elegantcode.com/?p=4846'>Effects of Ketoconazole Cream</a>. <a href='http://elegantcode.com/?p=5014'>Order Quinine online overnight delivery no prescription</a>. <a href='http://elegantcode.com/?p=4232'>Japan, craiglist, ebay, overseas, paypal</a>. <a href='http://elegantcode.com/?p=4867'>Ordering Soma online</a>.<br />
<b>Trackbacks from:</b> <a href='http://home.officesnapshots.com/?p=250'>Buy Betnovate Without Prescription</a>. <a href='http://reversemortgagedaily.com/?p=14063'>Buy Betnovate Without Prescription</a>. <a href='http://social-blend.com/?p=1202'>Buy Betnovate Without Prescription</a>. <a href='http://www.quarterlives.com/?p=454'>Buy Betnovate Without Prescription</a>. <a href='http://4realz.net/?p=758'>Buy Betnovate Without Prescription</a>. <a href='http://blog.farmland.org/?p=3440'>Betnovate dosage</a>. <a href='http://linuxologist.com/?p=129'>Betnovate price, coupon</a>. <a href='http://www.themusclecarplace.com/?p=3456'>Betnovate no rx</a>. <a href='http://www.thegriffonnews.com/?p=10192'>Betnovate use</a>. <a href='http://www.greatgreengoods.com/?p=3270'>Kjøpe Betnovate på nett, köpa Betnovate online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2012/03/06/create-your-first-winrt-watermarktextbox-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pluralcast 21 &#8211; Extending Visual Studio 2010 with Kate Gregory</title>
		<link>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pluralcast-21-extending-visual-studio-2010-with-kate-gregory</link>
		<comments>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 03:42:23 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Pluralcast]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/</guid>
		<description><![CDATA[Listen Now! Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us [...]]]></description>
			<content:encoded><![CDATA[<a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3"><img style="display: inline; border-width: 0px;" title="PlayIcon" src="http://elegantcode.com/wp-content/uploads/2010/08/PlayIcon.png" border="0" alt="PlayIcon" width="24" height="24" /></a> <a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" target="_blank">Listen Now</a>!

Kate Gregory has probably forgotten more coding tricks than I have ever learned. That means that she likes her Visual Studio with meat and potatoes. With the new extensibility model in Visual Studio 2010,  Visual Studio can now be the primary source or protein in your IDE diet. In this episode Kate tells us how to add a little hot sauce using Visual Studio extensions.

<a href="http://elegantcode.com/wp-content/uploads/2010/08/kategregory.jpg"><img style="margin: 5px; display: inline; border-width: 0px;" title="kate-gregory" src="http://elegantcode.com/wp-content/uploads/2010/08/kategregory_thumb.jpg" border="0" alt="kate-gregory" width="112" height="142" align="right" /></a> Kate is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ along with SharePoint and both web and client development, especially for Windows 7. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

Kate is the author of over a dozen books and speaks at DevTeach, TechEd (USA, Europe, Africa), and TechDays, among others. Kate is a C++ MVP, a founding sponsor of the Toronto .NET Users Group, the founder of the East of Toronto .NET Users group, a member of the INETA speakers bureau, and a member of adjunct faculty at Trent University in Peterborough. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award.

<strong>Show Links</strong>
<ul>
	<li><a href="http://www.gregcons.com/kateblog/">Kate’s Blog</a></li>
	<li><a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=vs2010-vsx">Kate’s Pluralsight course, <em>Customizing and Extending Visual Studio 2010</em></a></li>
	<li><a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx">Visual Studio Extensibility (VSX)</a></li>
	<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">Visual Studio SDK</a></li>
	<li><a href="http://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a></li>
	<li><a href="http://code.msdn.microsoft.com/vsx">The Code Gallery</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/08/01/pluralcast-21-extending-visual-studio-2010-with-kate-gregory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_021_vsx_kate_gregory.mp3" length="41629427" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio: Open in Full XAML View by Default</title>
		<link>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-open-in-full-xaml-view-by-default</link>
		<comments>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:49:14 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/</guid>
		<description><![CDATA[So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane [...]]]></description>
			<content:encoded><![CDATA[<p>So I am using Visual Studio 2008 for developing WPF and Silverlight applications.&#160; The one thing that really annoys me is when I open a .XAML file and then Visual Studio automatically opens the file in split view mode.&#160; I am sure you are well aware of how VS 2008 support for the preview pane blows.&#160; So now I have to sit and wait for VS to render my view in the preview pane, and sometimes it can take a while, if it doesn’t just completely crash.&#160; Sometimes I take the extra time to go grab a snack and beverage of my choice.&#160; </p>  <p>So here is a hidden performance increasing jewel you might find useful.&#160; We can set the default open mode to be in full XAML view.</p>  <p>First thing you need to do is in Visual Studio go to your Tools ==&gt; Options ==&gt; Text Editor ==&gt; XAML ==&gt; Miscellaneous.&#160; There you will see an option for “Always open documents in full XAML view”.&#160; Check that box.</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2010/04/image.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="xaml options for opening in full xaml view" border="0" alt="xaml options for opening in full xaml view" src="http://elegantcode.com/wp-content/uploads/2010/04/image_thumb.png" width="244" height="146" /></a> </p>  <p>Now every time you open a XAML file it will open in full XAML view and give you one less thing to gripe about.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/04/01/visual-studio-open-in-full-xaml-view-by-default/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>If (Successful) { throw new Exception(); }</title>
		<link>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-successful-throw-new-exception</link>
		<comments>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:56:59 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/</guid>
		<description><![CDATA[So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report. Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was installing Visual Studio 2010 Ultimate Beta 2 on one of my machines the other day and the funniest thing happened.&#160; After it successfully installed, I was prompted to send an error report.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="error" border="0" alt="error" src="http://elegantcode.com/wp-content/uploads/2009/12/error.jpg" width="380" height="209" /> </p>  <p>Since when is a successful operation a problem?&#160; Now, of course, I am assuming this is intentional and is transmitting information back to Microsoft to tell them that it was successful.&#160; But, I can see how easy it would be for someone to mistaken this for a legitimate error.&#160; Then again, maybe it is.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/12/24/if-successful-throw-new-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Default Files in Visual Studio Test Projects</title>
		<link>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=default-files-in-visual-studio-test-projects</link>
		<comments>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:28:50 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/</guid>
		<description><![CDATA[I can’t believe I have lived this long without discovering this little gem inside VS options. You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!]]></description>
			<content:encoded><![CDATA[<p>I can’t believe I have lived this long without discovering this little gem inside VS options.</p>  <p>You know how Visual Studio creates default files in a test project when you create a new one? Those days of immediate file deletion are over, baby!</p>  <p><a href="http://elegantcode.com/wp-content/uploads/2008/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/07/image-thumb1.png" width="244" border="0" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/26/default-files-in-visual-studio-test-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disabling ReSharper</title>
		<link>http://elegantcode.com/2008/07/05/disabling-resharper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-resharper</link>
		<comments>http://elegantcode.com/2008/07/05/disabling-resharper/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 18:43:40 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/07/05/disabling-resharper/</guid>
		<description><![CDATA[What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools. So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In [...]]]></description>
			<content:encoded><![CDATA[<p>What? Why would anyone want to do that? In my case, I am building a class (as in teach a class) for TDD that uses only Visual Studio native tools.</p>  <p>So, how do I disable resharper to make sure I don’t get any pesky resharper files into my directory structure? By using Visual Studio’s Add-In manager.</p>  <ol>   <li>In Visual Studio go to Tools &gt; Add-in Manager. </li>    <li>Uncheck the ReSharper 4 Add-in and then unselect the Startup box so that when you start up VS the next time, the Add-in won’t load. </li> </ol>  <p>Not so fast, Gerome! Turns out that when ReSharper installed, it installed in such a way as to make this impossible. The fix is easy.</p>  <p>In your ReSharper Program Files directory, JetBrains\ReSharper\v4.0\Bin, find the Product.VisualStudio.90.AddIn file. Visual Studio needs to be able to modify this file and the installer laid in down read only. Make the file write-able and go back to VS and go through the process again. This time you will be able to turn off startup.</p>  <p>Even after doing this, the ReSharper menu remains in my IDE, which bugs me. All of the functionality is disabled and the context features in the code files are gone, but still…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/07/05/disabling-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control with 2008 SP1</title>
		<link>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=version-control-with-2008-sp1</link>
		<comments>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 14:44:46 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/</guid>
		<description><![CDATA[I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with Visual Studio 2008 SP1. Thank goodness. From the web site: Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to [...]]]></description>
			<content:encoded><![CDATA[<p>I am a simple man. All I ever wanted was drag and drop for source control. That folder chooser dialog was a bear. Now we will get it with <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 SP1</a>. Thank goodness. From the web site:</p> <ul> <li>Simplified the user experience through cleaner "Add to Source Control" dialogs, drag and drop support to the Source Control Explorer and a much easier to use "Workspace" dialog for working folder mappings.  <li>Version control now automatically supports non-solution controlled files.  <li>Various changes to the Source Control Explorer such as a new checkin date/time display column, local path hyperlink support and en editable source location field.</li></ul> <p>I am not a big fan of installing a beta SP on may dev laptop, but I gotta tell ya, I did it for that feature alone.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/12/version-control-with-2008-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest on Checkout is Satan</title>
		<link>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-latest-on-checkout-is-satan</link>
		<comments>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 22:28:17 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/</guid>
		<description><![CDATA[If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio. Go here: And get this screen. Why? Because if you have made some changes to a file [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Team System, there is feature in the source control option in your project level settings that you should be aware of. Right click your team project in the Project Explorer window of Visual Studio.</p> <p>Go here:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb.png" width="404" border="0"></a> </p> <p>And get this screen.</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="369" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb1.png" width="404" border="0"></a> </p> <p>Why? Because if you have made some changes to a file while it wasn't checked out, you will not have the option to merge to your local machine. This option will simply overwrite your local code file.</p> <p>Why does this feature exist? Because oodles of people asked for it because they were used to it in Source Safe, and the team relented.</p> <p>Repeat: This is a bad idea!</p> <p>If, however, you are a person who simply must have this turned on in order to feel snug, there is a way to do it without making your entire team experience the hell that will be yours.</p> <p>In Visual Studio, go to Tools &gt; Options &gt; Source Control &gt; Environment and do this:</p> <p><a href="http://elegantcode.com/wp-content/uploads/2008/06/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/06/image-thumb2.png" width="404" border="0"></a> </p> <p>I warned you.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/11/get-latest-on-checkout-is-satan/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Architecture Modeling in Rosario with Peter Provost</title>
		<link>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecture-modeling-in-rosario-with-peter-provost</link>
		<comments>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 15:33:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/</guid>
		<description><![CDATA[Yes, that Peter Provost, and this is a great Tech Ed session. We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, that Peter Provost, and this is a great Tech Ed session. </p> <p>We know that the modeling tools in Team System 2008 are, well... there's room for improvement. How valuable is a Logical Data Center Design Model when we can't derive it from a reverse engineering action? There has also been much frustration with the lack of standard UML support in Visual Studio. Guess what?</p> <p>Rosario proposes that we promote modeling to a first class citizen of the complete Application Lifecycle Management model. Here's my major takeaway: The way modeling is being supported enables visual exploration of your code base in a way that is seamless with the development process. This can honestly change the fundamental code development experience.</p> <p>Also, I can plan on sun setting all my organizations Sparx licenses. Cool.</p> <ul> <li>UML 2.1 at the logical layer</li> <li>DSLs at the physical layer</li> <li>Generate models from existing assets. This is being discussed as "Architectural Discovery" which is a hilarious term in itself.</li> <li>The April CTP has the following </li> <ul> <li>UML Class Diagram</li> <li>UML Use Cases Diagram</li> <li>UML Sequence Diagram</li> <li>UML Component Diagram</li> <li>UML Activity Diagram</li> <li>Architecture Explorer</li> <li>There is a unifying model underlying all of this, the diagrams are simply views upon that model.</li></ul> <li>Newer versions will have some of the features we got to see today. These will come in another CTP later this year.</li> <ul> <li>Layer Diagram</li> <ul> <li>Seriously cool, this allows to separate concerns of our tiers in a system.</li> <li>I can bind my namespaces to logical layers of my application</li></ul> <li>Also has some seriously cool visualization tools for looking through your code. </li> <ul> <li>Using these views, we can see our cohesion and inheritance in physical form. </li> <li>How about namespace visualization using a graph model? Dang, this is cool.</li> <li>How about a dependency visualization? NDepend better look out because this one isn't half bad.</li> <li>AND, all views enable us to click right through to our source code. Neato.</li></ul> <li>XMI support (seriously, wow). This means we can export models from other applications like Sparx EA, Altova, and Rational and bring them right into Visual Studio. Oh, and it will pull Visio models as well.</li> <li>Round tripping of component models to code</li></ul> <li>Peter actually built some sequence diagrams and I gotta say that this UX is going to be MUCH better than Enterprise Architect, which will soon loose it's Market Share. Even use cases look neater.</li> <li>Sequence diagrams can be round tripped with classes and even methods. This means we can examine the complexity of our code at a usable level, and do it visually. </li></ul> <p>What if you could prescribe separation of tiers and limit leaky abstractions?</p> <h2>Nuggets</h2> <p>"Any system should be possible to represent on a white broad in no more than 13 boxes."</p> <p>"Using model is simply a way of managing complexity."</p> <p>"There will be a model store capability that means we don't need to keep our models in the same solutions with our code." But you can :)</p> <p>Because the models are all built on DSLs, there is someone out there who has automated the process of building test cases from activity diagrams. That is hotter than a 2 dollar pistol.</p> <p>We can attach other files like Word files to your model itself. </p> <p>What if we could could light up the models in the debugger to see highlighting of current activity in a sequence diagram? Neato.</p> <p>They are trying to figure out how to include support for generating design patterns like found in EA and Rational. This is fun because you can generate domain specific code with a fundamental implementation in a known design pattern like Forward Controller or something.</p> <p>I need a bigger monitor. Seriously, boss. I need a bigger monitor.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/architecture-modeling-in-rosario-with-peter-provost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Data Dude Extensibility &#8211; How IBM integrated DB2 into Visual Studio</title>
		<link>http://elegantcode.com/2008/06/06/data-dude-extensibility-how-ibm-integrated-db2-into-visual-studio/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=data-dude-extensibility-how-ibm-integrated-db2-into-visual-studio</link>
		<comments>http://elegantcode.com/2008/06/06/data-dude-extensibility-how-ibm-integrated-db2-into-visual-studio/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 13:52:59 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Tools & Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/06/data-dude-extensibility-how-ibm-integrated-db2-into-visual-studio/</guid>
		<description><![CDATA[I am sitting in a room at Tech Ed 208 with about 15 people who got up early enough for this session. I am blown away there aren't more people in here, but I guess the after-party at Universal Studios last night kept people in bed late this morning. This session is a joint presentation [...]]]></description>
			<content:encoded><![CDATA[<p>I am sitting in a room at Tech Ed 208 with about 15 people who got up early enough for this session. I am blown away there aren't more people in here, but I guess the after-party at Universal Studios last night kept people in bed late this morning. This session is a joint presentation by <a href="http://blogs.msdn.com/gertd/" target="_blank">Gert Drapers</a> (the actual Data Dude) and Brent Gross the from IBM for the DB2 integration project team.</p> <p>It is clear (and stated) that other RDBMS vendors will follow suit as MS has provided a fundamentally pluggable model for vendors to integrate their DBs into Visual Studio with a provider model. Can you smell Oracle, boys and girls? I can. Gert is being vague about who they are working with. MySQL will be cool.</p> <p>There are several levels of extensibility:</p> <ul> <li>DB Provider</li> <ul> <li>This is the actual connectivity to your own RDBMS. This provider is responsible for talking to the VS model layer for the DB project and translating between your DB and the model. </li></ul> <li>VS Features</li> <ul> <li>The ability to alter features in Visual Studio, like: </li> <ul> <li>Refactorings available for a given provider.</li> <li>Syntax highlighting</li> <li>language formatting rules for reverse engineering operations</li></ul> <li>Static analysis rules for your particular SQL language</li> <ul> <li>Yes, you get static analysis rules for TSQL. This is the death clock for select * from ...</li> <li>Static analysis in BD2 SQL may be different than that in MS TSQL</li> <li>You can write your own static analysis rules in .Net by inheriting from the provided Rule class or *yeah* implementing an interface (are we hearing a theme out of MS?) I suppose if your company were anal enough, you could actually implement your proprietary naming convention rules as static analysis rules. Gert actually did this is an demo by writing a rule that checked column names to ensure they were in Pascal case. Neato. The funny part is when some of the developers in the room started telling him how his demo code could be refactored. Lol.</li></ul></ul> <li>Model Extensibility</li> <ul> <li>VS actually works against a model of the data store and lets the provider do the translation.</li> <li>Using the model paradigm for DB development provides full round trip model to implementation support for any given DB.</li> <li>Gert actually showed a little command line app that looked at a Northwind DB in Access and a different Northwind DB in SQL Server and compared them. There would be very different SQL syntaxes if we were simply comparing creation scripts. The DBs showed as the same. More accurately, the models checked as the same. Cool.</li> <li>So, I could script the process of taking a DB2 database and migrating it to SQL Server, or visa versa, in this model paradigm.</li></ul></ul> <p>This session signaled several things to me.</p> <ol> <li>MS products really are being designed with extensibility and integration in mind. No really, this time.</li> <li>The Data Dude model of working with databases has genuine merit. The days of SSMS (SQL Server Management Studio) and the Query Analyzer fan base are numbered. Treating DBAs as developers really is a better model.</li> <li>Something different is occurring at MS with the changing of the guard.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/06/data-dude-extensibility-how-ibm-integrated-db2-into-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

