<?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: Using Commands in BabySmash</title>
	<atom:link href="http://www.ageektrapped.com/blog/using-commands-in-babysmash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ageektrapped.com/blog/using-commands-in-babysmash/</link>
	<description>Trapped online since 2004</description>
	<lastBuildDate>Tue, 09 Mar 2010 17:02:57 -0500</lastBuildDate>
	<generator>http://wordpress.org/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jason</title>
		<link>http://www.ageektrapped.com/blog/using-commands-in-babysmash/comment-page-1/#comment-283</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Thu, 05 Jun 2008 00:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/using-commands-in-babysmash/#comment-283</guid>
		<description>@Kevin Berridge: The two ways: 

&lt;CommandBinding &lt;strong&gt;Command=&quot;Properties&quot;&lt;/strong&gt; /&gt;
&lt;InputBinding &lt;strong&gt;Command=&quot;{x:Static ApplicationCommands.Properties}&quot;&lt;/strong&gt; /&gt;

The first one should be easy to understand. 

The second needs some explaining. The x:Static is a XAML-specific thing for assigning properties to static, as in C# static, values; it can be applied anywhere. ApplicationCommands is one of the classes WPF comes with that provides built-in commands.

Perhaps the equivalent code will help:

           CommandBinding binding = new CommandBinding();
           binding.Command = ApplicationCommands.Properties;
           binding.Executed += Properties_Executed;
           this.CommandBindings.Add(binding);

           InputBinding inputBinding = new InputBinding();
           inputBinding.Command = ApplicationCommands.Properties;
           inputBinding.Gesture = new KeyGesture(Key.O, 
              ModifierKeys.Shift &#124; ModifierKeys.Control &#124; ModifierKeys.Alt);
           this.InputBindings.Add(inputBinding);

Look on MSDN for ApplicationCommands. There are a couple of other classes like that: NavigationCommands, ComponentCommands and more, but I can&#039;t think of them.</description>
		<content:encoded><![CDATA[<p>@Kevin Berridge: The two ways: </p>
<p>&lt;CommandBinding <strong>Command=&#8221;Properties&#8221;</strong> /&gt;<br />
&lt;InputBinding <strong>Command=&#8221;{x:Static ApplicationCommands.Properties}&#8221;</strong> /&gt;</p>
<p>The first one should be easy to understand. </p>
<p>The second needs some explaining. The x:Static is a XAML-specific thing for assigning properties to static, as in C# static, values; it can be applied anywhere. ApplicationCommands is one of the classes WPF comes with that provides built-in commands.</p>
<p>Perhaps the equivalent code will help:</p>
<p>           CommandBinding binding = new CommandBinding();<br />
           binding.Command = ApplicationCommands.Properties;<br />
           binding.Executed += Properties_Executed;<br />
           this.CommandBindings.Add(binding);</p>
<p>           InputBinding inputBinding = new InputBinding();<br />
           inputBinding.Command = ApplicationCommands.Properties;<br />
           inputBinding.Gesture = new KeyGesture(Key.O,<br />
              ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt);<br />
           this.InputBindings.Add(inputBinding);</p>
<p>Look on MSDN for ApplicationCommands. There are a couple of other classes like that: NavigationCommands, ComponentCommands and more, but I can&#8217;t think of them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Berridge</title>
		<link>http://www.ageektrapped.com/blog/using-commands-in-babysmash/comment-page-1/#comment-282</link>
		<dc:creator>Kevin Berridge</dc:creator>
		<pubDate>Wed, 04 Jun 2008 21:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/using-commands-in-babysmash/#comment-282</guid>
		<description>This may be a stupid question but why is it x:static ApplicationCommands.Properties?  Where does the ApplicationCommands bit come from?

Also, you noted there were two ways to declare the command but I&#039;m not seeing the second way.  What am I missing?

Thanks,
Kevin</description>
		<content:encoded><![CDATA[<p>This may be a stupid question but why is it x:static ApplicationCommands.Properties?  Where does the ApplicationCommands bit come from?</p>
<p>Also, you noted there were two ways to declare the command but I&#8217;m not seeing the second way.  What am I missing?</p>
<p>Thanks,<br />
Kevin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
