<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7353304773331949105</id><updated>2024-09-13T22:07:51.459-07:00</updated><category term="Multi Event Command"/><title type='text'>Multi Event Command</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://multieventcommand.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7353304773331949105/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://multieventcommand.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14376640606753915985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7353304773331949105.post-2844411973887806878</id><published>2011-12-18T10:00:00.001-08:00</published><updated>2011-12-18T10:02:41.580-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multi Event Command"/><title type='text'>Multi Event Command</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div&gt;&lt;a href=&quot;http://multieventcommand.codeplex.com/&quot; style=&quot;color: #3e62a6; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Multi Event Command Codeplex Project&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;WikiContent&quot; id=&quot;WikiContent&quot; style=&quot;background-color: white; color: #30332d; font-family: &#39;Segoe UI&#39;, &#39;Microsoft Sans Serif&#39;, Arial, Geneva, sans-serif; font-size: 13px; text-align: -webkit-auto; word-wrap: break-word;&quot;&gt;&lt;div class=&quot;wikidoc&quot;&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;a href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;amp;business=bhushanpoojary%40gmail%2ecom&amp;amp;lc=US&amp;amp;item_name=Multi%20Event%20Command%20Binder&amp;amp;no_note=0&amp;amp;currency_code=USD&amp;amp;bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest&quot; style=&quot;color: #3e62a6; text-decoration: none;&quot;&gt;&lt;img alt=&quot;Donate&quot; height=&quot;47&quot; src=&quot;https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; max-width: 100%;&quot; width=&quot;147&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;strong&gt;Project Description:&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;This project extends and improves existing command binder.It has feature of binding multiple events of a single control to multiple commands.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;margin-bottom: 0.3em; margin-left: 0px; margin-top: 0.3em; vertical-align: middle;&quot;&gt;Ability&amp;nbsp;to bind multiple event to multiple commands.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em; margin-left: 0px; margin-top: 0.3em; vertical-align: middle;&quot;&gt;In CommandArgs in command handler you can even get original event args this was not possible with existing command binders.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em; margin-left: 0px; margin-top: 0.3em; vertical-align: middle;&quot;&gt;In CommandArgs in command handler you can even get original source of the event this was not possible with existing command binders.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em; margin-left: 0px; margin-top: 0.3em; vertical-align: middle;&quot;&gt;In this you can control individual CanExecute methods.&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;strong&gt;Project Contents:&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;To use this multi event command feature you should update the files like shown below.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;XAML:&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background-color: white; color: black;&quot;&gt;&lt;pre style=&quot;background-color: rgb(236, 236, 236) !important; border-bottom-color: rgb(62, 98, 166) !important; border-bottom-style: dashed !important; border-bottom-width: 0.1em !important; border-image: initial !important; border-left-color: rgb(62, 98, 166) !important; border-left-style: dashed !important; border-left-width: 0.1em !important; border-right-color: rgb(62, 98, 166) !important; border-right-style: dashed !important; border-right-width: 0.1em !important; border-top-color: rgb(62, 98, 166) !important; border-top-style: dashed !important; border-top-width: 0.1em !important; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto; overflow-x: hidden; overflow-y: hidden; padding-bottom: 1.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; white-space: pre-wrap; width: 622px !important;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Canvas&lt;/span&gt;  &lt;span style=&quot;color: red;&quot;&gt;mecb:CommandBehavior.Event&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;MouseDown,MouseEnter,MouseMove,MouseUp,MouseLeave&lt;/span&gt;&quot; &lt;span style=&quot;color: red;&quot;&gt;Background&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;LightBlue&lt;/span&gt;&quot; &lt;span style=&quot;color: red;&quot;&gt;VerticalAlignment&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Stretch&lt;/span&gt;&quot; &lt;span style=&quot;color: red;&quot;&gt;HorizontalAlignment&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Stretch&lt;/span&gt;&quot;

                     &lt;span style=&quot;color: red;&quot;&gt;mecb:CommandBehavior.Command&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;{Binding DockPanelCommandCollection}&lt;/span&gt;&quot; 

                    &lt;span style=&quot;color: red;&quot;&gt;mecb:CommandBehavior.CommandParameter&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;{Binding ElementName=txtCommandParameter,Path=Text}&lt;/span&gt;&quot; &lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;

                 &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBlock&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;VerticalAlignment&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Center&lt;/span&gt;&quot; &lt;span style=&quot;color: red;&quot;&gt;HorizontalAlignment&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Center&lt;/span&gt;&quot; &lt;span style=&quot;color: red;&quot;&gt;TextWrapping&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Wrap&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Test Mouse Event In This Block&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;TextBlock&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;

 &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Canvas&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;            &lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: rgb(236, 236, 236) !important; border-bottom-color: rgb(62, 98, 166) !important; border-bottom-style: dashed !important; border-bottom-width: 0.1em !important; border-image: initial !important; border-left-color: rgb(62, 98, 166) !important; border-left-style: dashed !important; border-left-width: 0.1em !important; border-right-color: rgb(62, 98, 166) !important; border-right-style: dashed !important; border-right-width: 0.1em !important; border-top-color: rgb(62, 98, 166) !important; border-top-style: dashed !important; border-top-width: 0.1em !important; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto; overflow-x: hidden; overflow-y: hidden; padding-bottom: 1.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; white-space: pre-wrap; width: 622px !important;&quot;&gt;&lt;strong&gt;&amp;nbsp;C#&lt;/strong&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: rgb(236, 236, 236) !important; border-bottom-color: rgb(62, 98, 166) !important; border-bottom-style: dashed !important; border-bottom-width: 0.1em !important; border-image: initial !important; border-left-color: rgb(62, 98, 166) !important; border-left-style: dashed !important; border-left-width: 0.1em !important; border-right-color: rgb(62, 98, 166) !important; border-right-style: dashed !important; border-right-width: 0.1em !important; border-top-color: rgb(62, 98, 166) !important; border-top-style: dashed !important; border-top-width: 0.1em !important; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto; overflow-x: hidden; overflow-y: hidden; padding-bottom: 1.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; white-space: pre-wrap; width: 622px !important;&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;pre style=&quot;background-color: transparent !important; border-bottom-color: rgb(62, 98, 166) !important; border-bottom-style: none !important; border-bottom-width: 0.1em !important; border-color: initial !important; border-image: initial !important; border-left-color: rgb(62, 98, 166) !important; border-left-style: none !important; border-left-width: 0.1em !important; border-right-color: rgb(62, 98, 166) !important; border-right-style: none !important; border-right-width: 0.1em !important; border-top-color: rgb(62, 98, 166) !important; border-top-style: none !important; border-top-width: 0.1em !important; border-width: initial !important; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em; height: auto; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap; width: 622px !important;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Constructor        public ClientUserControlViewModel()
        {
            DockPanelCommandCollection=&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; ObservableCollection&amp;lt;RelayCommand&amp;gt;
                                           {
                                               MouseDownCommand,
                                               MouseUpCommand,
                                               MouseEnterCommand,
                                               MouseMoveCommand,
                                               MouseLeaveCommand
                                           };
            MouseMoveIsChecked = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
        }

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Members

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; RelayCommand _mouseDownCommand;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; RelayCommand _mouseUpCommand;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; RelayCommand _mouseMoveCommand;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; RelayCommand _mouseEnterCommand;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; RelayCommand _mouseLeaveCommand;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; _lastEvent;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; _leftButtonState;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; _rightButtonState;
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; _commandParamterValue;

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Commands

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; RelayCommand MouseDownCommand
        {
           &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseDownCommand ?? (_mouseDownCommand = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; RelayCommand(MouseDownCommandHandler,CanExecuteMouseDown){EventName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseDown&quot;&lt;/span&gt;})
               
               ; }
         
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; CanExecuteMouseDown(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; !MouseDownIsChecked;
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; RelayCommand MouseUpCommand
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseUpCommand ?? (_mouseUpCommand = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; RelayCommand(MouseUpCommandHandler, CanExecuteMouseUp) { EventName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseUp&quot;&lt;/span&gt; }); }
          
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; CanExecuteMouseUp(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; !MouseUpIsChecked;
        }


        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; RelayCommand MouseEnterCommand
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseEnterCommand ?? (_mouseEnterCommand = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; RelayCommand(MouseEnterCommandHandler,CanExecuteMouseEnter) { EventName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseEnter&quot;&lt;/span&gt; }); }
            
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; CanExecuteMouseEnter(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; !MouseEnterIsChecked;
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; RelayCommand MouseMoveCommand
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;
            {
                &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseMoveCommand ??
                       (_mouseMoveCommand = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; RelayCommand(MouseMoveCommandHandler,CanExecuteMouseMove) {EventName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseMove&quot;&lt;/span&gt;});
            }
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; CanExecuteMouseMove(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; !MouseMoveIsChecked;
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; RelayCommand MouseLeaveCommand
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseLeaveCommand ?? (_mouseLeaveCommand = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; RelayCommand(MouseLeaveCommandHandler,CanExecuteMouseLeave) { EventName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseLeave&quot;&lt;/span&gt; }); }
           
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; CanExecuteMouseLeave(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; !MouseLeaveIsChecked;
        }

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Handlers

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MouseDownCommandHandler(CommandArgs obj)
        {
            LastEvent = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseDown&quot;&lt;/span&gt;;
            TryCatch.BeginTryCatch(UpdateResults,obj);
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MouseUpCommandHandler(CommandArgs obj)
        {
            LastEvent = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseUp&quot;&lt;/span&gt;;
            TryCatch.BeginTryCatch(UpdateResults, obj);
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MouseEnterCommandHandler(CommandArgs obj)
        {
            LastEvent = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseEnter&quot;&lt;/span&gt;;
            TryCatch.BeginTryCatch(UpdateResults, obj);
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MouseMoveCommandHandler(CommandArgs obj)
        {
            LastEvent = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseMove&quot;&lt;/span&gt;;
            TryCatch.BeginTryCatch(UpdateResults, obj);
        }

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MouseLeaveCommandHandler(CommandArgs obj)
        {
            LastEvent = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;MouseLeave&quot;&lt;/span&gt;;
            TryCatch.BeginTryCatch(UpdateResults, obj);
        }

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; CommandCollection

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; ObservableCollection&amp;lt;RelayCommand&amp;gt; DockPanelCommandCollection { &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; }
    

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Methods

        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; UpdateResults(CommandArgs obj)
        {
            &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; args = obj.OriginalArgs &lt;span style=&quot;color: blue;&quot;&gt;as&lt;/span&gt; MouseEventArgs;
            &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(args!=&lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
            {
                LeftButtonState = args.LeftButton.ToString();
                RightButtonState = args.RightButton.ToString();
               
            }
            &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (obj.CommandParameters != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;) CommandParameterValue = obj.CommandParameters.ToString();
        }

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

        &lt;span style=&quot;color: blue;&quot;&gt;#region&lt;/span&gt; Properties

        
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt;  _mouseDownIsChecked;

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; MouseDownIsChecked
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;  _mouseDownIsChecked; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                 _mouseDownIsChecked = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.MouseDownIsChecked);
            }
        }

        
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; _mouseUpIsChecked;

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; MouseUpIsChecked
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseUpIsChecked; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _mouseUpIsChecked = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.MouseUpIsChecked);
            }
        }

        
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; _mouseEnterIsChecked;

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; MouseEnterIsChecked
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseEnterIsChecked; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _mouseEnterIsChecked = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.MouseEnterIsChecked);
            }
        }

        
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; _mouseLeaveIsChecked;

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; MouseLeaveIsChecked
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseLeaveIsChecked; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _mouseLeaveIsChecked = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.MouseLeaveIsChecked);
            }
        }

        
        &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; _mouseMoveIsChecked;

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; MouseMoveIsChecked
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _mouseMoveIsChecked; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _mouseMoveIsChecked = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.MouseMoveIsChecked);
            }
        }
 
        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; LastEvent
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _lastEvent; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _lastEvent = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.LastEvent);
            }
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; LeftButtonState
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _leftButtonState; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _leftButtonState = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.LeftButtonState);
            }
        }

        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; RightButtonState
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _rightButtonState; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _rightButtonState = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.RightButtonState);
            }
        }

      
        &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; CommandParameterValue
        {
            &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt; { &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; _commandParamterValue; }
            &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;
            {
                _commandParamterValue = value;
                NotifyPropertyChanged(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, o =&amp;gt; o.CommandParameterValue);
            }
        }

        &lt;span style=&quot;color: blue;&quot;&gt;#endregion&lt;/span&gt;

&lt;/pre&gt;&lt;/div&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style=&quot;background-color: rgb(236, 236, 236) !important; border-bottom-color: rgb(62, 98, 166) !important; border-bottom-style: dashed !important; border-bottom-width: 0.1em !important; border-image: initial !important; border-left-color: rgb(62, 98, 166) !important; border-left-style: dashed !important; border-left-width: 0.1em !important; border-right-color: rgb(62, 98, 166) !important; border-right-style: dashed !important; border-right-width: 0.1em !important; border-top-color: rgb(62, 98, 166) !important; border-top-style: dashed !important; border-top-width: 0.1em !important; font-family: Consolas, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto; overflow-x: hidden; overflow-y: hidden; padding-bottom: 1.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em; white-space: pre-wrap; width: 622px !important;&quot;&gt;&lt;a href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;amp;business=bhushanpoojary%40gmail%2ecom&amp;amp;lc=US&amp;amp;item_name=Multi%20Event%20Command%20Binder&amp;amp;no_note=0&amp;amp;currency_code=USD&amp;amp;bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest&quot; style=&quot;color: #3e62a6; text-decoration: none;&quot;&gt;&lt;img alt=&quot;Donate&quot; height=&quot;47&quot; src=&quot;https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; max-width: 100%;&quot; width=&quot;147&quot; /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://multieventcommand.blogspot.com/feeds/2844411973887806878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://multieventcommand.blogspot.com/2011/12/multi-event-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7353304773331949105/posts/default/2844411973887806878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7353304773331949105/posts/default/2844411973887806878'/><link rel='alternate' type='text/html' href='http://multieventcommand.blogspot.com/2011/12/multi-event-command.html' title='Multi Event Command'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14376640606753915985</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>