<?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>eugenedotnet blog</title>
	<atom:link href="http://www.eugenedotnet.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eugenedotnet.com</link>
	<description>The Personal Blog of Jevgeni Tšaikin</description>
	<lastBuildDate>Thu, 19 Jan 2012 13:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Displaying image inside Panorama Title in Windows Phone applications</title>
		<link>http://www.eugenedotnet.com/2011/12/displaying-image-inside-panorama-title-in-windows-phone-applications/</link>
		<comments>http://www.eugenedotnet.com/2011/12/displaying-image-inside-panorama-title-in-windows-phone-applications/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 14:17:42 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=1073</guid>
		<description><![CDATA[Although it might seem too obvious, but still many developers and designers forget that top-margin should be equal to 80 for the content inside Panorama Title(in my example bellow Margin=&#8221;0,80,0,0&#8243; for Grid element). Bellow is the XAML markup that you &#8230; <a href="http://www.eugenedotnet.com/2011/12/displaying-image-inside-panorama-title-in-windows-phone-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Although it might seem too obvious, but still many developers and designers forget that top-margin should be equal to 80 for the content inside Panorama Title(in my example bellow Margin=&#8221;0,80,0,0&#8243; for Grid element). Bellow is the XAML markup that you might use to display an image inside Panorama Title in Windows Phone applications.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;controls:Panorama&gt;
    &lt;controls:Panorama.Title&gt;
        &lt;Grid Margin=&quot;0,80,0,0&quot;&gt;
            &lt;Image Source=&quot;{StaticResource ApplicationLogo}&quot;
                    HorizontalAlignment=&quot;Left&quot;
                    Width=&quot;400&quot; Height=&quot;50&quot; /&gt;
        &lt;/Grid&gt;
    &lt;/controls:Panorama.Title&gt;
        ...
&lt;/controls:Panorama&gt;
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/04/property-change-notification-for-windows-phone-7/" rel="bookmark" class="crp_title">W05: Property Change Notification for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w06-microsoft-tag-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W06: Microsoft Tag application for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/08/twitter-search-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W09: Twitter Search application for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/" rel="bookmark" class="crp_title">QA: Changing the Border color of Grid element in Silverlight and Windows Phone</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/12/displaying-image-inside-panorama-title-in-windows-phone-applications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Post-event summary of Windows Phone CodeCamp in Latvia</title>
		<link>http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/</link>
		<comments>http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 12:36:45 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[mentoring]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[speech]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=1058</guid>
		<description><![CDATA[Another great Windows Phone code camp took place on a weekend (between 3rd and 4th of December, 2011) and this time in the lovely capital of Latvia: Riga. Once again there were many talented developers, designers, managers and mentors, who &#8230; <a href="http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another great Windows Phone code camp took place on a weekend (between 3rd and 4th of December, 2011) and this time in the lovely capital of Latvia: Riga. Once again there were many talented developers, designers, managers and mentors, who in cooperation have produced initial versions of 9 amazing Windows Phone applications, such as Latvian Name Days, 3 modifications of Alphabet ninja, Rain Radar for Baltic region, Public transport information for Riga, etc. <b>&#8220;Public transport information for Riga&#8221;</b> application have received more scores than others and announced as a winner although other applications were also very impressive. I hope that all of them will reach the marketplace in a very near future.</p>
<p><a href="http://www.eugenedotnet.com/wp-content/uploads/2011/12/wp_codecamp_riga_2011_3.jpg"><img src="http://www.eugenedotnet.com/wp-content/uploads/2011/12/wp_codecamp_riga_2011_3.jpg" alt="" title="Jevgeni Tsaikin at Windows Phone CodeCamp in Latvia 2011" width="600" height="450" class="alignleft size-full wp-image-1062" /></a></p>
<p>Once again I have played two roles: speaker and mentor. This time I have learned even more than I did during the <a href="/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/">Windows Phone CodeCamp in Estonia</a>, because this time most of the applications were using latest Mango features and were more technically complex. Many applications have used different types of Push Notifications. Some have used socket programming, video brushes for barcode readings, XNA, SQL CE for data storing and many many more interesting features. I must admit that developers in Riga are very skilled, even younger students have shown amazing skills in programming.</p>
<p><a href="http://www.eugenedotnet.com/wp-content/uploads/2011/12/wp_codecamp_riga_2011_2.jpg"><img src="http://www.eugenedotnet.com/wp-content/uploads/2011/12/wp_codecamp_riga_2011_2.jpg" alt="" title="One of the teams at Windows Phone CodeCamp in Latvia 2011" width="600" height="450" class="alignleft size-full wp-image-1061" /></a></p>
<p>Thank you Microsoft, Agu, Jaana, Valdis, Andres, Latvian .NET User Group and all the participants for such a great event!<br />
<br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2011/02/baltic-mvp-summit-2011/" rel="bookmark" class="crp_title">Baltic MVP Summit 2011</a></li><li><a href="http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/" rel="bookmark" class="crp_title">Summer vacation is now officially over</a></li><li><a href="http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/" rel="bookmark" class="crp_title">Microsoft Most Valuable Professional in Device Application Development</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post-event summary of Windows Phone Code Camp in Estonia</title>
		<link>http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/</link>
		<comments>http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:03:35 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[codecamp]]></category>
		<category><![CDATA[Eneta]]></category>
		<category><![CDATA[estonia]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=1035</guid>
		<description><![CDATA[I suppose it&#8217;s about time for me to write a short post-event summary report of Windows Phone Code Camp where I have participated as a coach and lecturer. As a lecturer I have delivered two Windows Phone related speeches: first &#8230; <a href="http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I suppose it&#8217;s about time for me to write a short post-event summary report of <a href="/2011/11/windows-phone-code-camp-in-estonia/">Windows Phone Code Camp</a> where I have participated as a coach and lecturer. </p>
<p><a href="http://www.eugenedotnet.com/wp-content/uploads/2011/11/379868_10150469191970166_167196335165_10849133_312705596_n.jpg"><img src="http://www.eugenedotnet.com/wp-content/uploads/2011/11/379868_10150469191970166_167196335165_10849133_312705596_n.jpg" alt="" title="Jevgeni Tsaikin at Windows Phone CodeCamp in Estonia 2011" width="600" height="400" class="size-full wp-image-1041" /></a></p>
<p>As a lecturer I have delivered two Windows Phone related speeches: first one was about Sensors&#038;Location Services(covering topics like Accelerometer, Gyroscope, Compass, Motion, A-GPS) and second about Execution Model&#038;Storing Data.</p>
<p><a href="http://www.eugenedotnet.com/wp-content/uploads/2011/11/321529_10150469199115166_167196335165_10849189_311474642_n.jpg"><img src="http://www.eugenedotnet.com/wp-content/uploads/2011/11/321529_10150469199115166_167196335165_10849189_311474642_n.jpg" alt="" title="Windows Phone CodeCamp in Estonia 2011" width="600" height="400" class="size-full wp-image-1040" /></a> </p>
<p>Of course, coaching and mentoring were two of the most major challenges for this event. There were a lot of different questions, some of them were really tricky. For the first time in my life I have seen an application developed using Visual Basic.NET. That is definitely something you won&#8217;t see every day. Each of the teams have shown a strong passion for Windows Phone platform and bringing their unique ideas to life. Winner application (&#8220;Tee Info&#8221;, &#8220;Road Information&#8221;) was using Location Services(GPS) to calculate your current speed and displayed an alert in case you were approaching any of speed cameras on the road driving over the allowed speed limit.</p>
<p>I think that Code Camp was a huge success for our developer and Windows Phone community. I hope that each of the applications will reach the marketplace very soon. I would like to thank all the organizers, participants and fellow mentors for this great event!  </p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone CodeCamp in Latvia</a></li><li><a href="http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/" rel="bookmark" class="crp_title">Summer vacation is now officially over</a></li><li><a href="http://www.eugenedotnet.com/2011/02/baltic-mvp-summit-2011/" rel="bookmark" class="crp_title">Baltic MVP Summit 2011</a></li><li><a href="http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/" rel="bookmark" class="crp_title">Microsoft Most Valuable Professional in Device Application Development</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simulating GPS position changes using Reactive Extensions in Windows Phone environment</title>
		<link>http://www.eugenedotnet.com/2011/11/simulating-gps-position-changes-using-reactive-extensions-in-windows-phone-environment/</link>
		<comments>http://www.eugenedotnet.com/2011/11/simulating-gps-position-changes-using-reactive-extensions-in-windows-phone-environment/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 22:10:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[reactive extentions]]></category>
		<category><![CDATA[rx]]></category>
		<category><![CDATA[sensors]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=1025</guid>
		<description><![CDATA[It has become much easier to simulate GPS position change events having Location tool in Emulator, where you are able to pin positions on a map, but for some Unit Tests and mock services it is important to simulate GPS &#8230; <a href="http://www.eugenedotnet.com/2011/11/simulating-gps-position-changes-using-reactive-extensions-in-windows-phone-environment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It has become much easier to simulate GPS position change events having Location tool in Emulator, where you are able to pin positions on a map, but for some Unit Tests and mock services it is important to simulate GPS data programmatically. For this reason you would obviously use <a href="http://msdn.microsoft.com/en-us/data/gg577609">Reactive Extensions(Rx)</a>. Rx allows you to create Observable interface implementation based on Timer and attach it to position reading method. Bellow is the code I use to generate a GeoPosition with random Latitude and Longitude parameters. If isSimulation variable is set to true then simulation mode is activated, otherwise application uses standard GPS functionality.</p>
<pre class="brush: csharp; title: ; notranslate">
private readonly GeoCoordinateWatcher _gcw = new GeoCoordinateWatcher();

private readonly Random _random = new Random();

public GpsSamplePage()
{
    InitializeComponent();

    bool isSimulation = true;
    if (!isSimulation)
    {
        _gcw.PositionChanged += (s, e) =&gt; GcwPositionChanged(e);
        _gcw.Start();
    }
    else
    {
        Observable.Timer(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(4))
        .Select(x =&gt;
            new GeoPositionChangedEventArgs&lt;GeoCoordinate&gt;(
                new GeoPosition&lt;GeoCoordinate&gt;(DateTime.Now,
                    new GeoCoordinate()
                        {
                            // -90 &lt;= latitude &lt;= 90
                            Latitude = (_random.NextDouble() * 180.0) - 90.0,
                            // -180 &lt;= longitude &lt;= 180
                            Longitude = (_random.NextDouble() * 360.0) - 180.0
                        }

                ))).ObserveOnDispatcher().Subscribe(GcwPositionChanged);
    }
}

void GcwPositionChanged(GeoPositionChangedEventArgs&lt;GeoCoordinate&gt; e)
{
    Dispatcher.BeginInvoke(() =&gt;
    {
        // thread safe
        tbLatitude.Text = e.Position.Location.Latitude.ToString();
        tbLongitude.Text = e.Position.Location.Longitude.ToString();
    });
}
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/01/w15-displaying-subtitles-using-timeline-markers/" rel="bookmark" class="crp_title">W15: Displaying Subtitles using Timeline Markers in Windows Phone 7 media applications</a></li><li><a href="http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/" rel="bookmark" class="crp_title">IoC for Windows Phone: Ninject</a></li><li><a href="http://www.eugenedotnet.com/2010/09/w10-determining-license-mode-in-windows-phone-7-apps/" rel="bookmark" class="crp_title">W10: Determining license mode in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/" rel="bookmark" class="crp_title">Three properties that I use for almost every Windows Phone application</a></li><li><a href="http://www.eugenedotnet.com/2010/12/windows-phone-7-serialization-comparison/" rel="bookmark" class="crp_title">Windows Phone 7 Serialization: Comparison</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/11/simulating-gps-position-changes-using-reactive-extensions-in-windows-phone-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Injecting ViewModels to Views using a custom ViewModelLocator in Windows Phone</title>
		<link>http://www.eugenedotnet.com/2011/11/injecting-viewmodels-to-views-using-a-custom-viewmodellocator/</link>
		<comments>http://www.eugenedotnet.com/2011/11/injecting-viewmodels-to-views-using-a-custom-viewmodellocator/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 06:31:15 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[di]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[mvvm]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=1000</guid>
		<description><![CDATA[In one of my previous posts (IoC for Windows Phone: Ninject I have shown a simple IoC and DI tutorial using Ninject. In this tutorial will be based on previously developed code and extended that with a custom ViewModelLocator to &#8230; <a href="http://www.eugenedotnet.com/2011/11/injecting-viewmodels-to-views-using-a-custom-viewmodellocator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In one of my previous posts (<a href="/2011/10/ioc-for-windows-phone-ninject/">IoC for Windows Phone: Ninject</a> I have shown a simple IoC and DI tutorial using Ninject. In this tutorial will be based on previously developed code and extended that with a custom ViewModelLocator to bind ViewModels directly to Views. Hopefully, it will allow you to insert ViewModels with dependencies injected easier and faster for your Windows Phone or Silverlight applications.</p>
<p><span id="more-1000"></span><br />
As usually, without any introductions lets get directly to the development environment and to the previously created code. Before we begin, we need to remove one line of code from our View&#8217;s codebehind(constructor):</p>
<pre class="brush: csharp; title: ; notranslate">
DataContext = IoCContainter.Get&lt;NinjectSampleViewModel&gt;();
</pre>
<p><br/></p>
<h2>Creating a ViewModelLocator</h2>
<p>Now let&#8217;s create a very simple ViewModelLocator class and add it to our project. This class contains a method to return an instance of NinjectSampleViewModel from IoC Container with dependencies injected. </p>
<pre class="brush: csharp; title: ; notranslate">
public class ViewModelLocator
{
    public NinjectSampleViewModel NinjectSampleVm
    {
        get { return IoCContainter.Get&lt;NinjectSampleViewModel&gt;(); }
    }
}
</pre>
<p><br/></p>
<h2>Adding ViewModelLocator as an Application Resource</h2>
<p>Next step is to add this ViewModelLocator to the App.xaml as a Resource. It will give us an option to access it as a StaticResource from the Views. So add the following lines to App.xaml file:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Application.Resources&gt;
    &lt;EugeneDotnetIoCSamples:ViewModelLocator x:Key=&quot;ViewModelLocator&quot; /&gt;
&lt;/Application.Resources&gt;
</pre>
<p><br/></p>
<h2>Adjusting the View</h2>
<p>Finally, let&#8217;s open the View and modify that a little bit by adding the line bellow to <b>phone:PhoneApplicationPage</b> element:</p>
<pre class="brush: csharp; title: ; notranslate">
DataContext=&quot;{Binding NinjectSampleVm, Source={StaticResource ViewModelLocator}}&quot;
</pre>
<p><br/><br />
This line binds NinjectSampleVm to DataConext property of View using ViewModelLocator resource.</p>
<h2>Results</h2>
<p>The result should be similar to the result from the <a href="/2011/10/ioc-for-windows-phone-ninject/">previous tutorial</a>, but now the ViewModel is inserted via ViewModelLocator. I think this approach is suitable for a large application development, because it allows you to decouple ViewModel with dependencies injected to a single ViewModelLocator class to use it for testability(i.e Unit Tests). Also this approach significantly decreases the amount of code inside your application.</p>
<p>You can find the source code inside EugeneDotnetWPSamples.IoC Project inside EugeneDotnetWPSamples GitHub project:<br />
<a href="https://github.com/eugenedotnet/EugeneDotnetWPSamples"><br />
<img src="/edimages/logos/githublogo.png" alt="eugenedotnet github windows phone project" /><br />
</a><br />
<br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/" rel="bookmark" class="crp_title">IoC for Windows Phone: Ninject</a></li><li><a href="http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/" rel="bookmark" class="crp_title">Binding text containing tags to TextBlock inlines using attached property in Silverlight for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w07-windows-phone-7-application-bar/" rel="bookmark" class="crp_title">W07: Windows Phone 7 Application Bar</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/" rel="bookmark" class="crp_title">Passing values between Windows Phone 7 pages: Current context of Application</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/11/injecting-viewmodels-to-views-using-a-custom-viewmodellocator/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Windows Phone Code Camp in Estonia</title>
		<link>http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/</link>
		<comments>http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 15:35:04 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[codecamp]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=975</guid>
		<description><![CDATA[Anyone who has a passion for Windows Phone platform, mobile development is welcome to join me and other WP7 enthusiasts at Tallinna Polütehnikum(Tallinn, Estonia) for 2-day Code Camp on 19-20 Nov. You will have a chance to develop your own &#8230; <a href="http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.eneta.ee/sundmused/Lehed/wp-koodilaager.aspx"><img src="http://www.eugenedotnet.com/wp-content/uploads/2011/11/banner_WP_koodilaager.jpg" alt="" title="banner_WP_koodilaager" width="633" height="98" class="alignnone size-full wp-image-977" /></a></p>
<p>Anyone who has a passion for Windows Phone platform, mobile development is welcome to join me and other WP7 enthusiasts at Tallinna Polütehnikum(Tallinn, Estonia) for 2-day Code Camp on 19-20 Nov. You will have a chance to develop your own Windows Phone application with support from mentors, test it on a real device and win prizes including 1-year MSDN Ultimate subscription. You can develop applications on your own or you can join a team, it is totally up to you. </p>
<p>More information could be found here(in Estonian): <a href="http://www.eneta.ee/sundmused/Lehed/wp-koodilaager.aspx" title="WP koodilaager (Eneta)">WP koodilaager (Eneta)</a></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2010/10/windows-phone-7-presentation-for-eneta-2/" rel="bookmark" class="crp_title">Windows Phone 7 presentation for Eneta</a></li><li><a href="http://www.eugenedotnet.com/2011/02/baltic-mvp-summit-2011/" rel="bookmark" class="crp_title">Baltic MVP Summit 2011</a></li><li><a href="http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone CodeCamp in Latvia</a></li><li><a href="http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/" rel="bookmark" class="crp_title">Windows Phone 7 Touch and Sensors presentation for Eneta</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IoC for Windows Phone: Ninject</title>
		<link>http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/</link>
		<comments>http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 05:46:51 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[inversion of control]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[ninject]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=957</guid>
		<description><![CDATA[As I have promised in one of my previous posts, I will spend some time explaining the differences between different Inversion of Control (IoC) supported by Silverlight for Windows Phone. In this post is about Ninject. I will also try &#8230; <a href="http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I have promised in one of my previous posts, I will spend some time explaining the differences between different <a href="http://en.wikipedia.org/wiki/Inversion_of_control">Inversion of Control (IoC)</a> supported by Silverlight for Windows Phone. In this post is about Ninject. I will also try to compare several IoC implementations in one of my future articles.</p>
<p><a href="http://www.ninject.org/" alt="eugenedotnet ninject windows phone silverlight tutorial"><img src="/edimages/logos/ninjectlogo.png"/></a></p>
<p><span id="more-957"></span><br />
Before making the tutorial, I will mention few facts regarding Ninject in general.</p>
<ul>
<li>Ninject is a famous dependency injector .NET</li>
<li>You can download Ninject from their <a href="http://ninject.org/download">Website</a></li>
<li>You can extend Ninject functions with <a href="http://ninject.org/extensions">Extensions</a></li>
<li>Ninject is also supported by Silverlight and Windows Phone 7</li>
<li>Ninject supports Constructor, Properties and Method injection</li>
<li>Ninject supports 4 injection scopes: Scope, Singleton, Thread, Transient</li>
</ul>
<p>But let us not waste much time on facts and get directly to our tutorial for Windows Phone.<br />
<br/></p>
<h2>Setup</h2>
<p>Download Ninject for Windows Phone from the following <a href="http://ninject.org/download">website</a>. Create new default Windows Phone project in Visual Studio and add Ninject for Windows Phone references(DLLs) there.</p>
<h2>Creating simple Data Providers</h2>
<p>Lets assume our product has both test and production environments. Each of them has it&#8217;s own implementation inherited from a single interface: ITextDataProvider.</p>
<pre class="brush: csharp; title: ; notranslate">
public interface ITextDataProvider
{
    string GetText();
}
</pre>
<p>And the implementations are:</p>
<pre class="brush: csharp; title: ; notranslate">
public class ProductionDataProvider : ITextDataProvider
{
    public string GetText()
    {
        return &quot;production text&quot;;
    }
}

public class TestTextDataProvider : ITextDataProvider
{
    public string GetText()
    {
        return &quot;test text&quot;;
    }
}
</pre>
<p><br/></p>
<h2>Creating IoC Container</h2>
<p>Container is also pretty simple. It consists of an instance of StandardKernel class, Initialize method and generic Get method, which returns an instance with injected elements based on Type parameter. Initialize method simply binds different implementations depending on current project Build action(Debug, Release) to ITextDataProvider type.</p>
<pre class="brush: csharp; title: ; notranslate">
public static class IoCContainter
{
    private static readonly IKernel Kernel = new StandardKernel();

    public static void Initialize()
    {
        #if DEBUG

        Kernel.Bind&lt;ITextDataProvider&gt;().To&lt;TestTextDataProvider&gt;();

        #else

        Kernel.Bind&lt;ITextDataProvider&gt;().To&lt;ProductionDataProvider&gt;();

        #endif
    }

    public static T Get&lt;T&gt;()
    {
        return Kernel.Get&lt;T&gt;();
    }
}
</pre>
<p><br/></p>
<h2>Initializing IoC Container</h2>
<p>Now we need to initialize IoC container somewhere and probably the most suitable location for that would be App.xaml.cs events: Application_Launching and Application_Activated that run every time the application starts.</p>
<pre class="brush: csharp; title: ; notranslate">
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
    IoCContainter.Initialize();
}

// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
    IoCContainter.Initialize();
}
</pre>
<p><br/></p>
<h2>Creating ViewModel</h2>
<p>Hopefully, you are already introduced to <a href="http://en.wikipedia.org/wiki/Model_View_ViewModel">Model-View-ViewModel(MVVM)</a> pattern that is quite popular in Silverlight world. If not, then there is plenty of information in the internet. For the ViewModel you need to add a property of ITextDataProvider type and add an [Inject] attribute to it. This property will be injected inside Kernel. Also you need to enter a very basic Property that returns a text to be displayed in UI.</p>
<pre class="brush: csharp; title: ; notranslate">
public class NinjectSampleViewModel
{
    [Inject]
    public ITextDataProvider TextDataProvider { get; set; }

    public string TextToDisplay
    {
        get { return TextDataProvider.GetText(); }
    }
}
</pre>
<p><br/></p>
<h2>Creating View</h2>
<p>Final step is to create a View(or Page) to display the results. I have created a default Windows Phone XAML page for that and slightly modified ContentPanel element by adding a TextBlock with Text property Binding inside.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Grid x:Name=&quot;ContentPanel&quot; Grid.Row=&quot;1&quot; Margin=&quot;12,0,12,0&quot;&gt;
    &lt;TextBlock x:Name=&quot;tbText&quot; Text=&quot;{Binding TextToDisplay}&quot; /&gt;
&lt;/Grid&gt;
</pre>
<p>As for the codebehind I have also modified it a little bit with assigning DataContext property with our ViewModel using IoCContainer class.</p>
<pre class="brush: csharp; title: ; notranslate">
public NinjectSampleView()
{
    InitializeComponent();
    DataContext = IoCContainter.Get&lt;NinjectSampleViewModel&gt;();
}
</pre>
<p><br/></p>
<h2>Results</h2>
<p>After running the application you will see either &#8220;production text&#8221; or &#8220;test text&#8221; displayed depending on your Build Action.</p>
<p>You can find the source code inside EugeneDotnetWPSamples.IoC Project inside EugeneDotnetWPSamples GitHub project:<br />
<a href="https://github.com/eugenedotnet/EugeneDotnetWPSamples"><br />
<img src="/edimages/logos/githublogo.png" alt="eugenedotnet github windows phone project" /><br />
</a></p>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/11/injecting-viewmodels-to-views-using-a-custom-viewmodellocator/" rel="bookmark" class="crp_title">Injecting ViewModels to Views using a custom ViewModelLocator in Windows Phone</a></li><li><a href="http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/" rel="bookmark" class="crp_title">Binding text containing tags to TextBlock inlines using attached property in Silverlight for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/04/property-change-notification-for-windows-phone-7/" rel="bookmark" class="crp_title">W05: Property Change Notification for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/08/twitter-search-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W09: Twitter Search application for Windows Phone 7</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a POST call to a HTTPS url using HttpWebRequest</title>
		<link>http://www.eugenedotnet.com/2011/10/making-a-post-call-to-a-https-url-using-httpwebrequest/</link>
		<comments>http://www.eugenedotnet.com/2011/10/making-a-post-call-to-a-https-url-using-httpwebrequest/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 15:43:46 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[httpwebrequest]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=949</guid>
		<description><![CDATA[Here is a sample method I&#8217;ve used for making a POST(HTTP Method) call to a HTTPS url using an instance of HttpWebRequest class: Keep in mind that if your call does not have any content(request body) you still can not &#8230; <a href="http://www.eugenedotnet.com/2011/10/making-a-post-call-to-a-https-url-using-httpwebrequest/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a sample method I&#8217;ve used for making a POST(HTTP Method) call to a HTTPS url using an instance of HttpWebRequest class:</p>
<pre class="brush: csharp; title: ; notranslate">
/// &lt;summary&gt;
/// Method to make a POST call to a HTTPS url
/// &lt;/summary&gt;
/// &lt;param name=&quot;url&quot;&gt;HTTPS url&lt;/param&gt;
/// &lt;param name=&quot;requestBody&quot;&gt;content for a request&lt;/param&gt;
private void MakeHTTPSPostCall(string url, string requestBody)
{
    HttpWebRequest webRequest = WebRequest.CreateHttp(url);
    webRequest.Method = &quot;POST&quot;;
    webRequest.BeginGetRequestStream(
        requestResult =&gt;
        {

            using (Stream postStream = webRequest.EndGetRequestStream(requestResult))
            {
                if (requestBody != null)
                {
                    byte[] byteArray = Encoding.UTF8.GetBytes(requestBody);
                    postStream.Write(byteArray, 0, requestBody.Length);
                }
            }
            webRequest.BeginGetResponse(
                responseResult =&gt;
                {
                    try
                    {
                        using (var response =
                            (HttpWebResponse) webRequest.EndGetResponse(responseResult))
                        using (var streamResponse = response.GetResponseStream())
                        using (var streamRead = new StreamReader(streamResponse))
                        {
                            var responseString = streamRead.ReadToEnd();
                            var success = response.StatusCode == HttpStatusCode.OK;

                            // do something here with response...
                        }
                    }
                    catch (Exception ex)
                    {

                    }
                },
                null);
        },
        null);
}
</pre>
<p>Keep in mind that if your call does not have any content(request body) you still can not skip EndGetRequestStream part(shown bellow), because otherwise you will most likely get a HTTP 404 NotFound exception. Actually, any server-side error translates to a HTTP 404 on<br />
the client.</p>
<pre class="brush: csharp; title: ; notranslate">
using (Stream postStream = webRequest.EndGetRequestStream(requestResult))
{
...
}
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2010/11/isolated-storage-for-windows-phone-7/" rel="bookmark" class="crp_title">Isolated Storage for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/11/windows-phone-7-push-notification-basics/" rel="bookmark" class="crp_title">Windows Phone 7 Push Notification Basics</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w06-microsoft-tag-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W06: Microsoft Tag application for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/11/default-text-for-a-textbox-for-windows-phone-7/" rel="bookmark" class="crp_title">Default Text for a TextBox in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2010/11/windows-phone-7-serialization-xmlserializer/" rel="bookmark" class="crp_title">Windows Phone 7 Serialization: XmlSerializer</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/10/making-a-post-call-to-a-https-url-using-httpwebrequest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating reusable animations programmatically in Silverlight and Windows Phone</title>
		<link>http://www.eugenedotnet.com/2011/09/creating-reusable-animations-programmatically-in-silverlight-and-windows-phone/</link>
		<comments>http://www.eugenedotnet.com/2011/09/creating-reusable-animations-programmatically-in-silverlight-and-windows-phone/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 14:37:18 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[storyboard]]></category>
		<category><![CDATA[windows phone]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=938</guid>
		<description><![CDATA[As many of you know, I answer a lot of emails regarding Windows Phone development and last week I was asked to show how to create reusable Storyboards with animations programmatically in Silverlight (Windows Phone). Of course, there are plenty &#8230; <a href="http://www.eugenedotnet.com/2011/09/creating-reusable-animations-programmatically-in-silverlight-and-windows-phone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As many of you know, I answer a lot of emails regarding Windows Phone development and last week I was asked to show how to create reusable Storyboards with animations programmatically in Silverlight (Windows Phone). Of course, there are plenty tutorials in the internet, but I have decided to create my own. In a nutshell, in this post I am going to create a reusable Storyboard based on DoubleAnimation (for translate transformation), which can be applied for any instance of UIElement.</p>
<p><span id="more-938"></span><br />
First of all, I will create a default page, add a Rectangle control to ContentPanel (Grid) and apply a new instance of TranslateTransform to rectangle’s RenderTransform property. If you are familiar with Silverlight, then you, probably, know that Rectangle control inherit from UIElement. </p>
<pre class="brush: csharp; title: ; notranslate">
Rectangle rect = new Rectangle
    {
        Fill = new SolidColorBrush(Colors.Green),
        RenderTransform = new TranslateTransform()
    };
ContentPanel.Children.Add(rect);
</pre>
<p>Next step is to create a method to produce a reusable Storyboard. This method will take UIElement as parameter and return a new instance of Storyboard. Notice that within the storyboard I have modified TranslateTransform.Y property of UIElement using PropertyPath.</p>
<pre class="brush: csharp; title: ; notranslate">
public Storyboard CreateAndApplyStoryboard(UIElement targetElement)
{
    Storyboard sb = new Storyboard();

    DoubleAnimation animation =
        new DoubleAnimation {From = 0, To = 700};

    Storyboard.SetTarget(animation, targetElement);
    Storyboard.SetTargetProperty(animation,
        new PropertyPath(&quot;(UIElement.RenderTransform).(TranslateTransform.Y)&quot;));

    sb.Children.Add(animation);
    return sb;
}
</pre>
<p>Finally, to try that Storyboard in action, simply, call Begin method for a storyboard instance. Check my code bellow:</p>
<pre class="brush: csharp; title: ; notranslate">
Storyboard sb = CreateAndApplyStoryboard(rect);
sb.Begin();
</pre>
<p>Now you can create a new instance of such storyboard for every instance that derives from UIElement class.<br />
<br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/01/w14-multi-column-stackpanel-for-windows-phone-7/" rel="bookmark" class="crp_title">W14: Multi-column StackPanel for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/04/w04-tic-tac-toe-game-for-windows-phone-7/" rel="bookmark" class="crp_title">W04: Tic Tac Toe Game for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/11/default-text-for-a-textbox-for-windows-phone-7/" rel="bookmark" class="crp_title">Default Text for a TextBox in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w16-handling-multi-touch-events-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">W16: Detecting and handling multi-touch events in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/" rel="bookmark" class="crp_title">IoC for Windows Phone: Ninject</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/09/creating-reusable-animations-programmatically-in-silverlight-and-windows-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QA: Changing the Border color of Grid element in Silverlight and Windows Phone</title>
		<link>http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/</link>
		<comments>http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 13:34:21 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[q&a]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/</guid>
		<description><![CDATA[Yesterday I have received the following question by Juhee: I want to change the gray color of a grid to orange.I was able to change the thickness by changing the margin but do you know how to change the color &#8230; <a href="http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I have received the following question by Juhee:</p>
<blockquote><p>I want to change the gray color of a grid to orange.I was able to change the thickness by changing the margin but do you know how to change the color of the grid? So, for example:</p>
</blockquote>
<pre class="brush: csharp; title: ; notranslate">
&lt;Grid Background=&quot;Black&quot;  Margin=&quot;5,5,5,5&quot;&gt;
    &lt;StackPanel Width=&quot;318&quot; Orientation=&quot;Horizontal&quot;&gt;
        &lt;StackPanel Width=&quot;145&quot; Orientation=&quot;Vertical&quot;&gt;
            &lt;TextBlock TextWrapping=&quot;Wrap&quot; Text=&quot;{Binding Text}&quot; FontSize=&quot;20&quot;/&gt;
            &lt;Image Source=&quot;{Binding Photopath}&quot; Opacity=&quot;{Binding Dimness}&quot;/&gt;
        &lt;/StackPanel&gt;
    &lt;/StackPanel&gt;
&lt;/Grid&gt;
</pre>
<p>If you would like to change the Background color of your grid then, simply, modify Background attribute of the grid (Background=”Black”, as you did that in your code).</p>
<p>If you want to change the color of a Grid’s border color or thickness you have to place your grid inside a <strong>Border</strong> element. Check my sample bellow:</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;Border BorderThickness=&quot;5&quot; BorderBrush=&quot;Orange&quot;&gt;
    &lt;Grid Background=&quot;Black&quot;  Margin=&quot;5,5,5,5&quot;&gt;
        &lt;StackPanel Width=&quot;318&quot; Orientation=&quot;Horizontal&quot;&gt;
            &lt;StackPanel Width=&quot;145&quot; Orientation=&quot;Vertical&quot;&gt;
                &lt;TextBlock TextWrapping=&quot;Wrap&quot; Text=&quot;{Binding Text}&quot; FontSize=&quot;20&quot;/&gt;
                &lt;Image Source=&quot;{Binding Photopath}&quot; Opacity=&quot;{Binding Dimness}&quot;/&gt;
            &lt;/StackPanel&gt;
        &lt;/StackPanel&gt;
    &lt;/Grid&gt;
&lt;/Border&gt;
</pre>
<p>I hope that answers your question.<br />
<br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/" rel="bookmark" class="crp_title">Binding Image, Brush or Color to Background property in Silverlight and Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w14-multi-column-stackpanel-for-windows-phone-7/" rel="bookmark" class="crp_title">W14: Multi-column StackPanel for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/" rel="bookmark" class="crp_title">Summer vacation is now officially over</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w16-handling-multi-touch-events-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">W16: Detecting and handling multi-touch events in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Summer vacation is now officially over</title>
		<link>http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/</link>
		<comments>http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 20:29:21 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[info]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/</guid>
		<description><![CDATA[My long summer vacation has now come to an end. I have restored my energy levels and I am ready to continue blogging. My next series of posts will be covering Inversion Of Control (IoC) possibilities in Windows Phone environment. &#8230; <a href="http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.eugenedotnet.com/wp-content/uploads/2011/09/268389_114941678600615_100002543499666_126349_7385000_n1.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="268389_114941678600615_100002543499666_126349_7385000_n[1]" border="0" alt="268389_114941678600615_100002543499666_126349_7385000_n[1]" src="http://www.eugenedotnet.com/wp-content/uploads/2011/09/268389_114941678600615_100002543499666_126349_7385000_n1_thumb.jpg" width="252" height="280"></a></p>
<p>My long summer vacation has now come to an end. I have restored my energy levels and I am ready to continue blogging. My next series of posts will be covering <strong>Inversion Of Control</strong> (IoC) possibilities in Windows Phone environment. For this and also for my future posts I will use <strong>Windows Live Writer</strong>. I’ve heard a lot of good feedback regarding this tool, so, I think, I will give it a try. </p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/" rel="bookmark" class="crp_title">QA: Changing the Border color of Grid element in Silverlight and Windows Phone</a></li><li><a href="http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2011/12/post-event-summary-of-windows-phone-codecamp-in-latvia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone CodeCamp in Latvia</a></li><li><a href="http://www.eugenedotnet.com/2010/05/my-presentation-on-windows-phone-7-at-devclub-eu/" rel="bookmark" class="crp_title">Windows Phone 7 presentation for devclub.eu</a></li><li><a href="http://www.eugenedotnet.com/2010/11/xml-to-xsd-scheme-tool/" rel="bookmark" class="crp_title">XML to XSD Scheme Tool</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/09/summer-vacation-is-now-officially-over/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Passing values between Windows Phone 7 pages: Current context of Application</title>
		<link>http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/</link>
		<comments>http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:32:36 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=888</guid>
		<description><![CDATA[Another approach for passing parameters and values between two Windows Phone 7 pages is in using a current context of application (i.e App.xaml.cs file). As it is for Page Instance approach and for QueryString approach this one also has several &#8230; <a href="http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another approach for passing parameters and values between two Windows Phone 7 pages is in using a current context of application (i.e App.xaml.cs file). As it is for <a href="/2011/03/passing-values-to-windows-phone-7-pages-destination-page-instance-within-onnavigatedfrom-method/">Page Instance approach</a> and for <a href="/2011/03/passing-values-to-windows-phone-7-pages-uri-paremeters-or-querystring/">QueryString approach</a> this one also has several advantages and disadvantages.</p>
<p><img src="/edimages/WindowsPhone7/Tutorials/PassingParameters_StaticContext/PassingValuesUsingStaticContext.png" alt="Passing values between Windows Phone 7 pages: Current context of Application image by eugenedotnet aka jevgeni tsaikin" /><br />
<span id="more-888"></span></p>
<h2>Implementation</h2>
<p>Probably it is one of the easiest approaches for sharing values between several different Windows Phone 7 pages. Actually, not only pages, but you can share properties between all parts of your application. For this purpose you can use an object of App class (App.xaml.cs). </p>
<p>I have added a custom property to App.xaml.cs:</p>
<pre class="brush: csharp; title: ; notranslate">
public string Parameter { get; set; }
</pre>
<p>To store a value for this property you can use the following line of code from any part of your application:</p>
<pre class="brush: csharp; title: ; notranslate">
var a = App.Current as App;
a.Parameter = &quot;something&quot;;
</pre>
<p>Same code can be used to read a value of that property in another part of your application:</p>
<pre class="brush: csharp; title: ; notranslate">
var a = App.Current as App;
myTextBlock.Text = a.Parameter;
</pre>
<p><br/></p>
<h2>Advantages</h2>
<p>First of all, the parameter or property is shared not only between two pages, but it is accessible from any part of your application. Secondly, it is easier to store and restore the value during the Tombstoning events if it is a part of App.xaml.cs class, because by default Tombstoning events are handled by the same class.</p>
<h2>Disadvantages</h2>
<p>Actually, this approach doesn&#8217;t have many downsides or maybe I was not able to find them. One problem, which I had using this way of passing values, is that it is sometimes hard to define the right time to remove a value from a property. Always keep in mind the performance and memory usage considerations while developing for a mobile device.</p>
<p><br/> </p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/03/passing-values-to-windows-phone-7-pages-destination-page-instance-within-onnavigatedfrom-method/" rel="bookmark" class="crp_title">Passing values between Windows Phone 7 pages: Destination page instance within OnNavigatedFrom method</a></li><li><a href="http://www.eugenedotnet.com/2011/03/passing-values-to-windows-phone-7-pages-uri-paremeters-or-querystring/" rel="bookmark" class="crp_title">Passing values to Windows Phone 7 pages: URI paremeters and QueryString</a></li><li><a href="http://www.eugenedotnet.com/2010/09/w11-navigation-in-windows-phone-7-apps/" rel="bookmark" class="crp_title">W11: Navigation in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2011/02/w18-difference-between-goback-method-and-navigate-method-of-navigationservice/" rel="bookmark" class="crp_title">W18: Difference between GoBack method and Navigate method of NavigationService in Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/03/w02-inputscope-for-a-textbox-in-windows-phone-7-apps/" rel="bookmark" class="crp_title">InputScope for a TextBox in Windows Phone 7 apps</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Three properties that I use for almost every Windows Phone application</title>
		<link>http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/</link>
		<comments>http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 19:48:42 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=865</guid>
		<description><![CDATA[In this post I will tell you which three properties I use for almost every of my Windows Phone applications. First property is used by me to determine if the application is running in trial mode or full mode. Second &#8230; <a href="http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this post I will tell you which three properties I use for almost every of my Windows Phone applications. First property is used by me to determine if the application is running in trial mode or full mode. Second property is provided to identify if the application is running on low-memory device and the last property is used to detect if user has selected a dark or light background theme in Windows Phone settings. All of those properties were described in details earlier, but I have decided to collect them in a single post.</p>
<p><span id="more-865"></span></p>
<h2>Is trial version or full version?</h2>
<p>Few months ago I have written a post <a href="/2010/09/w10-determining-license-mode-in-windows-phone-7-apps/">Determining license mode in Windows Phone 7 apps</a> and bellow is a property taken from that post. You can simulate if application is running in Emulator in trial mode by modifying &#8220;emulatorIsTrial&#8221; variable.</p>
<pre class="brush: csharp; title: ; notranslate">
private const bool _emulatorIsTrial = false;

public bool IsTrialMode
{
    get
    {
        if (Microsoft.Devices.Environment.DeviceType
               == Microsoft.Devices.DeviceType.Emulator)
        {
            return _emulatorIsTrial;
        }
        return (new LicenseInformation().IsTrial());
    }
}
</pre>
<p><br/></p>
<h2>Is low memory device?</h2>
<p>To take advantage of devices that have more than 256 Mb of RAM available I have created a special property in <a href="/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/">one of my previous posts</a>. This property helps you to determine a total number of available memory on device. Here’s what this property looks like:</p>
<pre class="brush: csharp; title: ; notranslate">
private const bool _emulatorIsLowMemory = false;

public bool IsLowMemoryDevice
{
    get
    {
        if (Microsoft.Devices.Environment.DeviceType
            == Microsoft.Devices.DeviceType.Emulator)
        {
            return _emulatorIsLowMemory;
        }
        else
        {
            return (long)DeviceExtendedProperties.GetValue(&quot;DeviceTotalMemory&quot;)
                &lt;= 268435456;
        }
    }
}
</pre>
<p><br/></p>
<h2>Is light or dark theme?</h2>
<p>Finally, here is a property from my <a href="/2011/06/detecting-theme-background-in-windows-phone-7-applications/">last post</a> to detect if user has selected a dark or light theme background in Windows Phone settings.</p>
<pre class="brush: csharp; title: ; notranslate">
public bool IsLightTheme
{
    get
    {
        return (Visibility)Resources[&quot;PhoneLightThemeVisibility&quot;]
            == Visibility.Visible;
    }
}
</pre>
<p><br/><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2010/09/w10-determining-license-mode-in-windows-phone-7-apps/" rel="bookmark" class="crp_title">W10: Determining license mode in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting theme background in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting and simulating low memory devices in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/" rel="bookmark" class="crp_title">Binding Image, Brush or Color to Background property in Silverlight and Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/11/simulating-gps-position-changes-using-reactive-extensions-in-windows-phone-environment/" rel="bookmark" class="crp_title">Simulating GPS position changes using Reactive Extensions in Windows Phone environment</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Detecting theme background in Windows Phone 7 applications</title>
		<link>http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/</link>
		<comments>http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 14:46:46 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=850</guid>
		<description><![CDATA[As you have probably noticed Windows Phone 7 platform allows you to change the Background (Theme) in emulator and on real device. It can be accomplished in Settings -> Theme menu (check image bellow). As a developer I sometimes need &#8230; <a href="http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As you have probably noticed Windows Phone 7 platform allows you to change the Background (Theme) in emulator and on real device. It can be accomplished in Settings -> Theme menu (check image bellow). As a developer I sometimes need to determine what background theme is currently applied to a phone to take advantage of it during the development. </p>
<p><img alt="Image of emulator for Detecting background of a theme in Windows Phone 7 applications by eugenedotnet aka Jevgeni Tšaikin" src="/edimages/WindowsPhone7/DetectingTheme/eugenedotnet_windowsphone_themedetectiong.png" /></p>
<p>Currently, you are able to pick one theme among &#8220;light&#8221; and &#8220;dark&#8221;. Notice that &#8220;dark&#8221; theme is considered as more <b>battery-friendly theme</b>. Now I am going to show two properties I use to detect both themes. Usually I use only one of them per project.</p>
<pre class="brush: csharp; title: ; notranslate">
public bool IsLightTheme
{
    get
    {
        return (Visibility)Resources[&quot;PhoneLightThemeVisibility&quot;]
            == Visibility.Visible;
    }
}

public bool IsDarkTheme
{
    get
    {
        return (Visibility)Resources[&quot;PhoneDarkThemeVisibility&quot;]
            == Visibility.Visible;
    }
}
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/" rel="bookmark" class="crp_title">Three properties that I use for almost every Windows Phone application</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w15-displaying-subtitles-using-timeline-markers/" rel="bookmark" class="crp_title">W15: Displaying Subtitles using Timeline Markers in Windows Phone 7 media applications</a></li><li><a href="http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting and simulating low memory devices in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/" rel="bookmark" class="crp_title">Binding Image, Brush or Color to Background property in Silverlight and Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/" rel="bookmark" class="crp_title">QA: Changing the Border color of Grid element in Silverlight and Windows Phone</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Binding Image, Brush or Color to Background property in Silverlight and Windows Phone 7</title>
		<link>http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/</link>
		<comments>http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/#comments</comments>
		<pubDate>Tue, 31 May 2011 13:50:38 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Binding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[binding]]></category>
		<category><![CDATA[brush]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tips&tricks]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=837</guid>
		<description><![CDATA[I&#8217;ve decided to post a property I use to bind Image / Brush / Color hex to Background property of Silverlight or Windows Phone 7 control. First of all, do not use that property in every Background Binding case to &#8230; <a href="http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to post a property I use to bind Image / Brush / Color hex to Background property of Silverlight or Windows Phone 7 control. First of all, do not use that property in every Background Binding case to avoid a minor loss of performance, use it in rare cases, when you have no other option. To bind image I am using ImageBrush, for Brush (with color) I am using SolidColorBrush and for Color hex &#8211; string.</p>
<pre class="brush: csharp; title: ; notranslate">
public object CustomBackground
{
    get
    {
        if (...background should be an image...)
        {
            // bind Image
            return new ImageBrush
                   {
                       ImageSource = new BitmapImage(new Uri(..image url...))
                   };
        }

        if (...background should be a brush...)
        {
            // bind Brush
            return new SolidColorBrush(Colors.Blue);
        }

        // bind color hex (RGB hex or RGB+Alpha hex)
        return &quot;#FFFFFFFF&quot;;
    }
}
</pre>
<p>You can bind this property to Background using standard approaches to <a href="http://msdn.microsoft.com/en-us/library/cc278072(v=vs.95).aspx">Data Binding in Silverlight</a>. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;Grid Background=&quot;{Binding CustomBackground}&quot;&gt;
...
&lt;/Grid&gt;
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/09/qa-changing-the-border-color-of-grid-element-in-silverlight-and-windows-phone/" rel="bookmark" class="crp_title">QA: Changing the Border color of Grid element in Silverlight and Windows Phone</a></li><li><a href="http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/" rel="bookmark" class="crp_title">Binding text containing tags to TextBlock inlines using attached property in Silverlight for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w16-handling-multi-touch-events-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">W16: Detecting and handling multi-touch events in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting theme background in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/" rel="bookmark" class="crp_title">Three properties that I use for almost every Windows Phone application</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Detecting and simulating low memory devices in Windows Phone 7 applications</title>
		<link>http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/</link>
		<comments>http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/#comments</comments>
		<pubDate>Sun, 29 May 2011 20:28:14 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[tips&tricks]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=810</guid>
		<description><![CDATA[Probably most of you have read Performance and Resource Management part of Windows Phone 7 Application Certification Requirements v1.4 document concerning requirements to memory consumption. In particular, there is a sentence regarding low memory devices (which have only 256 MB &#8230; <a href="http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Probably most of you have read Performance and Resource Management part of <a href="http://go.microsoft.com/?linkid=9730558">Windows Phone 7 Application Certification Requirements v1.4</a> document concerning requirements to memory consumption. In particular, there is a sentence regarding low memory devices (which have only 256 MB of RAM installed): &#8220;An application must not exceed 90 MB of RAM usage, except on devices that have more than 256 MB of memory&#8221;. In this short post I will describe how to detect such devices.</p>
<p><span id="more-810"></span></p>
<p>Basically, we need to detect low memory devices to determine what amount of memory is at our disposal and take advantage of it. For example, we can show high quality images on devices, which have more than 256 MB of memory installed and low quality images (i.e in Panorama control) for other devices.  </p>
<h2>Detecting and simulating low memory devices</h2>
<p>To determine a total amount of available memory you need to use <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.info.deviceextendedproperties%28v=vs.92%29.aspx">DeviceExtendedProperties</a> class with GetValue method and pass <b>&#8220;DeviceTotalMemory&#8221;</b> key there. That method will return an amount of memory in bytes. This number should not be greater than <b>256 Megabytes (268435456 Bytes)</b> for low memory devices. To simulate such device in emulator I will simply use a boolean variable (true &#8211; for low memory device, false &#8211; for other devices).</p>
<pre class="brush: csharp; title: ; notranslate">
private const bool EmulatorIsLowMemory = false;

public bool IsLowMemoryDevice
{
    get
    {
        if (Microsoft.Devices.Environment.DeviceType
            == Microsoft.Devices.DeviceType.Emulator)
        {
            return EmulatorIsLowMemory;
        }
        else
        {
            return (long)DeviceExtendedProperties.GetValue(&quot;DeviceTotalMemory&quot;)
                &lt;= 268435456;
        }
    }
}
</pre>
<p><br/></p>
<h2>Memory Consumption</h2>
<p>According to Windows Phone 7 Application Certification Requirements document we should use <b>&#8220;ApplicationPeakMemoryUsage&#8221;</b> key for DeviceExtendedProperties to query the peak of memory usage. There is a <a href="http://msdn.microsoft.com/en-us/library/ff941122%28v=vs.92%29.aspx">nice tutorial on MSDN</a> of that process. Here is the code I use for this purpose:</p>
<pre class="brush: csharp; title: ; notranslate">
long peak = (long)DeviceExtendedProperties.GetValue(&quot;ApplicationPeakMemoryUsage&quot;)
</pre>
<p><br/></p>
<h2>Additional information</h2>
<ul>
<li><a href="http://go.microsoft.com/?linkid=9730558">Windows Phone 7 Application Certification Requirements v1.4</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.info.deviceextendedproperties%28v=vs.92%29.aspx">DeviceExtendedProperties Class</a></li>
<li>
<a href="http://msdn.microsoft.com/en-us/library/ff941122%28v=vs.92%29.aspx">Device Status for Windows Phone</a>
</li>
</ul>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/06/three-properties-that-i-use-for-almost-every-windows-phone-application/" rel="bookmark" class="crp_title">Three properties that I use for almost every Windows Phone application</a></li><li><a href="http://www.eugenedotnet.com/2010/09/w10-determining-license-mode-in-windows-phone-7-apps/" rel="bookmark" class="crp_title">W10: Determining license mode in Windows Phone 7 apps</a></li><li><a href="http://www.eugenedotnet.com/2010/12/windows-phone-7-serialization-comparison/" rel="bookmark" class="crp_title">Windows Phone 7 Serialization: Comparison</a></li><li><a href="http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting theme background in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/" rel="bookmark" class="crp_title">Passing values between Windows Phone 7 pages: Current context of Application</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/05/detecting-and-simulating-low-memory-devices-in-windows-phone-7-applications/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ItemsControl virtualization using VirtualizingStackPanel in Silverlight for Windows Phone 7</title>
		<link>http://www.eugenedotnet.com/2011/05/itemscontrol-virtualization-using-virtualizingstackpanel-in-silverlight-for-windows-phone-7/</link>
		<comments>http://www.eugenedotnet.com/2011/05/itemscontrol-virtualization-using-virtualizingstackpanel-in-silverlight-for-windows-phone-7/#comments</comments>
		<pubDate>Sun, 15 May 2011 21:26:15 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Custom Controls]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ui virtualization]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=784</guid>
		<description><![CDATA[Usually I am using ListBox control in my Windows Phone 7 Silverlight applications to display a scrollable list of child controls. ListBox offers UI virtualization, that means that UI is loading ListBox items on demand to increase the performance and &#8230; <a href="http://www.eugenedotnet.com/2011/05/itemscontrol-virtualization-using-virtualizingstackpanel-in-silverlight-for-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Usually I am using ListBox control in my Windows Phone 7 Silverlight applications to display a scrollable list of child controls. ListBox offers UI virtualization, that means that UI is loading ListBox items on demand to increase the performance and reduce memory allocation. One of the main keys to that is in using <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.virtualizingstackpanel.aspx">VirtualizingStackPanel</a> as ItemsPanel Template for ListBox control. </p>
<p>Lately in one of my Windows Phone 7 projects I had to replace ListBox with ItemsControl, but ItemsControl does not offer UI virtualization for child items by default, so I had to add the same VirtualizingStackPanel to ItemsPanelTemplate element. Also I have modified the Template element to be able to add and access ScrollViewer for ItemsControl. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;ItemsControl&gt;
    &lt;ItemsControl.ItemsPanel&gt;
        &lt;ItemsPanelTemplate&gt;
            &lt;VirtualizingStackPanel /&gt;
        &lt;/ItemsPanelTemplate&gt;
    &lt;/ItemsControl.ItemsPanel&gt;
    &lt;ItemsControl.Template&gt;
        &lt;ControlTemplate TargetType=&quot;ItemsControl&quot;&gt;
                &lt;ScrollViewer&gt;
                    &lt;ItemsPresenter/&gt;
                &lt;/ScrollViewer&gt;
        &lt;/ControlTemplate&gt;
    &lt;/ItemsControl.Template&gt;
    &lt;ItemsControl.ItemTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;!-- place your controls here--&gt;
        &lt;/DataTemplate&gt;
    &lt;/ItemsControl.ItemTemplate&gt;
&lt;/ItemsControl&gt;
</pre>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/02/creating-a-horizontal-listbox-in-silverlight-and-windows-phone-7/" rel="bookmark" class="crp_title">Creating a Horizontal ListBox in Silverlight and Windows Phone</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/08/twitter-search-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W09: Twitter Search application for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/04/property-change-notification-for-windows-phone-7/" rel="bookmark" class="crp_title">W05: Property Change Notification for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/12/displaying-image-inside-panorama-title-in-windows-phone-applications/" rel="bookmark" class="crp_title">Displaying image inside Panorama Title in Windows Phone applications</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/05/itemscontrol-virtualization-using-virtualizingstackpanel-in-silverlight-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Binding text containing tags to TextBlock inlines using attached property in Silverlight for Windows Phone 7</title>
		<link>http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/</link>
		<comments>http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 21:23:17 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Binding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[binding]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=769</guid>
		<description><![CDATA[Lately I&#8217;ve had to bind a text in custom format(having different tags inside) to a TextBlock element for one of my Windows Phone 7 applications. The only option to bind such specific text to a normal TextBlock was in using &#8230; <a href="http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve had to bind a text in custom format(having different tags inside) to a TextBlock element for one of my Windows Phone 7 applications. The only option to bind such specific text to a normal TextBlock was in using Inlines collection property. For example: &lt;br /&gt; tag in text should be replaced with &lt;LineBreak /&gt; inline element. Pretty similar to HTML. Unfortunately, <b>TextBlock Inlines property is not a DependencyProperty</b>, therefore we cannot add data binding directly to Inlines. In this post I am going to share my vision and approach to accomplish this task using an attached property and Data Binding converter.</p>
<p><span id="more-769"></span></p>
<h2>Additional information</h2>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/cc265152(v=vs.95).aspx#Y1236">Attached Properties Overview (MSDN)</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/cc278072(v=vs.95).aspx">Data Binding in Silverlight (MSDN)</a></li>
</ul>
<p>First of all, we need to create a default Windows Phone 7 application project. After that we will create a converter, XAML page with textblock control and add a data binding there. Now let&#8217;s discuss each of those steps in details. </p>
<h2>Creating a Converter</h2>
<p>Within our project we need to create a new converter class. Let&#8217;s call it TextBlockInlineConvertor. This class must implement <a href="http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter.aspx">IValueConverter</a> interface from System.Windows.Data, which is a requirement for any Silverlight converter class. This interface includes two methods: Convert and ConvertBack. To make this tutorial as simple as possible I am going to use only Convert method and transform only one type of tags: &lt;br /&gt;. We are going to split text using this tag into separate Run elements (inline element of TextBlock) and insert a LineBreak element in between. Here is my implementation of IValueConverter interface:</p>
<pre class="brush: csharp; title: ; notranslate">
public class TextBlockInlineConvertor : IValueConverter
{
    public object Convert(object value, Type targetType,
        object parameter, CultureInfo culture)
    {
        var inlines = new List&lt;Inline&gt;();
        if (value != null)
        {
            // parse text
            var textLines =
                value.ToString().Split(
                    new string[] { &quot;&lt;br/&gt;&quot; }
                    , StringSplitOptions.RemoveEmptyEntries);

            // add inlines and linebreaks
            foreach (string line in textLines)
            {
                inlines.Add(new Run() { Text = line});
                if (textLines.ToList().IndexOf(line) &lt; textLines.Length - 1)
                {
                    inlines.Add(new LineBreak());
                }
            }
        }
        return inlines;
    }

    public object ConvertBack(object value, Type targetType,
        object parameter, CultureInfo culture)
    {
        return value;
    }
}
</pre>
<p><br/></p>
<h2>Creating a Page</h2>
<p>Next step is to add a XAML page. Of course, you can also use MainPage.xaml created by default. Within XAML page let&#8217;s add our converter as Framework element resource just before LayoutRoot grid element.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;FrameworkElement.Resources&gt;
        &lt;ResourceDictionary&gt;
            &lt;bindings:TextBlockInlineConvertor x:Key=&quot;inlineConverter&quot; /&gt;
        &lt;/ResourceDictionary&gt;
&lt;/FrameworkElement.Resources&gt;
</pre>
<p>Pay attention that you need to declare a namespace in phone:PhoneApplicationPage. In my case it is:</p>
<pre class="brush: xml; title: ; notranslate">
xmlns:bindings=&quot;clr-namespace:EugeneDotnetWP7Samples.Bindings&quot;
</pre>
<p>Now we need to add an attached property to codebehind. This attached property will allow us to bind a list to Textblock Inlines property using OnInlineListPropertyChanged event. You can read more about attached properties at MSDN (check link above).</p>
<pre class="brush: csharp; title: ; notranslate">
public static string GetInlineList(TextBlock element)
{
    if (element != null)
        return element.GetValue(ArticleContentProperty) as string;
    return string.Empty;
}

public static void SetInlineList(TextBlock element, string value)
{
    if (element != null)
        element.SetValue(ArticleContentProperty, value);
}

public static readonly DependencyProperty ArticleContentProperty =
    DependencyProperty.RegisterAttached(
        &quot;InlineList&quot;,
        typeof(List&lt;Inline&gt;),
        typeof(TextBlockBindingSamplePage),
        new PropertyMetadata(null, OnInlineListPropertyChanged));

private static void OnInlineListPropertyChanged(DependencyObject obj,
    DependencyPropertyChangedEventArgs e)
{
    var tb = obj as TextBlock;
    if (tb != null)
    {
        // clear previous inlines
        tb.Inlines.Clear();

        // add new inlines
        var inlines = e.NewValue as List&lt;Inline&gt;;
        if(inlines != null)
        {
            inlines.ForEach(inl =&gt; tb.Inlines.Add((inl)));
        }
    }
}
</pre>
<p>After you build the project you can add attached property to a TextBlock control in XAML. I have added a TextBlock to XAML page inside ContentPanel grid.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Grid x:Name=&quot;ContentPanel&quot; Grid.Row=&quot;1&quot; Margin=&quot;12,0,12,0&quot;&gt;
    &lt;TextBlock x:Name=&quot;tbInlines&quot;
        bindings:TextBlockBindingSamplePage.InlineList=&quot;{Binding CustomText
        , Converter={StaticResource inlineConverter}}&quot;
        /&gt;
&lt;/Grid&gt;
</pre>
<p>And now it is the right time for our final step. As you have probably noticed TextBlock is using CustomText as a binding property. Now we need to somehow add this property to the DataContext. For this tutorial I will not implement a special ViewModel class according to MVVM pattern principles, but instead I will simply create a property inside XAML page codebehind and assign the page to DataContext in constructor. CustomText property contains a text which can be used to test our application.</p>
<pre class="brush: csharp; title: ; notranslate">
public string CustomText
{
    get { return @&quot;Windows Phone&lt;br/&gt;is&lt;br/&gt;really cool!&quot;; }
}

public TextBlockBindingSamplePage()
{
    InitializeComponent();
    DataContext = this;
}
</pre>
<p><br/></p>
<h2>Result</h2>
<p>After you run the application you will notice that our text in custom format was successfully transformed to TextBlock Inlines containing Run and LineBreak elements using converter.</p>
<p><img src="/edimages/WindowsPhone7/BindingTextBlockInlines/bindingtextblockinlinesinsilverlight.png" alt="Binding text containing tags to TextBlock inlines using attached property in Silverlight for Windows Phone 7 result by eugenedotnet" /></p>
<p><br/></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/10/ioc-for-windows-phone-ninject/" rel="bookmark" class="crp_title">IoC for Windows Phone: Ninject</a></li><li><a href="http://www.eugenedotnet.com/2010/04/property-change-notification-for-windows-phone-7/" rel="bookmark" class="crp_title">W05: Property Change Notification for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2011/05/binding-image-brush-or-color-to-background-property-in-silverlight-and-windows-phone-7/" rel="bookmark" class="crp_title">Binding Image, Brush or Color to Background property in Silverlight and Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/05/w08-rss-reader-for-windows-phone-7/" rel="bookmark" class="crp_title">W08: RSS Reader for Windows Phone 7</a></li><li><a href="http://www.eugenedotnet.com/2010/08/twitter-search-application-for-windows-phone-7/" rel="bookmark" class="crp_title">W09: Twitter Search application for Windows Phone 7</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/04/binding-text-containing-tags-to-textblock-inlines-using-attached-property-in-silverlight-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Microsoft Most Valuable Professional in Device Application Development</title>
		<link>http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/</link>
		<comments>http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 21:06:11 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Awards]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[device application development]]></category>
		<category><![CDATA[Most Valuable Professional]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=753</guid>
		<description><![CDATA[More than two weeks ago I was awarded Microsoft&#8217;s Most Valued Professional (MVP) in Device Application Development. Frankly speaking, becoming a MVP was actually one of my dreams, which I&#8217;ve never thought will come true, therefore I am very pleased &#8230; <a href="http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>More than two weeks ago I was awarded <a href="https://mvp.support.microsoft.com/profile/Jevgeni" alt="Jevgeni Tšaikin aka eugenedotnet Microsoft Most Valuable Professional (MVP)">Microsoft&#8217;s Most Valued Professional (MVP)</a> in <b>Device Application Development</b>. Frankly speaking, becoming a MVP was actually one of my dreams, which I&#8217;ve never thought will come true, therefore I am very pleased and honored to become one of MVPs. Thank you!</p>
<p>Basically during this year I have realized that MVP activities are all about sharing, you share your experience, knowledge, thoughts, ideas using different channels like technical blogs, social media, forums, screencasts, websites and offline presentations. Of course, those activities take a lot of my valuable personal time, but I hope they will save some of yours <img src='http://www.eugenedotnet.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Anyway I am looking forward to new contribution and development opportunities in 2011/2012. </p>
<p><img src="/edimages/mvp/mvpsmall.jpg" alt="Jevgeni Tsaikin MVP award kit" /></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2011/02/baltic-mvp-summit-2011/" rel="bookmark" class="crp_title">Baltic MVP Summit 2011</a></li><li><a href="http://www.eugenedotnet.com/2011/07/passing-values-between-windows-phone-7-pages-current-context-of-application/" rel="bookmark" class="crp_title">Passing values between Windows Phone 7 pages: Current context of Application</a></li><li><a href="http://www.eugenedotnet.com/2011/06/detecting-theme-background-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">Detecting theme background in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/11/post-event-summary-of-windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Post-event summary of Windows Phone Code Camp in Estonia</a></li><li><a href="http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/" rel="bookmark" class="crp_title">Windows Phone 7 Touch and Sensors presentation for Eneta</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/04/microsoft-most-valuable-professional-in-device-application-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 Touch and Sensors presentation for Eneta</title>
		<link>http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/</link>
		<comments>http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 12:13:46 +0000</pubDate>
		<dc:creator>eugenedotnet</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Eneta]]></category>
		<category><![CDATA[multi-touch]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[sensors]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://www.eugenedotnet.com/?p=739</guid>
		<description><![CDATA[Few months have passed since my previous presentation for Eneta community and time has come to talk about something new. This time I have chosen two topics: Touch and Sensors. I think, both topics are very important for Windows Phone &#8230; <a href="http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Few months have passed since my <a href="/2010/10/windows-phone-7-presentation-for-eneta-2/">previous presentation</a> for <a href="http://www.eneta.ee">Eneta</a> community and time has come to talk about something new. This time I have chosen two topics: <b>Touch</b> and <b>Sensors</b>. I think, both topics are very important for Windows Phone 7 developers, especially when it comes to developing games.</p>
<p><img src="/edimages/eneta16032011/eugenedotnet_eneta_16032011.PNG" alt="Jevgeni Tšaikin presentation for eneta 16032011 on topics Touch and Sensors by eugenedotnet" /></p>
<p><span id="more-739"></span><br />
I haven&#8217;t had much time to prepare my speech due to my workload, but, at least, I think the demo part went smoothly. I have prepared a demo for each part of my presentation. This time there were around <b>50-60</b> offline and online participants. I would like to <b>thank Eneta community, IT College and Microsoft</b> for supporting this event. As usually, it was a very pleasant experience for me and, hopefully, for others too.</p>
<p>During the presentation I have covered the following topics:</p>
<ul>
<li>General information about Touch support and Gestures for Windows Phone 7</li>
<li>Touch: Mouse Events (+Demo)</li>
<li>Touch: Manipulation Events (+Demo)</li>
<li>Touch: Static class Touch (+Demo)</li>
<li>General information about Windows Phone 7 sensors</li>
<li>Sensors: Accelerometer (+Demo including simulating coordinates using Reactive Extentions)</li>
<li>Sensors: GPS / A-GPS (+Demo including simulating coordinates using Reactive Extentions)</li>
</ul>
<p>You can check the following resources to find out more about my presentation:</p>
<ul>
<li><a href="http://echo360.e-uni.ee/ess/echo/presentation/d1876b70-dd90-43d1-a994-0c19184a80f6">Video Recording</a></li>
<li><a href="/edimages/eneta16032011/eugenedotnet_eneta_16032011.pptx">Slides</a></li>
<li><a href="/edimages/eneta16032011/eugenedotnet_eneta_16032011_code.zip">Source Code (for Demo)</a></li>
</ul>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.eugenedotnet.com/2010/10/windows-phone-7-presentation-for-eneta-2/" rel="bookmark" class="crp_title">Windows Phone 7 presentation for Eneta</a></li><li><a href="http://www.eugenedotnet.com/2010/05/my-presentation-on-windows-phone-7-at-devclub-eu/" rel="bookmark" class="crp_title">Windows Phone 7 presentation for devclub.eu</a></li><li><a href="http://www.eugenedotnet.com/2011/02/baltic-mvp-summit-2011/" rel="bookmark" class="crp_title">Baltic MVP Summit 2011</a></li><li><a href="http://www.eugenedotnet.com/2011/01/w16-handling-multi-touch-events-in-windows-phone-7-applications/" rel="bookmark" class="crp_title">W16: Detecting and handling multi-touch events in Windows Phone 7 applications</a></li><li><a href="http://www.eugenedotnet.com/2011/11/windows-phone-code-camp-in-estonia/" rel="bookmark" class="crp_title">Windows Phone Code Camp in Estonia</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.eugenedotnet.com/2011/03/windows-phone-7-touch-and-sensors-presentation-for-eneta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

