<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlike &#187; Hittest</title>
	<atom:link href="http://silverlike.net/tag/hittest/feed/" rel="self" type="application/rss+xml" />
	<link>http://silverlike.net</link>
	<description>We Like Silverlight</description>
	<lastBuildDate>Mon, 07 Dec 2009 06:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Driving Game with hit test</title>
		<link>http://silverlike.net/driving-game-with-hit-test/</link>
		<comments>http://silverlike.net/driving-game-with-hit-test/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 05:24:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Hittest]]></category>

		<guid isPermaLink="false">http://silverlike.net/driving-game-with-hit-test/</guid>
		<description><![CDATA[Terence Tsang created a very basic game engine.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.shinedraw.com/animation-effect/silverlight-vs-flash-drive-games-with-hit-testing/" target="_blank">Terence Tsang</a> created a very basic game engine which demonstrated the followings</p>
<ol>
<li>how to change the frame of an animation</li>
<li>keyboard interaction</li>
<li>scrollable background</li>
<li>hit test (interaction) on objects</li>
</ol>
<p class="image"><a class="thickbox" href="http://www.shinedraw.com/animation-effect/silverlight-vs-flash-drive-games-with-hit-testing/" target="_blank"><img style="display: inline" title="Driving Game with hit test" alt="Driving Game with hit test" src="http://silverlike.net/wp-content/uploads/2009/09/DrivingGamewithhittest.jpg" width="400" height="250" /></a></p>
<div class="demo-area">Silverlight Demo: <a class="new-window" href="http://silverlike.net/silverlight/index.php?xap=%2Fwp-content%2Fuploads%2Fxap%2FDrivingGame.xap&TB_iframe=true&caption=Driving+Game+with+hit+test&height=400&width=650" target="_blank">Click here to view</a></div>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/driving-game-with-hit-test/" title="http://silverlike.net/driving-game-with-hit-test/" target="_blank">Click here</a></div>
<div class="reference-info"><strong>Download:</strong> <a href="http://silverlike.net/driving-game-with-hit-test/" title="http://silverlike.net/driving-game-with-hit-test/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=552&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/driving-game-with-hit-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hit Test (Get all objects in a specific point)</title>
		<link>http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/</link>
		<comments>http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 10:55:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Hittest]]></category>
		<category><![CDATA[Interaction]]></category>

		<guid isPermaLink="false">http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/</guid>
		<description><![CDATA[Most of the time, when you are creating games, you will have to find out all the UIElemetn in a specific coordinate. (Or we can this hittest). In such circumstance, you will need to use the method VisualTreeHelper.FindElementsInHostCoordinates. Please view the C# coding for more details.]]></description>
			<content:encoded><![CDATA[<p>Most of the time, when you are creating games, you will have to find out all the UIElemetn in a specific coordinate. (Or we can this hittest). In such circumstance, you will need to use the method VisualTreeHelper.FindElementsInHostCoordinates. Please view the C# coding for more details.</p>
<p class="image"><a class="thickbox" href=" http://www.shinedraw.com" target="_blank"><img style="display: inline" title="Hit-Test" alt="Hit-Test" src="http://silverlike.net/wp-content/uploads/2009/09/HitTest.jpg" width="400" height="250" /></a></p>
<div class="csharp-area">Get all the UIElement in a specific coordinate: </div>
<pre class="brush: c-sharp;">

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;

namespace HitTest
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            App.Current.RootVisual.MouseLeftButtonDown += new MouseButtonEventHandler(RootVisual_MouseLeftButtonDown);
        }

        void RootVisual_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            List&lt;uielement&gt; list = VisualTreeHelper.FindElementsInHostCoordinates
            (e.GetPosition(null), LayoutRoot as UIElement) as List&lt;uielement&gt;;

            var selectedControls = from control in list
                                   where control is Rectangle
                                   select control as Rectangle;

            if (selectedControls.Count() &amp;gt; 0)
            {
                foreach (var selectedControl in selectedControls)
                {
                    // do your opreation here
                }
            }
        }
    }
}
</pre>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/" title="http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=273&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/hit-test-get-all-objects-in-a-specific-point/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explosive Bricks</title>
		<link>http://silverlike.net/explosive-bricks/</link>
		<comments>http://silverlike.net/explosive-bricks/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 03:05:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Hittest]]></category>

		<guid isPermaLink="false">http://silverlike.net/explosive-bricks/</guid>
		<description><![CDATA[Nokola released a Explosive Bricks game. Bounce the ball and break all the bricks. Very simple game logic, but yet very well implemented with fancy graphics.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nokola.com/Shock/" target="_blank">Nokola</a> released a Explosive Bricks game. Bounce the ball and break all the bricks. Very simple game logic, but yet very well implemented with fancy graphics. </p>
<p class="image"><a class="thickbox" href="http://www.nokola.com/Shock/" target="_blank"><img style="display: inline" title="Explosive Bricks" alt="Explosive Bricks" src="http://silverlike.net/wp-content/uploads/2009/09/ExplosiveBricks_thumb.jpg" width="400" height="250" /></a></p>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/explosive-bricks/" title="http://silverlike.net/explosive-bricks/" target="_blank">Click here</a></div>
<div class="reference-info"><strong>Download:</strong> <a href="http://silverlike.net/explosive-bricks/" title="http://silverlike.net/explosive-bricks/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=410&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/explosive-bricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bouncing Elements using Render Transform</title>
		<link>http://silverlike.net/bouncing-elements-using-render-transform/</link>
		<comments>http://silverlike.net/bouncing-elements-using-render-transform/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:16:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Hittest]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://silverlike.net/bouncing-elements-using-render-transform/</guid>
		<description><![CDATA[Switchonthecode released a tutorial teaching you how to create bouncing animations using the combination of Render Transform (Translate Transform) and Dispatcher Timer.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.switchonthecode.com/tutorials/silverlight-tutorial-animating-elements-using-render-transforms" target="_blank">Switchonthecode</a> released a tutorial teaching you how to create bouncing animations using the combination of Render Transform (Translate Transform) and Dispatcher Timer.</p>
<p class="image"><a class="thickbox" href="http://www.switchonthecode.com/tutorials/silverlight-tutorial-animating-elements-using-render-transforms" target="_blank"><img style="display: inline" title="Bouncing Elements using RenderTransform" alt="Bouncing Elements using RenderTransform" src="http://silverlike.net/wp-content/uploads/2009/09/BouncingElementsusingRenderTransform_thumb.jpg" width="400" height="250" /></a></p>
<div class="demo-area">Silverlight Demo: <a class="new-window" href="http://silverlike.net/silverlight/index.php?xap=%2Fwp-content%2Fuploads%2Fxap%2FBitmapCache.xap&TB_iframe=true&caption=Bouncing+Elements+using+Render+Transform&height=400&width=650" target="_blank">Click here to view</a></div>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/bouncing-elements-using-render-transform/" title="http://silverlike.net/bouncing-elements-using-render-transform/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=340&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/bouncing-elements-using-render-transform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk

Served from: shareelements.silverlighteffect.com @ 2012-05-19 02:26:13 -->
