<?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>Mindscape Blog &#187; Phone Elements</title>
	<atom:link href="http://www.mindscapehq.com/blog/index.php/category/phone-elements/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mindscapehq.com/blog</link>
	<description>The official blog of Mindscape</description>
	<lastBuildDate>Thu, 16 May 2013 08:55:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Windows Phone 7: Working with Camera Tasks</title>
		<link>http://www.mindscapehq.com/blog/index.php/2012/02/28/windows-phone-7-working-with-camera-tasks/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2012/02/28/windows-phone-7-working-with-camera-tasks/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 06:49:32 +0000</pubDate>
		<dc:creator>John-Daniel Trask</dc:creator>
				<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Camera]]></category>
		<category><![CDATA[manning]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=4633</guid>
		<description><![CDATA[We&#8217;re pleased to have another great post from our friends at Manning to share with you based on their soon to be release book, &#8220;Windows Phone 7 in Action&#8221;. As you may know, Mindscape offers one of the best suites of Windows Phone 7 controls including some amazing charts. We&#8217;d love to see you build [...]]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re pleased to have another great post from our friends at Manning to share with you based on their soon to be release book, &#8220;Windows Phone 7 in Action&#8221;.<img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/perga_cover150.jpg" alt="Windows Phone 7 in Action" title="Windows Phone 7 in Action" width="150" height="188" class="alignnone size-full wp-image-4639" style="float:right; margin-left:10px; margin-bottom: 10px;" /></p>
<p>As you may know, Mindscape offers one of the <a href="http://www.mindscapehq.com/products/phone-elements">best suites of Windows Phone 7 controls</a> including some <a href="http://www.mindscapehq.com/products/phone-elements/charting-controls">amazing charts</a>. We&#8217;d love to see you build applications with what you learn in this article. To make it even easier we&#8217;ve got a fantastic offer for our readers &#8211; get 40% off Windows Phone 7 in Action with the following discount code:</p>
<p><strong>mscape40</strong></p>
<p>This article is based on <a href="http://www.manning.com/perga/">Windows Phone 7 in Action</a>. It is being reproduced here by permission from Manning Publications . Manning early access books and ebooks are sold exclusively through Manning. Visit the book&#8217;s page for more information.</p>
<p><center><strong>Working with Camera Tasks</strong></center></p>
<p>All Windows Phones have at least one built-in camera. Microsoftâ€™s minimum hardware specification requires a camera with a flash. Some phones have a second front-facing camera. The Windows Phone class library contains two chooser tasks that provide limited access to the camera, or more specifically, to pictures taken by the camera or pictures that exist in the media library.</p>
<p><strong>Note:</strong> Only photographs are accessible via the chooser tasks. The chooser classes do not allow you to access videos from the camera.  </p>
<p>The chooser tasks are the PhotoChooserTask and CameraCaptureTask. Letâ€™s look at choosing from the media library with the PhotoChooserTask first.</p>
<p><strong>Choosing a photo with PhotoChooserTask</strong></p>
<p>All phone users are familiar with how to take a picture with their mobile device since taking picture is a part of their daily phone usage. But, as programmers, knowing how to take a photo with the phone is not enough. The PhotoChooserTask allows an application to launch the built-in Photo Chooser application.</p>
<p>You need to know how to use the camera from your code and how to integrate the camera with your custom application. This is what you&#8217;re going to learn in this article. </p>
<p>PhotoChooserTask allows users to select the photo from phone memory with the built-in Photo Chooser. The Photo Chooser has a navigation button that can take you to the camera application. The PhotoChooserTask is handy for those applications that allow a user to choose a photograph and use it somewhere in the application. One example is adding a picture to a user&#8217;s profile.</p>
<p>If you are coming from a .NET background then you might be wondering about the differences between OpenFileDialog and PhotoChooserTask when they both select files. The Windows Phone APIs do not give you a generic file picker so you will have to use PhotoChooserTask in order to allow the user to select a photo in your application. Table 1 describes the members of PhotoChooserTask. </p>
<p><strong>PhotoChooserTask Members</strong></p>
<table border="0" width="100%" cellspacing="5">
<tr>
<td><strong>Name</strong></td>
<td><strong>Type</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>Show</td>
<td>Method</td>
<td>Shows the Phone Chooser application.</td>
</tr>
<tr>
<td>ShowCamera</td>
<td>Property</td>
<td>Gets or sets whether the user is presented with a button for launching the camera during the photo choosing process</td>
</tr>
<tr>
<td>Completed</td>
<td>Event</td>
<td>Occurs when a chooser task is completed</td>
</tr>
</table>
<p>PhotoChooserTask&#8217;s Show method launches the built-in Photo Chooser application. When the Show method executes, your application is moved to the background as the operating system switches to Photo Chooser application. The Photo Chooser application is shown in figure 1. The Photo Chooser opens to a list of albums that the user has created in the phone. There are only two default albums in the emulator, named &#8220;Camera Roll&#8221; and &#8220;Simple Picture,&#8221; but the user might have more in a real phone device. Note that &#8220;Camera Roll&#8221; is the default album that stores all photos taken by the phone camera.</p>
<p><center><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/WindowsPhoneCamera1.png" alt="Windows Phone Photo Chooser application with camera button" title="Windows Phone Photo Chooser application with camera button" width="136" height="250" class="alignnone size-full wp-image-4634" /><br />
<em>A screenshot of the built-in Photo Chooser application with camera button</em></center></p>
<p>The ShowCamera property can be set to true if the user should see the camera icon in the application bar. When the camera icon is shown, the user has the option to take a new picture. It is always a best practice to set the ShowCamera property to true because the user may want to take a new photo right away instead of selecting one from the photo albums.</p>
<p>Let&#8217;s add an ApplicationBar menu item to show the PhotoChooserTask in our PhotoEditor application.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phone:PhoneApplicationPage.ApplicationBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;shell:ApplicationBar</span> <span style="color: #000066;">IsVisible</span>=â€œTrueâ€ <span style="color: #000066;">IsMenuEnabled</span>=â€œTrueâ€<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;shell:ApplicationBar.MenuItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;shell:ApplicationBarMenuItem</span> <span style="color: #000066;">Text</span>=â€œchoose photoâ€ </span>
<span style="color: #009900;">                <span style="color: #000066;">Click</span>=â€œChoose_Clickâ€ <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/shell:ApplicationBar.MenuItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/shell:ApplicationBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phone:PhoneApplicationPage.ApplicationBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The ApplicationBarMenuItem displays the text &#8220;choose photo.&#8221; The click event hander for the menu item constructs a PhotoChooserTask and sets the ShowCamera property to true.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> Choose_Click<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, EventArgs e<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var task <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> PhotoChooserTask<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    task<span style="color: #008000;">.</span><span style="color: #0000FF;">ShowCamera</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span>  <span style="color: #008080;">#1</span>
    task<span style="color: #008000;">.</span><span style="color: #0000FF;">Completed</span> <span style="color: #008000;">+=</span> chooserTask_Completed<span style="color: #008000;">;</span>
    task<span style="color: #008000;">.</span><span style="color: #0000FF;">Show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>The Completed event is wired up to the chooserTask_Completed event handler. When the Show method is called, your application is paused and placed in the Task Switcher&#8217;s back stack. When the user completes the chooser operation, the operating system navigates back to your application. The Completed event handler is called when the application resumes operation in the foreground. </p>
<p><strong>Note:</strong> The media library is locked when a device is connected to a computer and the Zune software is running. When the media library is locked, you will encounter errors when testing the PhotoChooserTask. </p>
<p>The Completed event will be raised when user selects a photo from a photo library, takes a new photo, or uses the back button to navigate back to the application. Listing 1 shows how to handle the Completed event and display the selected photo in the image control.</p>
<p><strong>Displaying the selected photograph</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> WriteableBitmap currentImage<span style="color: #008000;">;</span> <span style="color: #008080;">#1</span>
&nbsp;
<span style="color: #6666cc; font-weight: bold;">void</span> chooserTask_Completed<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, PhotoResult e<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">TaskResult</span> <span style="color: #008000;">==</span> TaskResult<span style="color: #008000;">.</span><span style="color: #0000FF;">OK</span><span style="color: #008000;">&#41;</span> 
    <span style="color: #008000;">&#123;</span>
        currentImage <span style="color: #008000;">=</span> PictureDecoder<span style="color: #008000;">.</span><span style="color: #0000FF;">DecodeJpeg</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">ChosenPhoto</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080;">#2</span>
&nbsp;
        photoContainer<span style="color: #008000;">.</span><span style="color: #0000FF;">Fill</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span>                     <span style="color: #008080;">#3</span>
            ImageBrush<span style="color: #008000;">&#123;</span> ImageSource <span style="color: #008000;">=</span> currentImage <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span> <span style="color: #008080;">#3</span>
&nbsp;
        imageDetails<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span>â€œImage <span style="color: #0600FF; font-weight: bold;">from</span> <span style="color: #008000;">&#123;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#125;</span>\nâ€, 
            sender<span style="color: #008000;">.</span><span style="color: #0000FF;">GetType</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        imageDetails<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">+=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span>â€œOriginal filename<span style="color: #008000;">:</span>\n<span style="color: #008000;">&#123;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#125;</span>â€, 
            e<span style="color: #008000;">.</span><span style="color: #0000FF;">OriginalFileName</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>    
    <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">else</span>
    <span style="color: #008000;">&#123;</span>
        photoContainer<span style="color: #008000;">.</span><span style="color: #0000FF;">Fill</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SolidColorBrush<span style="color: #008000;">&#40;</span>Colors<span style="color: #008000;">.</span><span style="color: #0000FF;">Gray</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        imageDetails<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">TaskResult</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>#1 Field to hold the chosen photo<br />
#2 Photo stream is in e.ChosenPhoto<br />
#3 Displays the image with a brush</p>
<p>First, we need a new WriteableBitmap field named currentImage (#1) in which we store the photograph shown in the photoContainer Rectangle control.  It is a best practice to check the TaskResult property to determine if the chooser task completed OK or if the task was canceled. The PhotoResult class defines two properties named ChosenPhoto and OriginalFileName. ChosenPhoto contains the selected pictureâ€™s data in a Stream. We pass the image stream to the DecodeJpeg method of the helper class named PictureDecoder (#2).</p>
<p>The PictureDecoder class is found in the Microsoft.Phone namespace. The DecodeJpeg method builds a WriteableBitmap. We use the WriteableBitmap as the source for an ImageBrush, and the brush is used as the Fill for the photoContainer (#3). Finally, we build a message informing the user that the picture came from the PhotoChooserTask and had the filename specified in the OriginalFileName property. </p>
<p>When the TaskResult is not OK, we clear the photoContainer by setting the Fill property to a SolidColorBrush and display the TaskResult value in the imageDetails TextBlock.</p>
<p>Run the application, select the choose photo menu item, and pick a photo. The photo you choose should be shown in the application when the PhotoChooserTask completes. Next, we look at how to use the CameraCaptureTask.</p>
<p><strong>Taking photos with CameraCaptureTask</strong></p>
<p>CameraCaptureTask is another useful task that allows developers to launch the built-in camera application. Unlike PhotoChooserTask, it allows you to open the camera directly from an application without requiring the user to perform additional clicks. Shown in figure 2, the camera application in the emulator shows a placeholder white screen with a moving black block. You can take a photo in the emulator by clicking the round widget located at the right top corner. We recommend you to use a physical device to test this task. </p>
<p><center><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/WindowsPhoneCamera2.png" alt="Windows Phone Camera Application" title="Windows Phone Camera Application" width="147" height="266" class="alignnone size-full wp-image-4635" /><br />
<em>Figure 2 The camera application in the emulator</em></center></p>
<p>The CameraCaptureTask does not have any properties and only implements the Show method. Letâ€™s show the camera application by calling the Show method from the click event of a new menu item we add to MainPage.xaml.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;shell:ApplicationBarMenuItem</span> <span style="color: #000066;">Text</span>=â€œcapture photoâ€ <span style="color: #000066;">Click</span>=â€œCapture_Clickâ€ <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>The snippet below shows how to use CameraCaptureTask.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> Capture_Click<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, EventArgs e<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var task <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> CameraCaptureTask<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    task<span style="color: #008000;">.</span><span style="color: #0000FF;">Completed</span> <span style="color: #008000;">+=</span> chooserTask_Completed<span style="color: #008000;">;</span>
    task<span style="color: #008000;">.</span><span style="color: #0000FF;">Show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>We subscribe to the Completed event to receive the photo stream from the camera and we call the Show method to launch the camera. For Completed event, we can use the same event handler method that we used in PhotoChooserTask sample.</p>
<p>Deploy the updated application to your phone, run the application and choose the capture photo menu option. Hold the phone in the landscape orientation, snap a picture and press the accept button. When the task completes, you should see your new photo displayed in the photoContainer. Select the capture photo menu option again, but, this time, hold your phone in the portrait orientation when you snap the picture. When the task returns this time, the new picture is displayed sideways. The important thing to note is that the image stream that returns from Camera will not respect the orientation of your application. We show you how to handle the orientation of a picture in the next part.</p>
<p><strong>Handling picture orientation in CameraCaptureTask</strong></p>
<p>Please take a look at figure 3. Do you notice that there is something wrong? The orientation of the photograph does not match the orientation of the application.</p>
<p><center><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/WindowsPhoneCamera3.png" alt="Windows Phone orientation problems with CameraCaptureTask" title="Windows Phone orientation problems with CameraCaptureTask" width="147" height="266" class="alignnone size-full wp-image-4636" /><br />
<em>Figure 3 Orientation problems with CameraCaptureTask</em></center></p>
<p>The photo stream that returns from the camera does not know or care about the orientation of your application. The picture&#8217;s orientation will be based on how the user holds the phone while taking the picture. We cannot ask our user to hold the photo in specific position and they will hold the phone however they like. All we can do is to adjust the orientation of photo before showing it in our application. </p>
<p><strong>Tip:</strong> The image rotation techniques shown in this section were inspired by Microsoft blogger Tim Heuer, who wrote very good post about orientation mismatch in his blog. <a href="http://timheuer.com/blog/archive/2010/09/23/working-with-pictures-in-camera-tasks-in-windows-phone-7-orientation-rotation.aspx">You can read his blog post here</a>.</p>
<p>The CameraCaptureTask writes metadata about the picture to the stream along with the image data. The image data and metadata are in the Exchange Image File Format (EXIF). The EXIF format has an attribute that we can read to determine the orientation of the photo. The PhotoResultâ€™s ChosenPhoto property is a Stream and we need a way to extract the EXIF data from the stream.  In our sample, we are going to use ExifLib, an open source EXIF library that can be <a href="http://www.codeproject.com/Articles/47486/Understanding-and-Reading-Exif-Data">downloaded here</a>. We have included the ExifLib assembly in the sample project. Feel free to use an EXIF library of your choice or you can even roll your own library. </p>
<p>Before we think about how to modify the orientation, we need to figure out the default orientation of the photo that we get from the camera and how the orientation is different from the applicationâ€™s orientation. Figure 4 shows the possible combinations of application and camera orientation. </p>
<p><center><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/WindowsPhoneCamera4.png" alt="Windows Phone different ways of holding camera, photo outputs and degrees that the picture needs to be rotated." title="Windows Phone different ways of holding camera, photo outputs and degrees that the picture needs to be rotated." width="288" height="263" class="alignnone size-full wp-image-4637" /><br />
<em>Figure 4 Different ways of holding camera, photo outputs, and degrees that the picture needs to be rotated</em></center></p>
<p>This figure shows four different ways of holding the camera and the output in very clear manner. The first column of this diagram illustrates that our sample application is always in a portrait orientation. The second column shows the different ways of holding the camera. The third column displays the output photo from the camera. As you can see, the default orientation of photo will be different based on the way that the user holds the camera. The last column shows how many degrees we need to rotate the photo in order to get an orientation that matches the application. </p>
<p>The code that performs the desired modifications shown in figure 4 is implemented in two steps. The first step calculates the angle to rotate the image, and the second step performs the rotation. Listing 2 demonstrates how to calculate the degree of rotation in the GetAngleFromExif method. </p>
<p><strong>Calculate how many degrees to rotate a photo</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">ExifLib</span><span style="color: #008000;">;</span> <span style="color: #008080;">#A</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span> 
&nbsp;
<span style="color: #6666cc; font-weight: bold;">int</span> GetAngleFromExif<span style="color: #008000;">&#40;</span>Stream imageStream<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var position <span style="color: #008000;">=</span> imageStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Position</span><span style="color: #008000;">;</span>
    imageStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Position</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
    ExifOrientation orientation <span style="color: #008000;">=</span> ExifReader<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadJpeg</span><span style="color: #008000;">&#40;</span>  <span style="color: #008080;">#1</span>
        imageStream, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Orientation</span><span style="color: #008000;">;</span>         <span style="color: #008080;">#1</span>
    imageStream<span style="color: #008000;">.</span><span style="color: #0000FF;">Position</span> <span style="color: #008000;">=</span> position<span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">switch</span> <span style="color: #008000;">&#40;</span>orientation<span style="color: #008000;">&#41;</span> <span style="color: #008080;">#2</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> ExifOrientation<span style="color: #008000;">.</span><span style="color: #0000FF;">TopRight</span><span style="color: #008000;">:</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #FF0000;">90</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> ExifOrientation<span style="color: #008000;">.</span><span style="color: #0000FF;">BottomRight</span><span style="color: #008000;">:</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #FF0000;">180</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> ExifOrientation<span style="color: #008000;">.</span><span style="color: #0000FF;">BottomLeft</span><span style="color: #008000;">:</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #FF0000;">270</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> ExifOrientation<span style="color: #008000;">.</span><span style="color: #0000FF;">TopLeft</span><span style="color: #008000;">:</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> ExifOrientation<span style="color: #008000;">.</span><span style="color: #0000FF;">Undefined</span><span style="color: #008000;">:</span>
        <span style="color: #0600FF; font-weight: bold;">default</span><span style="color: #008000;">:</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>#A Uses the EXIF library<br />
#1 Reads the orientation<br />
#2 Determines the rotation angle </p>
<p>First, we read the orientation from the EXIF formatted stream. The ExifReader.ReadJpeg method accepts an image stream and returns a JpegInfo instance. The JpegInfo object contains information stored in the EXIF header in the image stream, including its orientation. We extract the orientation, in the form of an ExifOrientation instance, from the Orientation property (#1). Based on that, we will define how many degrees we need to rotate (#2). We suggest that you compare the implementation and the diagram in figure 4 to understand more details. </p>
<p>Once we know how many degrees we need to rotate the original photo, itâ€™s very easy to create a new photo with the correct orientation based on the original photo. The WriteableBitmap class provides direct access to the pixel level information of bitmaps. The image data is accessed through the Pixels property, a one-dimensional array of pixels laid out in a row first pattern. The PixelWidth and PixelHeight properties are used to determine how many rows and columns of pixels exist in a two-dimensional image. The first row of pixels resides in the Pixels array from index 0 to PixelWidth &#8211; 1. The second row of images resides in the Pixels array from index PixelWidth to 2 * PixelWidth &#8211; 1. Listing 3 shows how to read the pixels from original photo and copy them to the right position in the new bitmap image. </p>
<p><strong>Listing 3 Copy the pixels from original bitmap to new bitmap</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> WriteableBitmap RotateBitmap<span style="color: #008000;">&#40;</span>WriteableBitmap source, 
    <span style="color: #6666cc; font-weight: bold;">int</span> width, <span style="color: #6666cc; font-weight: bold;">int</span> height, <span style="color: #6666cc; font-weight: bold;">int</span> angle<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var target <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> WriteableBitmap<span style="color: #008000;">&#40;</span>width, height<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>  <span style="color: #008080;">#1</span>
    <span style="color: #6666cc; font-weight: bold;">int</span> sourceIndex <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">int</span> targetIndex <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> x <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> x <span style="color: #008000;">&lt;</span> source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span><span style="color: #008000;">;</span> x<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> y <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> y <span style="color: #008000;">&lt;</span> source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelHeight</span><span style="color: #008000;">;</span> y<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            sourceIndex <span style="color: #008000;">=</span> x <span style="color: #008000;">+</span> y <span style="color: #008000;">*</span> source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">switch</span> <span style="color: #008000;">&#40;</span>angle<span style="color: #008000;">&#41;</span> <span style="color: #008080;">#2</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">90</span><span style="color: #008000;">:</span>
                    targetIndex <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelHeight</span> <span style="color: #008000;">-</span> y <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span> 
                        <span style="color: #008000;">+</span> x <span style="color: #008000;">*</span> target<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span><span style="color: #008000;">;</span>
                    <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">180</span><span style="color: #008000;">:</span>  
                    targetIndex <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span> <span style="color: #008000;">-</span> x <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span> 
                        <span style="color: #008000;">+</span> <span style="color: #008000;">&#40;</span>source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelHeight</span> <span style="color: #008000;">-</span> y <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">*</span> source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span><span style="color: #008000;">;</span>
                    <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">270</span><span style="color: #008000;">:</span>  
                    targetIndex <span style="color: #008000;">=</span> y <span style="color: #008000;">+</span> <span style="color: #008000;">&#40;</span>source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span> <span style="color: #008000;">-</span> x <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span> 
                        <span style="color: #008000;">*</span> target<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span><span style="color: #008000;">;</span>
                    <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            target<span style="color: #008000;">.</span><span style="color: #0000FF;">Pixels</span><span style="color: #008000;">&#91;</span>targetIndex<span style="color: #008000;">&#93;</span> <span style="color: #008000;">=</span> source<span style="color: #008000;">.</span><span style="color: #0000FF;">Pixels</span><span style="color: #008000;">&#91;</span>sourceIndex<span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span> <span style="color: #008080;">#3</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">return</span> target<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>#1 Creates an empty bitmap<br />
#2 Determines target location<br />
#3 Copies pixels</p>
<p>The RotateBitmap method accepts four parameters which are the source bitmap, the width and height of the new bitmap and the angle the bitmap should be rotated. The method starts off creating a new WriteableBitmap with the specified width and height (#1). We loop through each pixel in the source bitmap, calculating the index of the source pixel and the index in the target bitmap where we will copy the pixel. Depending on the rotation angle (#2), we calculate the target index using one of three different expressions. Finally, we copy the pixel (#3) from the source bitmap to the target bitmap.</p>
<p><strong>Note:</strong> If you would like more information about WriteableBitmap, please read the <a href="http://msdn.microsoft.com/library/system.windows.media.imaging.writeablebitmap(VS.95).aspx">MSDN documentation for Silverlight&#8217;s version of WriteableBitmap</a>. </p>
<p>RotateBitmap accepts a WriteableBitmap. The CameraOperationCompletedEventArgs passed to the camera_CaptureCompleted method provides a Stream. Currently, the camera_CaptureCompleted method uses DecodeJpeg to convert the stream to a WriteableBitmap. Let&#8217;s wrap the call to the DecodeJpeg and RotateBitmap methods in a new DecodeImage method. The code for the new method is shown in listing 4.</p>
<p><strong>Listing 4 Decoding the image stream</strong></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> WriteableBitmap DecodeImage<span style="color: #008000;">&#40;</span>Stream imageStream, <span style="color: #6666cc; font-weight: bold;">int</span> angle<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    WriteableBitmap source <span style="color: #008000;">=</span> PictureDecoder<span style="color: #008000;">.</span><span style="color: #0000FF;">DecodeJpeg</span><span style="color: #008000;">&#40;</span>imageStream<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> 
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">switch</span><span style="color: #008000;">&#40;</span>angle<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">90</span><span style="color: #008000;">:</span> 
        <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">270</span><span style="color: #008000;">:</span> 
            <span style="color: #0600FF; font-weight: bold;">return</span> RotateBitmap<span style="color: #008000;">&#40;</span>source, source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelHeight</span>, <span style="color: #008080;">#1</span>
                source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span>, angle<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>                  <span style="color: #008080;">#1</span>
        <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">180</span><span style="color: #008000;">:</span> 
            <span style="color: #0600FF; font-weight: bold;">return</span> RotateBitmap<span style="color: #008000;">&#40;</span>source, source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelWidth</span>, 
                source<span style="color: #008000;">.</span><span style="color: #0000FF;">PixelHeight</span>, angle<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">default</span><span style="color: #008000;">:</span>
            <span style="color: #0600FF; font-weight: bold;">return</span> source<span style="color: #008000;">;</span>  <span style="color: #008080;">#2</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>#1 Swaps width and height<br />
#2 Skips RotateBitmap</p>
<p>The new DecodeImage class accepts an image stream and the rotation angle. The first step is to convert the image stream into a WriteableBitmap using the PictureDecoder helper class. Next we examine the degree of rotation, calling RotateBitmap if necessary. When we are rotating the image by 90 or 270 degrees, we are swapping the width and height (#1). When the angle is 0, we do not call RotateBitmap (#1).</p>
<p>With the new GetAngleFromExif and DecodeImage methods in place, we can update the chooserTask_Completed method to rotate the captured photos. In the completed event handler, replace the call to PictureDecoder.DecodeJpeg with the following snippet.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #6666cc; font-weight: bold;">int</span> angle <span style="color: #008000;">=</span> GetAngleFromExif<span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">ChosenPhoto</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
currentImage <span style="color: #008000;">=</span> DecodeImage<span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">ChosenPhoto</span>, angle<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p><strong>Summary</strong></p>
<p>You now have a good understanding of how PhotoChooserTask and CameraCaptureTask work. You have also learned how to handle the picture orientation. These chooser tasks are useful when choosing a picture is a secondary feature of your application. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2012/02/28/windows-phone-7-working-with-camera-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nightly news, 17 February 2012</title>
		<link>http://www.mindscapehq.com/blog/index.php/2012/02/16/nightly-news-17-february-2012/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2012/02/16/nightly-news-17-february-2012/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 20:37:52 +0000</pubDate>
		<dc:creator>Ivan Towlson</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[NHibernate Designer]]></category>
		<category><![CDATA[Nightly news]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Silverlight Elements]]></category>
		<category><![CDATA[Web Workbench]]></category>
		<category><![CDATA[WPF Elements]]></category>
		<category><![CDATA[Nightly News]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=4569</guid>
		<description><![CDATA[Our major updates this week are some great financial and statistical charts for WPF, and Web Workbench 3.0, the latest release of our popular Visual Studio integration for Web productivity languages. WPF Elements Stock and candlestick charts Fixed a bug with StackedAreaSeries containing a large number of data points Fixed a bug in automatic LabelStep [...]]]></description>
				<content:encoded><![CDATA[<p>Our major updates this week are some great <a href="http://www.mindscapehq.com/blog/index.php/2012/02/14/wpf-elements-new-stock-charts/">financial and statistical charts</a> for WPF, and <a href="http://www.mindscapehq.com/blog/index.php/2012/02/15/web-workbench-3-0-released/">Web Workbench 3.0</a>, the latest release of our popular Visual Studio integration for Web productivity languages.</p>
<p><a href="http://bibliodyssey.blogspot.co.nz/2008/04/channelling-martian-maps.html"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/02/DeveloperNotes2.png" alt="" title="One for the narrowboat fans" width="344" height="64" class="alignleft size-full wp-image-4570" /></a></p>
<p><strong>WPF Elements</strong></p>
<ul>
<li><a href="http://www.mindscapehq.com/blog/index.php/2012/02/14/wpf-elements-new-stock-charts/">Stock and candlestick charts</a></li>
<li>Fixed a bug with StackedAreaSeries containing a large number of data points</li>
<li>Fixed a bug in automatic LabelStep calculation</li>
<li>Fixed some issues with the DualSlider generic style</li>
</ul>
<p><strong>Silverlight Elements</strong></p>
<ul>
<li>Added control over data sampling for very large charts</li>
</ul>
<p>LightSpeed</p>
<ul>
<li>Fix for unbinding nullables</li>
</ul>
<p><strong>Phone Elements</strong></p>
<ul>
<li>Added SelectedLoopingListBoxItem and ItemContainerStyle properties to the LoopingListBox control</li>
</ul>
<p><strong>NHibernate Designer</strong></p>
<ul>
<li>You can now drag views on from Server Explorer</li>
</ul>
<p><strong>Web Workbench</strong></p>
<p>In addition to the major changes discussed in the <a href="http://www.mindscapehq.com/blog/index.php/2012/02/15/web-workbench-3-0-released/">release announcement</a>, there are a few smaller fixes and enhancements:</p>
<ul>
<li>Fix for error on !default directive</li>
<li>Support for @page directive</li>
<li>For Chirpy users we now provide guidance on how to configure Chirpy to allow Web Workbench to work with Less files</li>
</ul>
<p>As always the <a href="http://www.mindscapehq.com/downloads/">free editions are available on the downloads page</a> and you can <a href="http://www.mindscapehq.com/store/myaccount">get the full editions from the store</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2012/02/16/nightly-news-17-february-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kick start 2012 with this special offer!</title>
		<link>http://www.mindscapehq.com/blog/index.php/2012/01/12/kick-start-2012-with-this-special-offer/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2012/01/12/kick-start-2012-with-this-special-offer/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 08:36:04 +0000</pubDate>
		<dc:creator>John-Daniel Trask</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[MegaPack]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[NHibernate Designer]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Silverlight Elements]]></category>
		<category><![CDATA[SimpleDB Management Tools]]></category>
		<category><![CDATA[Web Workbench]]></category>
		<category><![CDATA[WPF Diagrams]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=4262</guid>
		<description><![CDATA[Make building better software your New Year&#8217;s resolution by taking advantage of our 30% sale on the Mega Pack. For a limited time, pay only $699 and you&#8217;ll receive: LightSpeed O/R Mapper (normally $349) WPF Elements (normally $699) WPF Diagrams (normally $699) Silverlight Elements (normally $699) Phone Elements for WP7 (normally $299) NHibernate Designer (normally [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.mindscapehq.com/productive-2012"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2012/01/JanuarySaleBlogImage.jpg" alt="Get 9 products for an amazing price" title="Get 9 products for an amazing price" width="718" height="450" class="alignnone size-full wp-image-4263" /></a></p>
<p>Make building better software your New Year&#8217;s resolution by <a href="http://www.mindscapehq.com/productive-2012">taking advantage of our 30% sale on the Mega Pack</a>.</p>
<p>For a limited time, pay only $699 and you&#8217;ll receive:</p>
<ul>
<li><a href="http://www.mindscapehq.com/products/lightspeed">LightSpeed O/R Mapper</a> <span style="color: rgb(192, 192, 192); ">(normally $349)</span></li>
<li><a href="http://www.mindscapehq.com/products/wpfelements">WPF Elements</a> <span style="color: rgb(192, 192, 192); ">(normally $699)</span></li>
<li><a href="http://www.mindscapehq.com/products/wpfdiagrams">WPF Diagrams</a> <span style="color: rgb(192, 192, 192); ">(normally $699)</span></li>
<li><a href="http://www.mindscapehq.com/products/silverlightelements">Silverlight Elements</a> <span style="color: rgb(192, 192, 192); ">(normally $699)</span></li>
<li><a href="http://www.mindscapehq.com/products/phone-elements">Phone Elements for WP7</a> <span style="color: rgb(192, 192, 192); ">(normally $299)</span></li>
<li><a href="http://www.mindscapehq.com/products/nhdesigner">NHibernate Designer</a> <span style="color: rgb(192, 192, 192); ">(normally $99)</span></li>
<li><a href="http://www.mindscapehq.com/products/simpledbtools">SimpleDB Management Tools</a> <span style="color: rgb(192, 192, 192); ">(normally $29)</span></span></li>
<li><a href="http://www.mindscapehq.com/products/web-workbench">Web Workbench</a> <span style="color: rgb(192, 192, 192); ">(normally $29)</span></li>
<li><a href="http://www.mindscapehq.com/products/sharepointtools">Visual Tools for SharePoint</a> <span style="color: rgb(192, 192, 192); ">(normally $349)</span></li>
</ul>
<p>Plus, you also get:</p>
<ul>
<li>12 months of new releases, nightly builds and new products!</li>
<li>The best support in the business!</li>
</ul>
<p>Imagine that &#8211; a full range of developer tools across WPF, Silverlight, Windows Phone, Data Access, Web Development and Domain Modeling for just $699!</p>
<p>So, save thousands of dollars by getting all your tools at once with our 30% off Mega Pack Special now.</p>
<p>Hurry, promotion ends 1 Feb 2012!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2012/01/12/kick-start-2012-with-this-special-offer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nightly news, 7 October 2011</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/10/06/nightly-news-7-october-2011/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/10/06/nightly-news-7-october-2011/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 20:52:54 +0000</pubDate>
		<dc:creator>Ivan Towlson</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[NHibernate Designer]]></category>
		<category><![CDATA[Nightly news]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[WPF Diagrams]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3834</guid>
		<description><![CDATA[Machine rebuild time here at Mindscape HQ, and very disappointed to learn that JD did not christen the rebuilt box &#8220;Mungo the Computational.&#8221; But he did go to the trouble of giving me a Steve Bell penguin for my user image, so all is forgiven. Fortunately, in between relaxing in front of the Windows 7 [...]]]></description>
				<content:encoded><![CDATA[<p>Machine rebuild time here at Mindscape HQ, and very disappointed to learn that JD did not christen the rebuilt box &#8220;Mungo the Computational.&#8221;  But he did go to the trouble of giving me a Steve Bell penguin for my user image, so all is forgiven.  Fortunately, in between relaxing in front of the Windows 7 setup screen, we&#8217;ve also shipped a bunch of updates in the latest nightly builds.  Here&#8217;s what&#8217;s new this week.</p>
<p><a href="http://blogs.discovermagazine.com/cosmicvariance/2009/10/09/the-dark-energy-song/"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/10/DeveloperNotes.png" alt="" title="We need one of these for WinRT development" width="344" height="64" class="alignleft size-full wp-image-3835" /></a></p>
<p><strong>LightSpeed</strong></p>
<ul>
<li>Some fixes around ordering across associations</li>
<li>Added support for calculation/aggregation operators over subqueries</li>
<li>Improvements to the LINQ Count() operator over projection subqueries</li>
<li>The designer defaults policy can now override the defaults for generating DataMember attributes on associations</li>
<li>Fix for associations not respecting DependentAttribute if the foreign key was a string</li>
<li>Fix for value objects in derived entities not being materialised if using FindBySql or a stored procedure, and the inheritance model was class table inheritance, and the query was through the base class</li>
</ul>
<p><strong>WPF Diagrams</strong></p>
<ul>
<li>Added hooks for customising marquee selection behaviour</li>
</ul>
<p><strong>WPF Elements</strong></p>
<ul>
<li>Automatic label step calculation for Y axes</li>
</ul>
<p><strong>Phone Elements</strong></p>
<ul>
<li>Landscape support for the palette colour picker</li>
</ul>
<p><strong>NHibernate Designer</strong></p>
<ul>
<li>Option to suppress association properties in generated code</li>
</ul>
<p>Nightly builds of <a href="http://www.mindscapehq.com/downloads/">free products are available on the Downloads page</a>; for retail editions you can <a href="http://www.mindscapehq.com/store/myaccount">get them from the store</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/10/06/nightly-news-7-october-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nightly news, 2 September 2011</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/09/01/nightly-news-2-september-2011/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/09/01/nightly-news-2-september-2011/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 20:36:50 +0000</pubDate>
		<dc:creator>Ivan Towlson</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[Nightly news]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Web Workbench]]></category>
		<category><![CDATA[WPF Diagrams]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3709</guid>
		<description><![CDATA[Two weeks of nightly updates to catch up on today, thanks to TechEd, so let&#8217;s get stuck in. Here&#8217;s what you&#8217;ll find in the latest hot builds. WPF Diagrams DiagramToolBox support for scroll bar visibility attached properties Node tool drag sizing is now cancelled if the user doesn&#8217;t click on the diagram surface You can [...]]]></description>
				<content:encoded><![CDATA[<p>Two weeks of nightly updates to catch up on today, thanks to TechEd, so let&#8217;s get stuck in.  Here&#8217;s what you&#8217;ll find in the latest hot builds.</p>
<p><a href="http://medievalmap.harvard.edu/icb/icb.do?keyword=k40248&#038;pageid=icb.page188868"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/08/DeveloperNotes21.png" alt="" title="It&#039;s been a historiffic kind of a week really" width="344" height="64" class="alignleft size-full wp-image-3710" /></a></p>
<p><strong>WPF Diagrams</strong></p>
<ul>
<li>DiagramToolBox support for scroll bar visibility attached properties</li>
<li>Node tool drag sizing is now cancelled if the user doesn&#8217;t click on the diagram surface</li>
<li>You can now control the heuristic function used by the A* pathfinder</li>
<li>New sample: custom shapes</li>
<li>Added an IsDragResizeEnabled property for enabling or disabling drag-sizing when using a charged cursor to create new node</li>
</ul>
<p><strong>LightSpeed</strong></p>
<ul>
<li>Fix for a spurious discriminator warning if a STI root class derived from another class using concrete table inheritance</li>
<li>We&#8217;ve relaxed the warnings for discriminators on abstract classes</li>
<li>Improved error if you set an entity to be its own direct parent.  &#8220;Doctor, it hurts when I do this.&#8221;</li>
<li>If you drag from Server Explorer and you haven&#8217;t saved your password, we&#8217;ll now try to detect this and remind you</li>
<li>Fix for error in certain grouping queries with joins</li>
<li>Email validator now accepts the &#8216;+&#8217; character in addresses</li>
<li>Improvements to find by identifier in DistributedUnitOfWork</li>
</ul>
<p><strong>Phone Elements</strong></p>
<ul>
<li>Support for styling alternate Y axes</li>
</ul>
<p><strong>WPF Elements</strong></p>
<ul>
<li>Fixed a property grid bug with keyboard navigation on expanded nodes</li>
</ul>
<p><strong>Web Workbench</strong></p>
<ul>
<li>Fixed a couple more cases where we were indicating syntax errors on correct CSS</li>
</ul>
<p><a href="http://www.mindscapehq.com/downloads/">Free editions of the nightly builds are on the downloads page</a>, and <a href="http://www.mindscapehq.com/store/myaccount">full editions are in the store</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/09/01/nightly-news-2-september-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nightly news, 19 August 2011</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/08/18/nightly-news-19-august-2011/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/08/18/nightly-news-19-august-2011/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 21:31:49 +0000</pubDate>
		<dc:creator>Ivan Towlson</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[Nightly news]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Silverlight Elements]]></category>
		<category><![CDATA[WPF Diagrams]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3667</guid>
		<description><![CDATA[I hereby declare this to be snow week, the funnest week in the history of Wellington. Oh hush, you northern hemisphere types, we only see snow here in tropical Wellington every fifty years or so. Indulge us. Here&#8217;s what we&#8217;ve been doing while we&#8217;ve been snowed in. LightSpeed Compiled queries! Yay! Fix for an error [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.anvari.org/fortune/The_Simpsons/40698_i-hereby-declare-this-day-to-be-snow-day-the-funnest-day-in-the-history-of-springfield.html">I hereby declare this to be snow week, the funnest week in the history of Wellington.</a>  Oh hush, you northern hemisphere types, we only see snow here in tropical Wellington every fifty years or so.  Indulge us.  Here&#8217;s what we&#8217;ve been doing while we&#8217;ve been snowed in.</p>
<p><a href="http://www.stuff.co.nz/life-style/5468497/Cuba-Mall-snow-video-takes-on-life-of-its-own"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/08/DeveloperNotes2.png" alt="" title="But now there is some weird green stuff in my paddock and I don&#039;t know what to do about it" width="344" height="64" class="alignleft size-full wp-image-3668" /></a></p>
<p><strong>LightSpeed</strong></p>
<ul>
<li><a href="http://www.mindscapehq.com/blog/index.php/2011/08/16/compiled-queries-for-lightspeed/">Compiled queries!</a>  Yay!</li>
<li>Fix for an error when projecting only base class fields while filtering only on derived class fields in class table inheritance</li>
<li>Fix for a class table inheritance cascade delete issue</li>
<li>Fixed a column mapping issue with unversioned partial updates</li>
<li>Fix for BeginEdit on a distributed entity</li>
</ul>
<p><strong>WPF Diagrams</strong></p>
<ul>
<li><a href="http://www.mindscapehq.com/blog/index.php/2011/08/17/wpf-diagrams-a-connection-pathfinder/">Performance and functionality improvements to the A* pathfinder</a></li>
<li>Added an option for marquee selection to select when the marquee intersects a node rather than only when it wholly contains a node</li>
</ul>
<p><strong>WPF Elements</strong></p>
<ul>
<li>Fixed an error when typing non-Latin characters into a numeric text box</li>
<li>Fixed an issue where the minimum and maximum values of an alternate Y axis could not be set automatically</li>
</ul>
<p><strong>Phone Elements</strong></p>
<ul>
<li>Fixed an issue where the minimum and maximum values of an alternate Y axis could not be set automatically</li>
<li>Fixed a font sizing issue with the picker controls</li>
</ul>
<p><strong>Silverlight Elements</strong></p>
<ul>
<li>Fixed an issue where the minimum and maximum values of an alternate Y axis could not be set automatically.  Coincidentally enough</li>
</ul>
<p>All these features and fixes are in the current nightly builds.  <a href="http://www.mindscapehq.com/downloads/">Free editions are available from the downloads page</a>, and <a href="http://www.mindscapehq.com/store/myaccount">full editions from the store</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/08/18/nightly-news-19-august-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New versions of WPF Elements, Silverlight Elements, Phone Elements!</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/07/29/new-versions-of-wpf-elements-silverlight-elements-phone-elements/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/07/29/new-versions-of-wpf-elements-silverlight-elements-phone-elements/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 09:21:27 +0000</pubDate>
		<dc:creator>John-Daniel Trask</dc:creator>
				<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Silverlight Elements]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3350</guid>
		<description><![CDATA[We&#8217;re pleased to announce a trio of releases: WPF Elements 4.1, Silverlight Elements 2.1 and Phone Elements 1.1! This point release occurs at the same time as it represents primarily the addition of new charting types across the product line and the sharing of performance improvements across them all. There is also a roll up [...]]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re pleased to announce a trio of releases: <a href="http://www.mindscapehq.com/products/wpfelements/whats-new">WPF Elements 4.1</a>, <a href="http://www.mindscapehq.com/products/silverlightelements/whats-new">Silverlight Elements 2.1</a> and <a href="http://www.mindscapehq.com/products/phone-elements/whats-new">Phone Elements 1.1</a>!</p>
<p>This point release occurs at the same time as it represents primarily the addition of new charting types across the product line and the sharing of performance improvements across them all. There is also a roll up of individual product improvements in each product as well.</p>
<p><strong>What&#8217;s new in all three products?</strong></p>
<ul>
<li>Polar charts including rose charts, radar charts and polar scatter/bubble charts</li>
<li>Additional events for interactive chart usage (e.g. DataSeries.SelectedDataPointChanged)</li>
<li>Added ChartAxis.MinimumRange, TitleVisibility and LabelStep properties</li>
<li>DataSeries.Visibility can be used to collapse a series on the chart</li>
<li>Additional performance improvements</li>
</ul>
<p>We have also rolled up a number of general enhancements &#8211; for example basic image support in the Silverlight Rich Text Editor, improved keyboard navigation in the Book and Coverflow controls and new colour palettes for WPF and Silverlight. </p>
<p>This brings the number of overall controls to 45+ for WPF Elements, 40+ for Silverlight Elements and 30+ for Phone Elements. If you haven&#8217;t tried these products before but want to create amazing user experiences <a href="http://www.mindscapehq.com/downloads/">you can download the trials free from the download page</a>. Customers already have the latest builds available <a href="http://www.mindscapehq.com/store/myaccount">on their account pages</a>.</p>
<p>To whet your appetite, here&#8217;s an example application built using WPF Elements charting:</p>
<div class="boximage leftfloated">
<div class="boximageTop"><span>&nbsp;</span></div>
<div class="boximageContent"><a><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/07/PipperCatering_Full.png" alt="WPF Dashboard built with WPF Elements" title="WPF Dashboard built with WPF Elements" width="692" height="400" class="alignnone size-full wp-image-3584" /></a></div>
<div class="boximageBottom"><span>&nbsp;</span></div>
</div>
<p>We would, as always, <a href="http://www.mindscapehq.com/forums/">love to hear your feedback</a> on what&#8217;s new and what you&#8217;d like to see in the future. </p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/07/29/new-versions-of-wpf-elements-silverlight-elements-phone-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mindscape Phone Elements and Mango</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/07/03/mindscape-phone-elements-and-mango/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/07/03/mindscape-phone-elements-and-mango/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 04:11:55 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Phone Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3433</guid>
		<description><![CDATA[A while back we released Phone Elements, a suite of controls for Windows Phone 7 containing a wide range of charts and other useful controls. Now that Microsoft have unveiled the latest &#8216;Mango&#8217; version of Windows Phone 7, we&#8217;ve been asked if Phone Elements will work with Mango. The answer is yes. We&#8217;ve tested our [...]]]></description>
				<content:encoded><![CDATA[<p>A while back we released <a href="http://www.mindscapehq.com/products/phone-elements">Phone Elements</a>, a suite of controls for Windows Phone 7 containing a wide range of charts and other useful controls.</p>
<p>Now that Microsoft have unveiled the latest &#8216;Mango&#8217; version of Windows Phone 7, we&#8217;ve been asked if Phone Elements will work with Mango. The answer is yes. We&#8217;ve tested our controls with the Mango pre-release, and all the controls work happily as you would expect. You won&#8217;t need to make any changes or download any updates.</p>
<p>Just to remind you, here&#8217;s a taste of all the cool stuff in Phone Elements.</p>
<p><a href="http://www.mindscapehq.com/blog/index.php/2011/07/03/mindscape-phone-elements-and-mango/phonecontrols1/" rel="attachment wp-att-3434"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/07/PhoneControls1.png" alt="Phone Elements" title="Phone Elements" width="718" height="791" class="alignnone size-full wp-image-3434" /></a></p>
<p>Get your Mango on &#8212; <a href="http://www.mindscapehq.com/products/phone-elements/download">download the trial today</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/07/03/mindscape-phone-elements-and-mango/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phone Elements: Radial gauge control</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/06/13/phone-elements-radial-gauge-control/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/06/13/phone-elements-radial-gauge-control/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 01:32:16 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Phone Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3354</guid>
		<description><![CDATA[One of the controls you will find in the latest builds of our Phone Elements control suite for WP7 is the radial gauge. Gauges are great for displaying current values within a specified range to the user. Radial gauges in particular could be used to display speed, acceleration, time, pressure and any thing else you [...]]]></description>
				<content:encoded><![CDATA[<p>One of the controls you will find in the latest builds of our <a href="http://www.mindscapehq.com/products/phone-elements">Phone Elements</a> control suite for WP7 is the radial gauge. Gauges are great for displaying current values within a specified range to the user. Radial gauges in particular could be used to display speed, acceleration, time, pressure and any thing else you want. When changing the current value of the gauge, the needle moves using smooth animations to update the displayed value.</p>
<p>Using the radial gauge control in your applications is very simple. It extends from the RangeBase class so you just need to set the Minimum and Maximum values to specify the range, and use a binding to set the Value property from your business model. Additionally, the StartAngle and SweepAngle properties can be used to customize how the labels get displayed. The StartAngle defines where the first label gets rendered. A value of 0 will display the first label at the top of the gauge. Larger values move around the gauge in a clockwise direction. The SweepAngle is the total angle of an arc that the labels will be positioned against. A value of 180 for example will display the labels around half a circle. Here is an example of setting up a radial gauge in XAML.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ms:RadialGauge</span> <span style="color: #000066;">Maximum</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">StartAngle</span>=<span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">SweepAngle</span>=<span style="color: #ff0000;">&quot;270&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p><strong>Custom styling</strong></p>
<p><a href="http://www.mindscapehq.com/blog/index.php/2011/06/13/phone-elements-radial-gauge-control/wp7gauge3/" rel="attachment wp-att-3355"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/06/WP7Gauge3.png" alt="Custom radial gauge style" title="Custom radial gauge style" width="297" height="297" class="alignnone size-full wp-image-3355" /></a></p>
<p>Like all controls in Phone Elements, the radial gauge can be styled in all sorts of different ways to make your applications sparkle. From nice looking styles that follow the Metro guidelines, to shiny styles with smooth gradient paints. Here is some example code used to create the style seen above.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearGradientBrush</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RadialGaugeBackground&quot;</span> <span style="color: #000066;">StartPoint</span>=<span style="color: #ff0000;">&quot;0,0&quot;</span> <span style="color: #000066;">EndPoint</span>=<span style="color: #ff0000;">&quot;0,1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0.6&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#3A3A3A&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearGradientBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearGradientBrush</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;ShineBackground&quot;</span> <span style="color: #000066;">StartPoint</span>=<span style="color: #ff0000;">&quot;0,0&quot;</span> <span style="color: #000066;">EndPoint</span>=<span style="color: #ff0000;">&quot;0,1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#77FFFFFF&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#11EEEEEE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearGradientBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearGradientBrush</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RadialGaugeBorder&quot;</span> <span style="color: #000066;">StartPoint</span>=<span style="color: #ff0000;">&quot;0,0&quot;</span> <span style="color: #000066;">EndPoint</span>=<span style="color: #ff0000;">&quot;0,1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#FBFBFB&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#363636&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearGradientBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearGradientBrush</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RadialGaugeInnerBorder&quot;</span> <span style="color: #000066;">StartPoint</span>=<span style="color: #ff0000;">&quot;0,0&quot;</span> <span style="color: #000066;">EndPoint</span>=<span style="color: #ff0000;">&quot;0,1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#363636&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#FBFBFB&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearGradientBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RadialGaugeStyle&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ms:RadialGauge&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ms:AnimatedValueDisplay&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{StaticResource RadialGaugeBorder}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{StaticResource RadialGaugeInnerBorder}&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;5&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{StaticResource RadialGaugeBackground}&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;PART_Arc&quot;</span> <span style="color: #000066;">Stroke</span>=<span style="color: #ff0000;">&quot;White&quot;</span> <span style="color: #000066;">StrokeThickness</span>=<span style="color: #ff0000;">&quot;8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;PART_LabelsHost&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl.ItemsPanel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsPanelTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ItemsPanelTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ItemsControl.ItemsPanel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ItemsControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;PART_Needle&quot;</span> <span style="color: #000066;">Data</span>=<span style="color: #ff0000;">&quot;M 0.5 0 L 1 1 L 0 1 Z&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;#C21218&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Fill&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;40,-8,40,-20&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{StaticResource ShineBackground}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;#C21218&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>If you need any help with creating custom styles for any of the controls in <a href="http://www.mindscapehq.com/products/phone-elements">Phone Elements</a>, then let us know by leaving a comment on this blog post, or <a href="http://www.mindscapehq.com/forums/Forum.aspx?ForumID=27">come visit the forum</a> and we&#8217;ll help you out. You can also let us know of any features you would like to see in the gauge control and we&#8217;ll see what we can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/06/13/phone-elements-radial-gauge-control/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nightly news, 10 June 2011</title>
		<link>http://www.mindscapehq.com/blog/index.php/2011/06/09/nightly-news-10-june-2011/</link>
		<comments>http://www.mindscapehq.com/blog/index.php/2011/06/09/nightly-news-10-june-2011/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:18:42 +0000</pubDate>
		<dc:creator>Ivan Towlson</dc:creator>
				<category><![CDATA[LightSpeed]]></category>
		<category><![CDATA[Nightly news]]></category>
		<category><![CDATA[Phone Elements]]></category>
		<category><![CDATA[Silverlight Elements]]></category>
		<category><![CDATA[WPF Diagrams]]></category>
		<category><![CDATA[WPF Elements]]></category>

		<guid isPermaLink="false">http://www.mindscapehq.com/blog/?p=3344</guid>
		<description><![CDATA[Short week down here (gawd bless yer, ma&#8217;am), so short blurb to introduce a short list of the fixes and features in this week&#8217;s nightly builds. Usual rules apply: free and trial versions from the downloads page, retail editions from the store. Enjoy! LightSpeed Fix for nulling a foreign key not removing the entity from [...]]]></description>
				<content:encoded><![CDATA[<p>Short week down here (gawd bless yer, ma&#8217;am), so short blurb to introduce a short list of the fixes and features in this week&#8217;s nightly builds.  Usual rules apply: <a href="http://www.mindscapehq.com/downloads">free and trial versions from the downloads page</a>, <a href="http://www.mindscapehq.com/store/myaccount">retail editions from the store</a>.  Enjoy!</p>
<p><a href="http://www.theregister.co.uk/2011/06/01/verity_stob_english_upgrade/"><img src="http://www.mindscapehq.com/blog/wp-content/uploads/2011/06/DeveloperNotes.png" alt="" title="Of course, some people just leave it as &#039;heirarchy&#039;" width="344" height="64" class="alignleft size-full wp-image-3345" /></a></p>
<p><strong>LightSpeed</strong></p>
<ul>
<li>Fix for nulling a foreign key not removing the entity from the parent&#8217;s children collection</li>
<li>Fix for changes not being tracked when nulling a one-to-one association</li>
<li>Fix for order by&#8217;s not being aliased correctly when there is a sequence numbering alias applied because a parent instance of a table is in scope.</li>
<li>Fix for association change tracking not being reset during SaveChanges</li>
<li>Added option flag for removing deleted entities from the unit of work after the delete has been committed</li>
<li>You can now specify the same grouping key multiple times with different functions applied to it</li>
</ul>
<p><strong>WPF Elements</strong></p>
<ul>
<li>Fix for a possible negative width error in rose charts</li>
</ul>
<p><strong>Silverlight Elements</strong></p>
<ul>
<li>Fix for a possible negative width error in rose charts</li>
</ul>
<p><strong>Phone Elements</strong></p>
<ul>
<li>Fix for a possible negative width error in rose charts.  (Did you guess?)</li>
</ul>
<p><strong>WPF Diagrams</strong></p>
<ul>
<li>SelectedElementsChanged was not always being raised when using marquee select</li>
<li>Fix for XML serialisation in cultures that use a different numeric format from the invariant culture</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.mindscapehq.com/blog/index.php/2011/06/09/nightly-news-10-june-2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic (Requested URI is rejected)
Database Caching 13/24 queries in 0.016 seconds using disk: basic

 Served from: www.mindscapehq.com @ 2013-05-22 08:09:12 by W3 Total Cache -->