<?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>presentationlayer</title>
	<atom:link href="http://presentationlayer.info/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://presentationlayer.info</link>
	<description>Be the guy asking all the questions.</description>
	<lastBuildDate>Mon, 11 May 2009 08:32:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Trace Bindings in WPF</title>
		<link>http://presentationlayer.info/?p=3</link>
		<comments>http://presentationlayer.info/?p=3#comments</comments>
		<pubDate>Mon, 11 May 2009 08:31:15 +0000</pubDate>
		<dc:creator>floriandusch</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[binding]]></category>

		<guid isPermaLink="false">http://presentationlayer.info/?p=3</guid>
		<description><![CDATA[How to trace bindings in WPF?
First add the namespace to your xaml file like this:

&#60;ResourceDictionary xmlns=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
 xmlns:x=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;
 xmlns:diagnostics=&#8221;clr-namespace:System.Diagnostics;assembly=WindowsBase&#8221;&#62;

Then add the additional magic to your Binding like this:

&#60;ControlTemplate.Triggers&#62;
 &#60;DataTrigger Binding=&#8221;{Binding diagnostics:PresentationTraceSources.TraceLevel=High, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type c:ScrollViewerWithVisibilityDetectionControl}}, Path=ShowGradient}&#8221; Value=&#8221;false&#8221;&#62;
 &#60;!&#8211; setters here &#8211;&#62;
 &#60;/DataTrigger&#62;
 &#60;/ControlTemplate.Triggers&#62;

Now you get detailed information in the Output window of Visual Studio.  
]]></description>
			<content:encoded><![CDATA[<p>How to trace bindings in WPF?<br />
First add the namespace to your xaml file like this:</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: #f8f8f8;">
<p style="margin: 0px;"><span style="color: blue;">&lt;</span><span style="color: #a31515;">ResourceDictionary</span><span style="color: red;"> xmlns</span><span style="color: blue;">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;</span></p>
<p style="margin: 0px;"><span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">x</span><span style="color: blue;">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;</span></p>
<p style="margin: 0px;"><span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">diagnostics</span><span style="color: blue;">=&#8221;clr-namespace:System.Diagnostics;assembly=WindowsBase&#8221;&gt;</span></p>
</div>
<p>Then add the additional magic to your Binding like this:</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: #f8f8f8;">
<p style="margin: 0px;"><span style="color: blue;">&lt;</span><span style="color: #a31515;">ControlTemplate.Triggers</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #a31515;"> </span><span style="color: blue;">&lt;</span><span style="color: #a31515;">DataTrigger</span><span style="color: red;"> Binding</span><span style="color: blue;">=&#8221;{</span><span style="color: #a31515;">Binding</span><span style="color: red;"> diagnostics</span><span style="color: blue;">:</span><span style="color: red;">PresentationTraceSources</span><span style="color: blue;">.TraceLevel=High,</span><span style="color: red;"> RelativeSource</span><span style="color: blue;">={</span><span style="color: #a31515;">RelativeSource</span><span style="color: red;"> FindAncestor</span><span style="color: blue;">,</span><span style="color: red;"> AncestorType</span><span style="color: blue;">={</span><span style="color: #a31515;">x</span><span style="color: blue;">:</span><span style="color: #a31515;">Type</span><span style="color: red;"> c</span><span style="color: blue;">:</span><span style="color: red;">ScrollViewerWithVisibilityDetectionControl</span><span style="color: blue;">}},</span><span style="color: red;"> Path</span><span style="color: blue;">=ShowGradient}&#8221;</span><span style="color: red;"> Value</span><span style="color: blue;">=&#8221;false&#8221;&gt;</span></p>
<p style="margin: 0px;"><span style="color: #a31515;"> </span><span style="color: green;">&lt;!&#8211; setters here &#8211;&gt;</span></p>
<p style="margin: 0px;"><span style="color: #a31515;"> </span><span style="color: blue;">&lt;/</span><span style="color: #a31515;">DataTrigger</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #a31515;"> </span><span style="color: blue;">&lt;/</span><span style="color: #a31515;">ControlTemplate.Triggers</span><span style="color: blue;">&gt;</span></p>
</div>
<p>Now you get detailed information in the Output window of Visual Studio. <img src='http://presentationlayer.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://presentationlayer.info/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
