<feed xml:base="https://mattserbinski.azurewebsites.net/" xmlns="http://www.w3.org/2005/Atom"><title type="text">matt serbinski</title><subtitle type="text">Latest blog posts</subtitle><id>uuid:f97ecd98-a4ca-410d-b815-f02b5ee6a5a3;id=1</id><updated>2026-04-11T12:44:46Z</updated><link href="https://mattserbinski.azurewebsites.net/" /><entry><id>https://mattserbinski.azurewebsites.net/post/packtpub-publishes-2000th-title</id><title type="text">PacktPub publishes 2000th title</title><published>2014-03-25T21:54:38Z</published><updated>2014-09-16T18:15:51Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/packtpub-publishes-2000th-title" /><content type="text">&lt;a href="http://www.packtpub.com"&gt;Packt Publishing&lt;/a&gt; has reached another major milestone, 2000 titles have been published! To celebrate their milestone they have a surprise in store for everyone: &lt;a href="http://bit.ly/1j26nPN"&gt;Buy one, get one free offer!&lt;/a&gt; Check it out here as it is a limited time offer, so hurry! PacktPub has some tremendous offerings and their library of titles is quite nice. All titles are written by experts in their respective fields and are worth a read.</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/packtpub-publishes-1000th-it-title</id><title type="text">PacktPub publishes 1000th IT title</title><published>2012-09-24T22:25:27Z</published><updated>2014-09-16T13:28:36Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/packtpub-publishes-1000th-it-title" /><content type="text">&lt;a href="http://www.packtpub.com"&gt;Packt Publishing&lt;/a&gt; has reached a major milestone, 1000 IT titles have been published! To celebrate their milestone they have a surprise in store for all registered members which they will announce soon. Be sure to &lt;a href="http://www.packtpub.com/login"&gt;register at PacktPub&lt;/a&gt; to get in on their surprise! It's free to &lt;a href="http://www.packtpub.com/login"&gt;register&lt;/a&gt; and a great place to stay up to date on the latest technologies!</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/book-review-microsoft-silverlight-5-building-rich-enterprise-dashboards</id><title type="text">Book Review: Microsoft Silverlight 5: Building Rich Enterprise Dashboards</title><published>2012-04-15T21:40:42Z</published><updated>2014-09-16T16:31:54Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/book-review-microsoft-silverlight-5-building-rich-enterprise-dashboards" /><content type="text">&lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;If you are building applications that could use a dashboard then I would recommend taking a look at the &lt;a href="http://www.packtpub.com"&gt;PacktPub&lt;/a&gt; book “&lt;a href="http://www.packtpub.com/microsoft-silverlight-5-for-enterprise-dashboards/book"&gt;Microsoft Silverlight 5: Building Rich Enterprise Dashboards&lt;/a&gt;”. The book focuses on using Silverlight 5 to construct various dashboards and provides guidelines on how to achieve this from start to finish. Along the way are useful tips and tricks and gotchas that can be found when dealing with the various aspects of building a dashboard.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;a title="Microsoft Silverlight 5: Building Rich Enterprise Dashboards" href="http://www.packtpub.com/microsoft-silverlight-5-for-enterprise-dashboards/book"&gt;&lt;img title="Microsoft Silverlight 5: Building Rich Enterprise Dashboards" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin-left: 0px; border-left: 0px; display: inline; margin-right: 0px" border="0" alt="Microsoft Silverlight 5: Building Rich Enterprise Dashboards" src="/posts/files/SL5_Building_Rich_Enterprise_Dashboards_cover.jpg" width="192" height="244"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;The flow of this book is a bit off. Things start off with the general “What is Silverlight 5?” and “Why should I use Silverlight for a dashboard?” questions that are answered at a high level. Reading further starts to answer what dashboards are and how to use Silverlight to build a dashboard. Next comes connecting your data to the dashboard followed by how to integrate your Silverlight dashboard into SharePoint. Going from one chapter to the next has a slight rhythm about it, but it feels disconnected most of the time as if each author took a chapter to write and in the end everything was copied and pasted into this book. One good thing about this approach is that a reader can jump between chapters and still understand what each chapter brings to the table.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;The entire book covers many topics … too many topics in my opinion. The number of topics would not be discomforting if each topic delved into more detail; however, most of the topics are at a 30,000 foot level and leave the reader wanting to know more. For example, the book covers the Model View View-Model (MVVM) pattern and describes what it is and why it is a good pattern to follow using Silverlight. This is good but the chapters start to talk about specifics related to MVVM and do not provide enough detail. The delegate command is mentioned in a couple of lines with an example of how to create a delegate command but no information on how (or why) to use the delegate command. If the reader looks closely at the other examples throughout the book then one can infer how to use a delegate command but not the importance of it. There are many more topics explained in the same manner throughout this book and each of these topics really needs more detail to highlight their importance.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;The crux of the book is about building dashboards using Silverlight 5 and the authors do accomplish this. There are a couple of chapters that really shine about dashboards and how Silverlight can be used to easily build a dashboard. With the majority of this book covering many topics about Silverlight the overall goal of learning how to build a dashboard is lost.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;With so many topics being covered at a high level this book is not for Silverlight beginners. Having a good understanding of what Silverlight is and the features that are in Silverlight will help readers take advantage of this book. If you are new to Silverlight pay close attention to the many topics that are talked about in this book and do some research when you come across the topics to get a better idea of what that feature does and its importance.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;One thing I found very distracting were the code examples. Most of them had spaces missing between words. It was very difficult to read the code to gain a better understanding of the topic at hand. This makes the code almost useless to have in the book, please get this fixed!&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;The book does cover many of the key aspects needed to build a great dashboard with the correct technologies in Silverlight. However, pay close attention to the various technologies that are in each chapter and do enough research to understand these technologies as they are important in constructing your dashboard. If you do you will be able to build a great dashboard using Silverlight.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;To wrap things up I would recommend &lt;a href="http://www.packtpub.com/microsoft-silverlight-5-for-enterprise-dashboards/book"&gt;this book&lt;/a&gt; if you are interested in building a dashboard using Silverlight. Don’t expect too much from this book as a majority of the chapters focus on the basic (and advanced) building blocks of Silverlight at a high level. It is a quick read and worth your time if you are of a particular audience looking to build a dashboard in Silverlight.&lt;/p&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/surface-zoom-behavior</id><title type="text">Surface Zoom Behavior</title><published>2009-07-09T17:20:38Z</published><updated>2014-09-18T19:26:25Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/surface-zoom-behavior" /><content type="text">&lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;I have been writing applications for the &lt;a href="http://www.microsoft.com/surface"&gt;Surface&lt;/a&gt; recently and started to experiment integrating &lt;a href="http://gallery.expression.microsoft.com/en-us/site/items/behaviors"&gt;Behaviors&lt;/a&gt; into my applications. One behavior that I am using is a conversion from &lt;a href="http://geekswithblogs.net/lbugnion/Default.aspx"&gt;Laurent Bugnion&lt;/a&gt; and his amazing &lt;a href="http://geekswithblogs.net/lbugnion/archive/2009/04/05/using-a-behavior-to-magnify-your-wpf-applications.aspx"&gt;Zoom Behavior&lt;/a&gt; for WPF. It was very straight forward and simple to convert this to a Surface Behavior and I would like to demonstrate how I accomplished that in this post.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;First thing, go grab Laurent's excellent &lt;a href="http://geekswithblogs.net/lbugnion/archive/2009/04/05/using-a-behavior-to-magnify-your-wpf-applications.aspx"&gt;Zoom Behavior&lt;/a&gt; source code (under the Downloads section). Then create a new Surface application and copy in the three files for the Zoom Behavior: ZoomAdorner.cs, ZoomBehavior.cs and ZoomExtension.cs. The main thing we need to replace in the WPF Zoom Behavior code is the mouse events since Surface has no concept of a mouse, instead Surface understands &lt;a href="http://www.microsoft.com/surface/Development.aspx"&gt;Contact points&lt;/a&gt; (sorry, the Surface SDK is not open to the public just yet). These Contacts are how the Surface knows when there is some sort of user input and this is how we will tell the Zoom Behavior where to magnify.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;The bulk of the work will be done in the ZoomAdorner class. There were only 3 things we had to change:&lt;/p&gt; &lt;ul xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;li&gt;Replace the MouseMove event with an appropriate Contact event  &lt;li&gt;Use the Contact event to hold onto the current position  &lt;li&gt;Update the SetGlass() method to reflect the new position from the Contact event&lt;/li&gt;&lt;/ul&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;Pretty easy, right? But there are 2 more classes to deal with: ZoomBehavior.cs and ZoomExtension.cs. Lucky for us, neither class &lt;em&gt;needs&lt;/em&gt; to be changed, but we will remove 2 lines from ZoomBehavior.cs that changes the cursor of the mouse when the Zoom Behavior is active since Surface does not deal with the Mouse. And that's it!&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;I have 2 attachments, one that is a direct port of Laurent's &lt;a href="http://www.galasoft.ch/mydotnet/GalaSoft.Utilities/ZoomBehaviorTest.zip"&gt;sample application&lt;/a&gt; that is Surface ready and another test application that uses a &lt;a href="http://blogs.msdn.com/jennifer/archive/2009/05/20/surface-development-part-3-scatterview.aspx"&gt;ScatterView&lt;/a&gt; to demonstrate that the Surface Zoom Behavior will work alongside the user and not interfere with dragging / dropping of Surface elements. Enjoy!&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;One thing to note, when testing this Zoom Behavior out I found a slight bug in the code. If you set the IsVisible property of the Zoom Behavior to True it will crash. Looking into this does not reveal exactly why this happens other than a private member is not set for some reason which ultimately causes this crash. To get around this, set the IsVisible property to false (or do not specify the property since it defaults to false) and in the code behind in the OnApplicationActivated(object sender, EventArgs e) method set the property to true. This will allow you to have the Zoom Behavior start when your application starts.&lt;/p&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;There can be a couple of improvements that can be made that would enhance this Zoom Behavior:&lt;/p&gt; &lt;ul xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;li&gt;Have multiple instances for multiple Contacts  &lt;li&gt;Demo of a new template with a slider to control the Zoom Factor  &lt;li&gt;Fix the IsVisible="True" at startup bug&lt;/li&gt;&lt;/ul&gt; &lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;One last thing to remember, if you are using the Surface Simulator then you need to run that first before running an application with this Zoom Behavior.&lt;/p&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;file&lt;/th&gt; &lt;th&gt;file size&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="/posts/files/Magnify.zip"&gt;Magnify.zip&lt;/a&gt;&lt;/td&gt; &lt;td&gt;1.01 MB&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="/posts/files/ScatterViewTest.zip"&gt;ScatterViewTest.zip&lt;/a&gt;&lt;/td&gt; &lt;td&gt;225.13 KB&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/focus-home</id><title type="text">Focus On The Home</title><published>2009-04-10T20:46:00Z</published><updated>2014-09-16T17:17:13Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/focus-home" /><content type="text">&lt;p&gt;Haven't updated this site in a while, been busy with some pretty cool projects ... more to come on them in the near future.&lt;/p&gt; &lt;p&gt;One of the projects I have been doing is a site called &lt;a href="http://fothorganizing.com"&gt;Focus on the Home&lt;/a&gt;. This site offers a way for people to get organized in many different ways and stay organized. The &lt;a href="http://fothorganizing.com/services"&gt;services&lt;/a&gt; that are offered are great ways to start out, and you can even get started with &lt;a href="http://fothorganizing.com/focus-home-planning-packages"&gt;packages&lt;/a&gt;!&lt;/p&gt; &lt;p&gt;Go check out &lt;a href="http://fothorganizing.com"&gt;Focus on the Home&lt;/a&gt; and see how you can get organized and stay organized!&lt;/p&gt; &lt;p&gt;We are looking into adding monthly newsletters that will tie in with the tip of the month that is already up!&lt;/p&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/deepearth-version-1-released</id><title type="text">DeepEarth Version 1 Released!</title><published>2008-12-18T22:21:43Z</published><updated>2014-09-16T18:01:34Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/deepearth-version-1-released" /><content type="text">&lt;p&gt;My time has been scarce and one of the reasons is due to my participation on the &lt;a href="http://www.codeplex.com/deepearth"&gt;DeepEarth&lt;/a&gt; dev team. There are a handful of us that have been working hard to push out the first stable version of DeepEarth. A few of the developers have been working very hard and the work has paid off!&lt;/p&gt; &lt;p&gt;DeepEarth is a Silverlight mapping framework that takes full advantage of the MultiImageScale control (same control that is responsible for all the cool &lt;a href="http://memorabilia.hardrock.com/"&gt;DeepZoom&lt;/a&gt; samples). DeepEarth has plenty to offer in its first release and the one thing I am super excited about is the different tile layers that are offered:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Virtual Earth (&lt;a href="http://www.codeplex.com/deepearth/Wiki/View.aspx?title=Useful%20Resources&amp;amp;referringTitle=Home"&gt;dev account&lt;/a&gt; needed)  &lt;li&gt;Open Street Map  &lt;li&gt;Blue Marble  &lt;li&gt;Cloud Made  &lt;li&gt;WMS  &lt;li&gt;Yahoo Maps  &lt;li&gt;Google Moon Variations &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And more are on their way! Plus, you can implement your own tile layer very easily by following along the examples that are included. There is even an example for map tiles that are stored on your local machine, so no need to have an internet connection!&lt;/p&gt; &lt;p&gt;There is already talk of porting this to WPF, all that is missing is the MultiScaleImage control. Anyone want to take a crack at porting that control to WPF? I've heard that the control will be in .Net 4.0, but that is still some time away.&lt;/p&gt; &lt;p&gt;Go check out a demo here: &lt;a href="http://deepearth.soulsolutions.com.au"&gt;http://deepearth.soulsolutions.com.au&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And please report back any feedback to the &lt;a href="http://www.codeplex.com/deepearth"&gt;DeepEarth project site&lt;/a&gt;. And feel free to contribute!&lt;/p&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/silverlight-write-and-win-contest</id><title type="text">Silverlight Write and Win Contest</title><published>2008-10-01T17:17:22Z</published><updated>2014-09-17T12:02:40Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/silverlight-write-and-win-contest" /><content type="text">There is a &lt;a href="http://www.silverlightshow.net/SilverlightContestWriteAndWin.aspx"&gt;silverlight write and win contest&lt;/a&gt; that is currently allowing people to vote for the best article. There are some great articles there including 2 of my older posts about connecting drupal and silverlight. Be sure to read them all and vote for the one you like best! To vote, you must have silverlight installed and a nifty silverlight voting control will be displayed below the list of articles on the above link. Simply click on the article that you would like to vote for.</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/silverlight-and-drupal-popular-content</id><title type="text">Silverlight and Drupal: Popular Content</title><published>2008-09-09T16:19:16Z</published><updated>2014-09-18T19:28:58Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/silverlight-and-drupal-popular-content" /><content type="text">&lt;div style="height: 400px; width: 450px"&gt;&lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"&gt;             &lt;param name="source" value="/posts/files/PopularContent.xap" /&gt;             &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt;                 &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt;             &lt;/a&gt;         &lt;/object&gt;&lt;/div&gt; &lt;p&gt;The next item in this series is the drupal popular content block. You can see this block on the right hand side titled 'Popular content' that lists my sites popular content of all time. The current block actually uses the &lt;a href="http://drupal.org/project/views"&gt;views (version 2)&lt;/a&gt; module to display the content, but this information ultimately comes from drupals core &lt;a href="http://drupal.org/handbook/modules/statistics"&gt;statistics module&lt;/a&gt;. The information will be hosted in a custom silverlight control that I have created that simply sends requests to my custom drupal module and displays the data that it receives. I have broken down each part into their own section.&lt;/p&gt; &lt;p&gt;&lt;a href="/posts/files/mattserbinskihome.jpg"&gt;&lt;img alt="mattserbinskihome-thumb" src="/posts/files/mattserbinskihome-thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Drupal Part:&lt;/p&gt; &lt;p&gt;The drupal side of things uses the same method that I described in my first 2 posts of this series, &lt;a href="http://www.mattserbinski.com/blog/connecting-drupal-and-silverlight"&gt;Connecting Drupal and Silverlight&lt;/a&gt;, &lt;a href="http://www.mattserbinski.com/blog/silverlight-and-drupal-syndication"&gt;Silverlight and Drupal: Syndication&lt;/a&gt; for requesting data where I map my XML-RPC methods to callback functions that send the appropriate data to my silverlight control. Drupals poplar content block has 3 pieces of popular content that I was interested in receiving data from:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Today's popular content  &lt;li&gt;Last viewed content  &lt;li&gt;All time popular content &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Each of these will display a number of entries (determined by a number passed into these functions) that show their corresponding results. For example, if you request data from the all time popular content and wish to see only 3 entries, you will receive back the 3 &lt;a href="http://drupal.org/node/21947"&gt;nodes&lt;/a&gt; that have been viewed the most since you began your site (or since you &lt;a href="http://drupal.org/handbook/modules/statistics"&gt;enabled the statistics module&lt;/a&gt;). The data that comes back is HTML code for easy layout of links that point to these popular nodes.&lt;/p&gt; &lt;p&gt;For my silverlight control I needed the exact information that this module was passing back to me but in another form (to make my life easier on the silverlight side). Of course, I could use the HTML code that I was receiving, parse it correctly and end up with the same result, but I wanted to tinker with php some more. I decided to look into what the statistics module was calling using the &lt;a href="http://api.drupal.org/api/function/statistics_block/6"&gt;drupal api&lt;/a&gt; so I could tweak those calls in my custom drupal module. The section of code in the statistic module that I was interested in is below:&lt;/p&gt;&lt;pre class="code"&gt;$&lt;span style="color: red"&gt;alltimetop &lt;/span&gt;&lt;span style="color: blue"&gt;= variable_get('statistics_block_top_all_num', &lt;/span&gt;0);
&lt;span style="color: red"&gt;if &lt;/span&gt;&lt;span style="color: blue"&gt;(&lt;/span&gt;$&lt;span style="color: red"&gt;alltimetop &lt;/span&gt;&amp;amp;&amp;amp; &lt;span style="color: blue"&gt;(&lt;/span&gt;$&lt;span style="color: red"&gt;result &lt;/span&gt;&lt;span style="color: blue"&gt;= statistics_title_list('totalcount', &lt;/span&gt;$&lt;span style="color: red"&gt;alltimetop&lt;/span&gt;&lt;span style="color: blue"&gt;)) &lt;/span&gt;&amp;amp;&amp;amp; &lt;span style="color: blue"&gt;(&lt;/span&gt;$&lt;span style="color: red"&gt;node_title_list &lt;/span&gt;&lt;span style="color: blue"&gt;= node_title_list($result, &lt;/span&gt;&lt;span style="color: red"&gt;t&lt;/span&gt;&lt;span style="color: blue"&gt;('All time:'))))
   &lt;/span&gt;{
     $&lt;span style="color: red"&gt;content[] &lt;/span&gt;&lt;span style="color: blue"&gt;= $node_title_list;
   &lt;/span&gt;}&lt;/pre&gt;&lt;/a&gt;
&lt;p&gt;This returns the well formatted HTML code that I was just describing for the all time popular content. The other 2 types of popular content (today and last viewed) have the same implementation with different variables. To alter this code some, I dove into the '&lt;a href="http://api.drupal.org/api/function/node_title_list/6"&gt;node_title_list&lt;/a&gt;' method and saw that this method takes in the results from the '&lt;a href="http://api.drupal.org/api/function/statistics_title_list/6"&gt;statistics_title_list&lt;/a&gt;' method and grabs out the nodes properties and then formats the string into a block&amp;nbsp; of HTML so the popular content block can be easily rendered. For my silverlight control I only needed the title of the popular content and a link to that node so I changed the php to the following:&lt;/p&gt;&lt;pre class="code"&gt;$&lt;span style="color: red"&gt;titles &lt;/span&gt;&lt;span style="color: blue"&gt;= array();
&lt;/span&gt;$&lt;span style="color: red"&gt;urls &lt;/span&gt;&lt;span style="color: blue"&gt;= array();
&lt;/span&gt;$&lt;span style="color: red"&gt;result &lt;/span&gt;&lt;span style="color: blue"&gt;= statistics_title_list('totalcount', &lt;/span&gt;$&lt;span style="color: red"&gt;numContent&lt;/span&gt;&lt;span style="color: blue"&gt;)&lt;/span&gt;;

&lt;span style="color: red"&gt;while &lt;/span&gt;&lt;span style="color: blue"&gt;(&lt;/span&gt;$&lt;span style="color: red"&gt;node &lt;/span&gt;&lt;span style="color: blue"&gt;= db_fetch_object($result))&lt;/span&gt;

&lt;span style="color: blue"&gt;&lt;/span&gt; {
   $&lt;span style="color: red"&gt;titles[] &lt;/span&gt;&lt;span style="color: blue"&gt;=  $node-&amp;gt;&lt;/span&gt;title;
   $&lt;span style="color: red"&gt;urls&lt;/span&gt;[] = &lt;font color="#0000ff"&gt;check_url&lt;/font&gt;(&lt;font color="#0000ff"&gt;url&lt;/font&gt;('node/'. $&lt;span style="color: red"&gt;node&lt;/span&gt;-&amp;gt;nid));
  }

return &lt;font color="#0000ff"&gt;array&lt;/font&gt;('popularContentAllTimeDone', &lt;font color="#0000ff"&gt;implode&lt;/font&gt;("~", $&lt;span style="color: red"&gt;titles&lt;/span&gt;), &lt;font color="#0000ff"&gt;implode&lt;/font&gt;("~", $&lt;span style="color: red"&gt;urls&lt;/span&gt;));&lt;/pre&gt;&lt;/a&gt;
&lt;p&gt;I simple call the 'statistics_title_list' method that will return all of the nodes that I request ($numContent) that are in the all time popular content row in the database. I then go through each node pulling off the the title and converting that nodes nid to a valid url. I then &lt;a href="http://us.php.net/implode"&gt;implode&lt;/a&gt; each result with a special character (~) and return the method that my silverlight control will call, the titles object and the urls object. I used the implode method for easier separation of the strings that my silverlight control will receive.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Silverlight Part:&lt;/h4&gt;
&lt;p&gt;Now that we know how the data will be received in our silverlight control (and we already know how we will request data from my first post, &lt;a href="http://www.mattserbinski.com/blog/connecting-drupal-and-silverlight"&gt;Connecting Drupal and Silverlight&lt;/a&gt;) we can lay out our design. I wanted to replicate what my site already has (picture at the top-right of this post) where the popular content displays a list of hyperlinks. Ah, a list! We will use a &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox(VS.95).aspx"&gt;ListBox&lt;/a&gt; and customize each item to look like hyperlinks and even provide an event that will take us to that node when it is selected. For each type of popular content that we will viewing, I have chosen to make 3 listboxes and have them act the same way, just request different data.&lt;/p&gt;
&lt;p&gt;The listbox control contains a collection of items and by default displays these items in a vertical fashion (This can be changed be changing the ItemsPanel of the listbox). One great thing about the listbox is that you can bind its collection! And this is precisely what we will be doing. I set the ItemsSource={Bidning} on my listbox and this allows me to programmatically set the listboxes DataContext property in code when I receive the data I want to bind to.&lt;/p&gt;
&lt;p&gt;I have 3 dictionaries that map a uri to a string that is populated from the data that my custom drupal module sends me. I bind my listboxes to these dictionaries, respectively and thats it, those listboxes are fully populated! Wait .... it doesn't look right, well yea, it displays 'Collection ...' instead of the node titles that we want to link to. Since the listbox, by default displays each of its items' ToString() method we get the 'Collection ...' string. We need to edit the ItemContainerStyle of the listbox so we can tell what each of its items should look like! We simply want each item to display the title that we received from drupal. This can be done with the following code (omitting my visual state groups):&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Style &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Key&lt;/span&gt;&lt;span style="color: blue"&gt;="styleItemContainer" &lt;/span&gt;&lt;span style="color: red"&gt;TargetType&lt;/span&gt;&lt;span style="color: blue"&gt;="ListBoxItem"&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;="HorizontalAlignment" &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;="Left" /&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;="Template"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate &lt;/span&gt;&lt;span style="color: red"&gt;TargetType&lt;/span&gt;&lt;span style="color: blue"&gt;="ListBoxItem"&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ColumnDefinition &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;="0.1*"/&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;
          &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;                   &lt;/span&gt;&lt;span style="color: blue"&gt;

          &lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;!-- Circle drawing --&amp;gt;
          &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Ellipse &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;="6" &lt;/span&gt;&lt;span style="color: red"&gt;Height&lt;/span&gt;&lt;span style="color: blue"&gt;="6" &lt;/span&gt;&lt;span style="color: red"&gt;Fill&lt;/span&gt;&lt;span style="color: blue"&gt;="#FFE8E8E8" &lt;/span&gt;&lt;span style="color: red"&gt;Stroke&lt;/span&gt;&lt;span style="color: blue"&gt;="#FFB5B6B6" &lt;/span&gt;&lt;span style="color: red"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: blue"&gt;="0" &lt;/span&gt;&lt;span style="color: red"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;="Top" &lt;/span&gt;&lt;span style="color: red"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;="Center"/&amp;gt;

          &lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;!-- Text with underline --&amp;gt;
          &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid &lt;/span&gt;&lt;span style="color: red"&gt;Margin&lt;/span&gt;&lt;span style="color: blue"&gt;="4" &lt;/span&gt;&lt;span style="color: red"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: blue"&gt;="1" &lt;/span&gt;&lt;span style="color: red"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;="Left"&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Rectangle &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;="rectangleUnderline" &lt;/span&gt;&lt;span style="color: red"&gt;Stroke&lt;/span&gt;&lt;span style="color: blue"&gt;="#FF0062A0" &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515"&gt;TemplateBinding &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;}" &lt;/span&gt;&lt;span style="color: red"&gt;Height&lt;/span&gt;&lt;span style="color: blue"&gt;="1" &lt;/span&gt;&lt;span style="color: red"&gt;RadiusX&lt;/span&gt;&lt;span style="color: blue"&gt;="2" &lt;/span&gt;&lt;span style="color: red"&gt;RadiusY&lt;/span&gt;&lt;span style="color: blue"&gt;="2" &lt;/span&gt;&lt;span style="color: red"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;="Bottom" &lt;/span&gt;&lt;span style="color: red"&gt;Visibility&lt;/span&gt;&lt;span style="color: blue"&gt;="Collapsed" /&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;="textBlock" &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Key&lt;/span&gt;&lt;span style="color: blue"&gt;}" &lt;/span&gt;&lt;span style="color: red"&gt;Foreground&lt;/span&gt;&lt;span style="color: blue"&gt;="#FF367ACF" /&amp;gt;
          &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Style&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/a&gt;
&lt;p&gt;The first thing to note is the TargetType="ListBoxItem" on the style. This tells us that the style we are applying to the listboxes' ItemsContainerStyle will directly affect its items. The next thing to note is that the TextBlock has its Text property set to {Binding Key}. What does this mean? This is telling us that the text that will be displayed for each ListBoxItem is bound to some property Key. This Key property is actually the Key in our KeyValuePair Dictionary which is bound to our listboxes ItemsSource property. So for each item our listbox it will know to display the title of each node that is returned. Databinding sure is sweet!&lt;/p&gt;
&lt;p&gt;Ok, so now our listboxes display the correct data that we want them to. All that is left is to plumb in some event that will navigate to those nodes when those items are selected. Databinding to the rescue once again! In the drupal part of this post we were returning not only the titles of each node but also the links that will take us there. This is part of the Dictionary that we set up and our listboxes are already databound to these Dictionaries, so were done! Well, just need to plumb in the event that will pull the link out of the dictionary and navigate to that page. Listbox has a 'SelectionChanged' event that will be raised whenever the selection is changed, which is perfect!&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;listBoxToday_SelectionChanged(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;SelectionChangedEventArgs &lt;/span&gt;e)
{
   &lt;span style="color: #2b91af"&gt;Uri &lt;/span&gt;link = ((&lt;span style="color: #2b91af"&gt;KeyValuePair&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;Uri&lt;/span&gt;&amp;gt;)((sender &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ListBox&lt;/span&gt;).SelectedItem)).Value;
   &lt;span style="color: #2b91af"&gt;HtmlPage&lt;/span&gt;.Window.Navigate(link);
}&lt;/pre&gt;&lt;/a&gt;
&lt;p&gt;The selectionChanged event grabs the listboxes selected item (which is a KeyValuePair) and pulls out the value which is our url. Then we tell the window to navigate to that link. It's that simple.&lt;/p&gt;
&lt;p&gt;After a little styling and correctly positioning elements, here is the final result. This control allows the user to enter a number that will be returned for each poplar content. The number must be greater than 0 or else our module will return an empty string and all that will be displayed is a tiny circle (leftover residue from our item template).&lt;/p&gt;
&lt;p&gt;&lt;a href="/posts/files/SL-PopularContent.png"&gt;&lt;img alt="SL-PopularContent-thumb" src="/posts/files/SL-PopularContent-thumb.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is only 1 webClient that is being used for this control, so you must wait until the request is done processing before you make another request. Go and try the control out, it's at the top of this post and feel free to change the number for each request. One tip, press the 'Last Viewed' button, then navigate to different pages on my site and press that button again!&lt;/p&gt;
&lt;p&gt;The source code is provided along with my custom drupal module. Remember to set the html page as the startup project if you download the source and decide to play with it. &lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;file&lt;/th&gt;
&lt;th&gt;file size&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/posts/files/SLDrupal - Popular Content.rar"&gt;SLDrupal - Popular Content.rar&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;215.47 KB&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/posts/files/popularContentmodule.txt"&gt;popularContentmodule.txt&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.27 KB&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/introduction-drupal-community</id><title type="text">Introduction for the Drupal Community</title><published>2008-09-09T16:14:45Z</published><updated>2014-09-17T12:39:26Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/introduction-drupal-community" /><content type="text">&lt;p&gt;Hello all! I wanted to write a short introduction of myself as I am now venturing into drupal. My name is Matt Serbinski and some of you may know my brother, &lt;a href="http://tedserbinski.com"&gt;Ted Serbinski&lt;/a&gt;. He is the one who has gotten me into drupal and I have been part of the drupal community since early 2006, all though very silent. I have been working with drupal on and off and am now beginning to pick it back up again. I will be making a few websites for friends and family that will use drupal and allow me to explore some new features / modules that drupal has to offer. I am also in the process of connecting silverlight and drupal together in various fashions and am blogging as I go along. Here are the blog posts that I have completed so far:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.mattserbinski.com/blog/connecting-drupal-and-silverlight"&gt;Connecting Drupal and Silverlight&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.mattserbinski.com/blog/silverlight-and-drupal-syndication"&gt;Silverlight and Drupal: Syndication&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.mattserbinski.com/blog/silverlight-and-drupal-popular-content"&gt;Silverlight and Drupal: Popular Content&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Per my work, I am getting into &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa663326.aspx"&gt;WPF&lt;/a&gt; and &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; and am loving it! This is one reason why I want to combine silverlight and drupal.&lt;/p&gt; &lt;p&gt;If there is something in particular that you would like to see me blog about, feel free to let me know and I will try to make time for it.&lt;/p&gt;</content></entry><entry><id>https://mattserbinski.azurewebsites.net/post/bomberman-popfly</id><title type="text">Bomberman on Popfly</title><published>2008-09-03T20:14:19Z</published><updated>2014-09-17T12:44:13Z</updated><author><name /></author><link rel="alternate" href="https://mattserbinski.azurewebsites.net/post/bomberman-popfly" /><content type="text">&lt;p&gt;&lt;b&gt;Popfly has gone offline ...&lt;/b&gt;  &lt;p&gt;&lt;a href="http://www.popfly.com"&gt;Popfly&lt;/a&gt; has once again totally impressed me! I was on vacation last week, away from my computer and I had some free time each morning so I decided to check back with popfly and make another game. I made &lt;a href="http://www.popfly.com/users/aquaseal/Bomberman"&gt;Bomberman&lt;/a&gt; (also above)! I made the beginnings of the game rather quickly as popfly's game creator has evolved to beta. All of the visuals were made from existing actors that popfly already has and I tweaked them with popfly's visual editor. They are not the best graphics, but sure beats anything that I would have done from scratch! Also, popfly has a great amount of visuals and sound effects / music to choose from to really customize your game.&lt;/p&gt; &lt;p&gt;The game I created is a mini replication of the original bomberman where a user walks around placing bombs on the ground and tries to blow up the computer. My game consists of the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Multiple Levels  &lt;li&gt;Multiple Lives  &lt;li&gt;Multiple Powerups (randomly placed beneath boxes)  &lt;li&gt;Score is kept throughout the game with bonuses for picking up powerups, killing the computer with your bomb, beating levels and having lives left once you beat the game! &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The whole game took me around 15-20 hours to complete, with plenty of testing! There is one minor bug that I have noticed where the computer can build up enough force and push you through the wall ... then you must commit suicide or hopefully the computer will blow itself up.&lt;/p&gt; &lt;p&gt;Hopefully you enjoy my game and remember to leave feedback so I know how to make future games better!&lt;/p&gt;</content></entry></feed>