<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programming with .NET - General</title><link>http://forums.silverlight.net/forums/17.aspx</link><description>General discussions around authoring Silverlight .NET applications.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/178709.aspx</link><pubDate>Tue, 24 Feb 2009 16:38:58 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:178709</guid><dc:creator>greenbob16</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/178709.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=178709</wfw:commentRss><description>Does the last solution work?  It doesn&amp;#39;t work for me.  I receive an empty collection whenever I call:

VisualStateManager.GetVisualStateGroups(LayoutRoot);</description></item><item><title>Re: VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/60387.aspx</link><pubDate>Thu, 12 Jun 2008 11:42:10 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:60387</guid><dc:creator>codism</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/60387.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=60387</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Yi-Lun Luo - MSFT:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;The Visual States are defined under the root Panel tag, not the UserControl tag.&lt;/p&gt;&lt;p&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Oh, you are right! Thanks for pointing it out! Will try it out later today.&lt;/p&gt;&lt;p&gt;--- edited ---&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Just tried with the root layout and it works! Thanks again!&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/60274.aspx</link><pubDate>Thu, 12 Jun 2008 06:26:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:60274</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/60274.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=60274</wfw:commentRss><description>&lt;p&gt;Hello, actually this should be able to work. But you should pass the root Panel instead of this (the instance of UserControl) to GetVisualStateGroups. The Visual States are defined under the root Panel tag, not the UserControl tag.&lt;/p&gt;
&lt;p&gt;VisualStateManager.GetVisualStateGroups(LayoutRoot)&lt;/p&gt;</description></item><item><title>Re: VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/59927.aspx</link><pubDate>Wed, 11 Jun 2008 13:33:52 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:59927</guid><dc:creator>codism</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/59927.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=59927</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Dave Relyea:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;You could also simply have a state that you go to that has the control set its visibility to collapsed. That may be the easiest thing to do.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Changing the visibility is just a simplified scenario, more logics have to be performed after a certain animation in my application. That&amp;#39;s why I want to have a complete event.&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Dave Relyea:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;You could try getting the VisualStateGroups attached property, but that seems like a lot of work.&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Do you have any idea why GetVisualStateGroups(this) does not work?&lt;/p&gt;&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/59694.aspx</link><pubDate>Wed, 11 Jun 2008 04:35:33 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:59694</guid><dc:creator>Dave Relyea</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/59694.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=59694</wfw:commentRss><description>&lt;p&gt;You are right, what you have will no longer work. You could try getting the VisualStateGroups attached property, but that seems like a lot of work.&lt;/p&gt;
&lt;p&gt;You can also put your Storyboards in the Resources and access them as StaticResources in your control. Then they&amp;#39;d be easier to find, but it would be a fragile solution and would be hard to re-template.&lt;/p&gt;
&lt;p&gt;If you are not worried about re-templating, you know exactly how long the transitions will take so you could start a timer after you call GoToState and hide the control on the tick. You could also simply have a state that you go to that has the control set its visibility to collapsed. That may be the easiest thing to do.&lt;/p&gt;</description></item><item><title>VisualStateManager question: where is the complete event?</title><link>http://forums.silverlight.net/forums/thread/59449.aspx</link><pubDate>Tue, 10 Jun 2008 18:09:07 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:59449</guid><dc:creator>codism</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/59449.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=59449</wfw:commentRss><description>&lt;p&gt;Ok, I finally get used with the expression + vs 2008 for animation. (Thanks &lt;a href="http://silverlight.net/members/caperaven.aspx" class="namelink"&gt;caperaven&lt;/a&gt;! http://silverlight.net/forums/p/17571/59182.aspx#59182) Now I am trying to find a way to hide some controls after they fade out. I tried to find a storyboard object from where I can wire up a complete event but stuck at the first step: I used the following code in my control&amp;#39;s constructor after the InitializeComponents():&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Collection&amp;lt;VisualStateGroup&amp;gt; vsgs = VisualStateManager.GetVisualStateGroups(this);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (var vsg in vsgs)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (vsg.Name == &amp;quot;common_states&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (var vs in vsg.States)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (vs.Name == &amp;quot;mouse_out&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; vs.Storyboard.Completed += new EventHandler(Storyboard_Completed);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt;&lt;p&gt;I got the above logic by looking at the generated xaml code in expression but not sure if it will give me the right storyboard. The problem I am having with the above code is vsgs.Count is always zero. Is there anything I missed or I am on a wrong way?&lt;/p&gt;&lt;p&gt;Thanks in advance!&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>