<?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; Interaction</title>
	<atom:link href="http://silverlike.net/tag/interaction/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>Floatable Window Drag and Drop</title>
		<link>http://silverlike.net/floatable-window-drag-and-drop/</link>
		<comments>http://silverlike.net/floatable-window-drag-and-drop/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 10:49:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Interaction]]></category>
		<category><![CDATA[Toolkits]]></category>

		<guid isPermaLink="false">http://silverlike.net/silverlight-3-drag-and-drop/</guid>
		<description><![CDATA[Michael Washington enhanced Tim Heuer's Floatable Window with drag and drop feature.]]></description>
			<content:encoded><![CDATA[<p><a href="http://openlightgroup.net/Blog/tabid/58/EntryId/28/Silverlight-3-Drag-and-Drop-updated.aspx" target="_blank">Michael Washington</a> enhanced Tim Heuer&#8217;s <a href="http://floatablewindow.codeplex.com/" target="_blank">Floatable Window</a> with drag and drop feature.</p>
<p class="image"><a class="thickbox" href="http://openlightgroup.net/Blog/tabid/58/EntryId/28/Silverlight-3-Drag-and-Drop-updated.aspx" target="_blank"><img style="display: inline" title="Silverlight-3-Drag-and-Drop" alt="Silverlight-3-Drag-and-Drop" src="http://silverlike.net/wp-content/uploads/2009/09/Silverlight3DragandDrop.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%2FSilverlightDesktopTest.xap&TB_iframe=true&caption=Floatable+Window+Drag+and+Drop&height=400&width=650" target="_blank">Click here to view</a></div>
<div class="reference-info"><strong>Website:</strong> <a href="http://silverlike.net/floatable-window-drag-and-drop/" title="http://silverlike.net/floatable-window-drag-and-drop/" target="_blank">Click here</a></div>
<div class="reference-info"><strong>Download:</strong> <a href="http://silverlike.net/floatable-window-drag-and-drop/" title="http://silverlike.net/floatable-window-drag-and-drop/" target="_blank">Click here</a></div>
<img src="http://silverlike.net/?ak_action=api_record_view&id=271&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://silverlike.net/floatable-window-drag-and-drop/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>
	</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 @ 2010-07-29 22:46:22 -->