<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Silverlight 3 Flip TargetedTriggerAction</title>
	<atom:link href="http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/feed/" rel="self" type="application/rss+xml" />
	<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/</link>
	<description>Simplifing structure without changing results</description>
	<lastBuildDate>Sun, 23 May 2010 01:08:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Joe</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-869</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 22 Mar 2010 17:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-869</guid>
		<description>Yeah I&#039;m getting the Blur effect on the Back too. Been messing around with the code quite a bit too and wasn&#039;t able to solve this. But great work Joel! This is a nice way to implement things. I&#039;ve been creating behaviors like mad, think it&#039;s time to create a bunch of Triggers now.</description>
		<content:encoded><![CDATA[<p>Yeah I&#8217;m getting the Blur effect on the Back too. Been messing around with the code quite a bit too and wasn&#8217;t able to solve this. But great work Joel! This is a nice way to implement things. I&#8217;ve been creating behaviors like mad, think it&#8217;s time to create a bunch of Triggers now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-855</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 28 Jan 2010 07:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-855</guid>
		<description>When adding a button to the back side I cant click it. Just like the person above me who cant access textbox. 
Does anyone now how to do this?</description>
		<content:encoded><![CDATA[<p>When adding a button to the back side I cant click it. Just like the person above me who cant access textbox.<br />
Does anyone now how to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-851</link>
		<dc:creator>Anne</dc:creator>
		<pubDate>Wed, 13 Jan 2010 09:57:49 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-851</guid>
		<description>Hi,
Still looking for an explanation on why the back panel is blurry, has anybody found a way to get rid of this?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Still looking for an explanation on why the back panel is blurry, has anybody found a way to get rid of this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raja</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-829</link>
		<dc:creator>Raja</dc:creator>
		<pubDate>Wed, 23 Sep 2009 01:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-829</guid>
		<description>hi

Can you please help me with the blur effect that we get on the back panel of the controls...any help would be appreciated

Thanks
Raja</description>
		<content:encoded><![CDATA[<p>hi</p>
<p>Can you please help me with the blur effect that we get on the back panel of the controls&#8230;any help would be appreciated</p>
<p>Thanks<br />
Raja</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tropics</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-827</link>
		<dc:creator>tropics</dc:creator>
		<pubDate>Tue, 08 Sep 2009 15:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-827</guid>
		<description>Hey,
Did anyone successfully managed to invoke the trigger from code behind?
I&#039;ve tried mknopf&#039;s approach but i couldn&#039;t get the flip to invoke..
Any help would be cool ;)</description>
		<content:encoded><![CDATA[<p>Hey,<br />
Did anyone successfully managed to invoke the trigger from code behind?<br />
I&#8217;ve tried mknopf&#8217;s approach but i couldn&#8217;t get the flip to invoke..<br />
Any help would be cool ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-825</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Tue, 01 Sep 2009 20:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-825</guid>
		<description>The other observation is that the input controls on the back panel are not responding to input, and the procesor of the machine is stressed when looking at that one (as opposed to whatever one is designated &quot;front&quot;).  The storyboards and animations seems straight up in the code.  Any thoughts?</description>
		<content:encoded><![CDATA[<p>The other observation is that the input controls on the back panel are not responding to input, and the procesor of the machine is stressed when looking at that one (as opposed to whatever one is designated &#8220;front&#8221;).  The storyboards and animations seems straight up in the code.  Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-824</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Tue, 01 Sep 2009 20:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-824</guid>
		<description>Great stuff here, thanks.  Can you think of a reason why text on the &quot;back&quot; panel would look a tad blurry?</description>
		<content:encoded><![CDATA[<p>Great stuff here, thanks.  Can you think of a reason why text on the &#8220;back&#8221; panel would look a tad blurry?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mknopf</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-820</link>
		<dc:creator>mknopf</dc:creator>
		<pubDate>Tue, 11 Aug 2009 21:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-820</guid>
		<description>OK, I finally found a way to accomplish a Flip from code behind. It&#039;s not pretty but it works, here are the details:

I added 2 private properties:
&lt;blockquote&gt;private bool IsLoaded { get; set; }
        private bool FlipOnTargetLoadComplete { get; set; }&lt;/blockquote&gt;

At the bottom of the TargetLoaded event I set IsLoaded = true, I then check to see if the property FlipOnTargetLoadComplete  is set to true, if it is I call the method ExecuteFlip()

The ExecuteFlip() code is below:
&lt;blockquote&gt;public void ExecuteFlip()
        {
            if (IsLoaded)
            {
                Invoke(null);
            }
            else
            {
                FlipOnTargetLoadComplete = true;
            }
        }&lt;/blockquote&gt;

You need to assign the EventTrigger to an object on your XAML page via codebehind which will allow you to have access to the Flip object in order to make the original call to ExecuteFlip(). Here is how to do that:
&lt;blockquote&gt;
            Flip flip = new Flip();
            flip.TargetName = &quot;LeftNav_Container&quot;;//the Grid that holds the two control
            flip.FrontElementName = &quot;LeftNav&quot;;//a ListBox
            flip.BackElementName = &quot;back1&quot;;//the back object 
            flip.Duration = new TimeSpan(0, 0, 0, 1);
            flip.Rotation = RotationDirection.RightToLeft;

            System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger(&quot;MouseLeftButtonUp&quot;);//execute on a mouse left button up event
            et.SourceName = &quot;LeftNav&quot;;
            et.Actions.Add(flip);
            et.Attach(LeftNav);
&lt;/blockquote&gt;

Now anywhere in my code-behind I can simply call the flip.ExecuteFlip() method and the animation will execute.

I&#039;m sure there are better ways to do this and I would love to see them but for now this gets the job done.</description>
		<content:encoded><![CDATA[<p>OK, I finally found a way to accomplish a Flip from code behind. It&#8217;s not pretty but it works, here are the details:</p>
<p>I added 2 private properties:</p>
<blockquote><p>private bool IsLoaded { get; set; }<br />
        private bool FlipOnTargetLoadComplete { get; set; }</p></blockquote>
<p>At the bottom of the TargetLoaded event I set IsLoaded = true, I then check to see if the property FlipOnTargetLoadComplete  is set to true, if it is I call the method ExecuteFlip()</p>
<p>The ExecuteFlip() code is below:</p>
<blockquote><p>public void ExecuteFlip()<br />
        {<br />
            if (IsLoaded)<br />
            {<br />
                Invoke(null);<br />
            }<br />
            else<br />
            {<br />
                FlipOnTargetLoadComplete = true;<br />
            }<br />
        }</p></blockquote>
<p>You need to assign the EventTrigger to an object on your XAML page via codebehind which will allow you to have access to the Flip object in order to make the original call to ExecuteFlip(). Here is how to do that:</p>
<blockquote><p>
            Flip flip = new Flip();<br />
            flip.TargetName = &#8220;LeftNav_Container&#8221;;//the Grid that holds the two control<br />
            flip.FrontElementName = &#8220;LeftNav&#8221;;//a ListBox<br />
            flip.BackElementName = &#8220;back1&#8243;;//the back object<br />
            flip.Duration = new TimeSpan(0, 0, 0, 1);<br />
            flip.Rotation = RotationDirection.RightToLeft;</p>
<p>            System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger(&#8220;MouseLeftButtonUp&#8221;);//execute on a mouse left button up event<br />
            et.SourceName = &#8220;LeftNav&#8221;;<br />
            et.Actions.Add(flip);<br />
            et.Attach(LeftNav);
</p></blockquote>
<p>Now anywhere in my code-behind I can simply call the flip.ExecuteFlip() method and the animation will execute.</p>
<p>I&#8217;m sure there are better ways to do this and I would love to see them but for now this gets the job done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Neubeck</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-813</link>
		<dc:creator>Joel Neubeck</dc:creator>
		<pubDate>Mon, 10 Aug 2009 17:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-813</guid>
		<description>When I have written Triggers to work with a ListBox I have always attached to the &quot;SelectionChanged&quot; event.  If you do that than each time a new item in the ListBox is selected the Invoke method will be called.  Later today I will post a new Trigger that created that changes an items visibility based on a specific item in a Listbox.  This example might help you with tying a listbox to the Flip TargetedTriggerAction</description>
		<content:encoded><![CDATA[<p>When I have written Triggers to work with a ListBox I have always attached to the &#8220;SelectionChanged&#8221; event.  If you do that than each time a new item in the ListBox is selected the Invoke method will be called.  Later today I will post a new Trigger that created that changes an items visibility based on a specific item in a Listbox.  This example might help you with tying a listbox to the Flip TargetedTriggerAction</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mknopf</title>
		<link>http://joel.neubeck.net/2009/08/silverlight-3-flip-targetedtriggeraction/comment-page-1/#comment-812</link>
		<dc:creator>mknopf</dc:creator>
		<pubDate>Mon, 10 Aug 2009 17:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://joel.neubeck.net/?p=421#comment-812</guid>
		<description>After some more digging I found out how, from code-behind, to apply the EventTrigger to an object. Below is the code to do this where &quot;LefNav&quot; is a ListBox (replaced &quot;front1&quot;)
&lt;code&gt;
            Flip flip = new Flip();
            flip.TargetName = &quot;flipMe&quot;;
            flip.FrontElementName = &quot;LeftNav&quot;;
            flip.BackElementName = &quot;back1&quot;;
            flip.Duration = new TimeSpan(0, 0, 0, 1);
            flip.Rotation = RotationDirection.RightToLeft;

            System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger(&quot;MouseLeftButtonUp&quot;);
            et.SourceName = &quot;LeftNav&quot;;
            et.Actions.Add(flip);
            et.Attach(LeftNav);
&lt;/code&gt;

However this resolves only part of what I&#039;m trying to accomplish here, what I really need is a way to execute the trigger from logic in the code-behind (like inside the MouseLeftButtonUp event there are certain conditions when I want the flip to occur and other times that I do not want it to). 

I&#039;ll continue to dig into this and let you know what I find</description>
		<content:encoded><![CDATA[<p>After some more digging I found out how, from code-behind, to apply the EventTrigger to an object. Below is the code to do this where &#8220;LefNav&#8221; is a ListBox (replaced &#8220;front1&#8243;)<br />
<code><br />
            Flip flip = new Flip();<br />
            flip.TargetName = "flipMe";<br />
            flip.FrontElementName = "LeftNav";<br />
            flip.BackElementName = "back1";<br />
            flip.Duration = new TimeSpan(0, 0, 0, 1);<br />
            flip.Rotation = RotationDirection.RightToLeft;</p>
<p>            System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger("MouseLeftButtonUp");<br />
            et.SourceName = "LeftNav";<br />
            et.Actions.Add(flip);<br />
            et.Attach(LeftNav);<br />
</code></p>
<p>However this resolves only part of what I&#8217;m trying to accomplish here, what I really need is a way to execute the trigger from logic in the code-behind (like inside the MouseLeftButtonUp event there are certain conditions when I want the flip to occur and other times that I do not want it to). </p>
<p>I&#8217;ll continue to dig into this and let you know what I find</p>
]]></content:encoded>
	</item>
</channel>
</rss>
