﻿<?xml version="1.0" encoding="utf-8"?><rss 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:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Button question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Button-question/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Button question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Button-question/</link><pubDate>Mon, 05 Mar 2012 20:06:39 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;Thank you for the prompt reply.&lt;br /&gt;I will try to create a sample and have it sent to you to be evaluated.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Button question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Button-question/</link><pubDate>Fri, 02 Mar 2012 05:50:05 GMT</pubDate><dc:creator>zen8019</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;thanks for the reply - not sure this will give me what I need.  I have had another look and found a property called CommandParameter.  This I believe is what I'm looking for.  I can have 26 buttons on my view each with a different CommandParameter - the viewmodel command delegate process receives an object parameter and I can then apply logic to it - so no need to have 26 command delegates in the VM.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; "&gt;Richard&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Button question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Button-question/</link><pubDate>Fri, 02 Mar 2012 03:54:20 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Routed event is a powerful eventing framework employed in modern client user interface platforms such as in WPF and Silverlight. Routed event works by notifying the occuring event to the source's parent or child through a visual tree walk.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;For more detail information about Routed event, please check Routed event overviews in ClientUI Documentation. The live version of the article is available in &lt;a href="http://www.intersoftpt.com/Support/ClientUI/Docs/RoutedEventsOverview.html"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;In addition to the instance handlers, you can also handle a routed event using class handlers by calling the RegisterClassHandler method available in the EventManager class. Class handlers are invoked before any instance listener handlers that are attached to an instance of that class, whenever a routed event reaches an element instance in its route. Furthermore, class handlers are commonly called in the static contructor of your class.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Class handlers are typically used to effectively handle a routed event of multiple instances of controls having the same type, or derived type. For instance, consider a registration form where your application is responding as user types into textbox or changes selection in combobox. The handling of such events can be achieved more efficiently through class handlers.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;The following code example shows how to add class handling for a routed event.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;private static void&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;OnKeyUp(&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;object&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;sender,&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: #2b91af; font-size: 9pt"&gt;KeyEventArgs&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;e)
{&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;if&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;(e.OriginalSource&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;is&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: #2b91af; font-size: 9pt"&gt;ISButton&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;|| e.OriginalSource&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;is&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: #2b91af; font-size: 9pt"&gt;ISTextBox&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;|| e.OriginalSource&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: blue; font-size: 9pt"&gt;is&lt;/span&gt; &lt;span style="font-family: 'consolas', 'courier new'; color: #2b91af; font-size: 9pt"&gt;ISSelectionControl&lt;/span&gt;&lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;)
    {&lt;/span&gt;
        &lt;span style="font-family: 'consolas', 'courier new'; color: green; font-size: 9pt"&gt;//do something on key up&lt;/span&gt;
    &lt;span style="font-family: 'consolas', 'courier new'; font-size: 9pt"&gt;}
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please kindly check the Routed events sample of ClientUI in &lt;a href="http://live.clientui.com/#/ClientUIFramework/RoutedEvents"&gt;http://live.clientui.com/#/ClientUIFramework/RoutedEvents&lt;/a&gt; and refer to the codes available in the ClientUI Framework project to learn more.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please let us know if you have other questions.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Button question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Button-question/</link><pubDate>Thu, 01 Mar 2012 09:10:59 GMT</pubDate><dc:creator>zen8019</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have a view with 26 buttons (letters of alphabet) - is there a way to pass a parameter or establish which button has been pressed so as to avoid 26 delegate commands in my viewmodel.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>