<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.lhotka.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>CSLA .NET discussion</title><link>http://forums.lhotka.net/forums/5.aspx</link><description>General discussion about CSLA .NET</description><dc:language /><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>Re: multiple csla:InvokeMethods on a control</title><link>http://forums.lhotka.net/forums/thread/40780.aspx</link><pubDate>Thu, 25 Feb 2010 16:10:27 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:40780</guid><dc:creator>Martino</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/40780.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=40780</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;Just in case somebody ran into the same issue. Here is Rockys response:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;Unfortunately InvokeMethod is an attached property (actually a set of related attached properties), so there&amp;rsquo;s no real way to have more than one of them attached to a control &amp;ndash; at least not that I know of.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;Execute is a trigger action based on the event trigger concepts defined by Blend 3 in their SDK. They don&amp;rsquo;t expose as much information to a trigger action as I can get as an attached property, which restricts what Execute can do to solve this problem. In short, Execute can&amp;rsquo;t do the &amp;ldquo;live binding&amp;rdquo; that InvokeMethod does, because trigger actions just don&amp;rsquo;t have enough information to do that.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;In CSLA 4 I&amp;rsquo;ve implemented yet another solution, called TriggerAction. This is a standalone control, which is required to work with the Visual Studio 2010 designer.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&lt;a href="http://www.lhotka.net/weblog/ApplyingMVVMInTheVS10XAMLDesigner.aspx" title="blocked::http://www.lhotka.net/weblog/ApplyingMVVMInTheVS10XAMLDesigner.aspx"&gt;&lt;span style="color:#800080;"&gt;http://www.lhotka.net/weblog/ApplyingMVVMInTheVS10XAMLDesigner.aspx&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;Right now it doesn&amp;rsquo;t do the &amp;ldquo;live binding&amp;rdquo; that InvokeMethod does either. But I suppose it probably should include that functionality.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;The advantage of TriggerAction, is that you can have as many of them as you&amp;rsquo;d like, all attached to different (or even the same) events of a given UI control. So the flexibility is substantially greater than with InvokeMethod.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;You can see the code here&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&lt;a href="http://www.lhotka.net/cslacvs/viewvc.cgi/core/branches/V4-0-0-RC/Source/Csla.Xaml/TriggerAction.cs?view=markup" title="blocked::http://www.lhotka.net/cslacvs/viewvc.cgi/core/branches/V4-0-0-RC/Source/Csla.Xaml/TriggerAction.cs?view=markup"&gt;&lt;span style="color:#800080;"&gt;http://www.lhotka.net/cslacvs/viewvc.cgi/core/branches/V4-0-0-RC/Source/Csla.Xaml/TriggerAction.cs?view=markup&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;But as I said, the MethodParameter functionality from InvokeMethod needs to be merged into this control for it to fully address your scenario.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#1f497d;font-size:11pt;"&gt;Rocky&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: multiple csla:InvokeMethods on a control</title><link>http://forums.lhotka.net/forums/thread/40732.aspx</link><pubDate>Tue, 23 Feb 2010 21:49:05 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:40732</guid><dc:creator>Martino</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/40732.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=40732</wfw:commentRss><description>&lt;p&gt;This would work in most cases. &lt;/p&gt;
&lt;p&gt;In my case I need to databind to the (non-bindable) SelectedItems for both triggers. For that i&amp;#39;d like to use Rockys work around:&lt;/p&gt;
&lt;p&gt;csla&lt;span style="color:#0000ff;font-size:x-small;"&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt;InvokeMethod.MethodParameter&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;=&amp;quot;{&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#a31515;font-size:x-small;"&gt;&lt;span style="color:#a31515;font-size:x-small;"&gt;Binding&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt; ElementName&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;=myGrid,&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt;&lt;span style="color:#ff0000;font-size:x-small;"&gt; Path&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;&lt;span style="color:#0000ff;font-size:x-small;"&gt;=SelectedItems}&amp;quot; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;with a dependency property &amp;#39;SelectedItems&amp;#39; in the ViewModel&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked at using multibinding, but i&amp;#39;m kinda stuck there too.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: multiple csla:InvokeMethods on a control</title><link>http://forums.lhotka.net/forums/thread/40730.aspx</link><pubDate>Tue, 23 Feb 2010 21:27:25 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:40730</guid><dc:creator>triplea</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/40730.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=40730</wfw:commentRss><description>&lt;p&gt;I remember a similar post but even though I searched for it I could not find it.&lt;/p&gt;
&lt;p&gt;I think the only way to achieve this you will need to use the trigger method:&lt;/p&gt;
&lt;p&gt;&amp;lt;Button Content=&amp;quot;Click Me&amp;quot;&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;i:Interaction.Triggers&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;i:EventTrigger EventName=&amp;quot;Click&amp;quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;csla:Execute MethodName=&amp;quot;LoadData&amp;quot; /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/i:EventTrigger&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;i:EventTrigger EventName=&amp;quot;MouseOver&amp;quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;csla:Execute MethodName=&amp;quot;AnimateMe&amp;quot; /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/i:EventTrigger&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;&amp;nbsp; &amp;lt;/i:Interaction.Triggers&amp;gt; &lt;br /&gt;&amp;lt;/Button&amp;gt; &lt;/p&gt;
&lt;p&gt;I know this is not exactly what you are looking for but thought I&amp;#39;d let you know anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: multiple csla:InvokeMethods on a control</title><link>http://forums.lhotka.net/forums/thread/40727.aspx</link><pubDate>Tue, 23 Feb 2010 18:27:57 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:40727</guid><dc:creator>Martino</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/40727.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=40727</wfw:commentRss><description>&lt;p&gt;Any ideas? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>multiple csla:InvokeMethods on a control</title><link>http://forums.lhotka.net/forums/thread/40678.aspx</link><pubDate>Fri, 19 Feb 2010 16:59:50 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:40678</guid><dc:creator>Martino</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/40678.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=40678</wfw:commentRss><description>&lt;p&gt;This might be more of a WPF question, but is it possible to set multiple csla:InvokeMethods on one control?&lt;/p&gt;
&lt;p&gt;for example a csla:InvokeMethod.TriggerEvent&amp;nbsp;for&amp;nbsp; the click event and one for the MouseEnter event of a button?&lt;/p&gt;
&lt;p&gt;This obviously won&amp;#39;t work&lt;/p&gt;
&lt;p&gt;&amp;lt;Button&lt;/p&gt;
&lt;p&gt;csla:InvokeMethod.TriggerEvent=&amp;quot;Click&amp;quot;&lt;/p&gt;
&lt;p&gt;csla:InvokeMethod.MethodName = &amp;quot;OnClickHandler&amp;quot;&lt;/p&gt;
&lt;p&gt;csla:invokeMethod.TriggerEvent=&amp;quot;MouseEnter&amp;quot;&lt;/p&gt;
&lt;p&gt;csla:InvokeMethod.MethodName = &amp;quot;OnMouseEnterHandler&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;I&amp;#39;ve also seen some refernces made to a MVVM example, is this the MVVMExperiment project? If not where do i find the MVVM example?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;btw. Love the new modelview&amp;nbsp;stuff in 3.8.0&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>