<?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:rssdatehelper="urn:rssdatehelper"><channel><title></title><link>http://www.coderox.se</link><pubDate>2013-05-20T16:40:49</pubDate><generator>umbraco</generator><description></description><language>en</language><item><title>Windows Phone lockscreen-submissions</title><link>http://www.coderox.se/blog/windows-phone-lockscreen-submissions.aspx</link><pubDate>Mon, 20 May 2013 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/windows-phone-lockscreen-submissions.aspx</guid><description><![CDATA[ 
<p>Here are the submissions for the small lockscreen-competition
announced on Facebook on April 12 2013. Please be aware that the
ordering is not related to the submission date or any current
status in the competition. It's simply a list to make sure we don't
forget anyone, which means if you can't find your picture in the
list and submitted it to the Facebook group earlier, please contact
me and make sure your image is included in the competition.</p>

<p><img src="/media/1670/Windows-Live-Writer_d7e727b1c426_E762_BennyOlsson_3.jpg" width="480" height="400" alt="BennyOlsson" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/><br />
 Benny Olsson</p>

<br />
<p><a
href="/media/1675/Windows-Live-Writer_d7e727b1c426_E762_OscarAndersson_2.jpg">
<img src="/media/1680/Windows-Live-Writer_d7e727b1c426_E762_OscarAndersson_thumb.jpg" width="480" height="400" alt="OscarAndersson" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Oscar Andersson</p>

<br />
<p><a
href="/media/1685/Windows-Live-Writer_d7e727b1c426_E762_JimTerneborg_2.jpg">
<img src="/media/1690/Windows-Live-Writer_d7e727b1c426_E762_JimTerneborg_thumb.jpg" width="480" height="400" alt="JimTerneborg" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Jim Terneborg</p>

<br />
<p><a
href="/media/1695/Windows-Live-Writer_d7e727b1c426_E762_MikaelQvarfordh_2.jpg">
<img src="/media/1700/Windows-Live-Writer_d7e727b1c426_E762_MikaelQvarfordh_thumb.jpg" width="480" height="428" alt="MikaelQvarfordh" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Mikael Qvarfordh</p>

<br />
<p><a
href="/media/1705/Windows-Live-Writer_d7e727b1c426_E762_RolfHolmberg_2.jpg">
<img src="/media/1710/Windows-Live-Writer_d7e727b1c426_E762_RolfHolmberg_thumb.jpg" width="480" height="400" alt="RolfHolmberg" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Rolf Holmberg</p>

<br />
<p><a
href="/media/1715/Windows-Live-Writer_d7e727b1c426_E762_PontusCarlsson_2.jpg">
<img src="/media/1720/Windows-Live-Writer_d7e727b1c426_E762_PontusCarlsson_thumb.jpg" width="480" height="400" alt="PontusCarlsson" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Pontus Carlsson</p>

<br />
<p><a
href="/media/1725/Windows-Live-Writer_d7e727b1c426_E762_HelenaFriberg_2.jpg">
<img src="/media/1730/Windows-Live-Writer_d7e727b1c426_E762_HelenaFriberg_thumb.jpg" width="480" height="400" alt="HelenaFriberg" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Helena Friberg</p>

<br />
<p><a
href="/media/1735/Windows-Live-Writer_d7e727b1c426_E762_CristianCarlsson_2.jpg">
<img src="/media/1740/Windows-Live-Writer_d7e727b1c426_E762_CristianCarlsson_thumb.jpg" width="480" height="400" alt="CristianCarlsson" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a><br />
 Cristian Carlsson</p>
]]></description></item><item><title>How to create cool lock-screen backgrounds for Windows Phone 8</title><link>http://www.coderox.se/blog/how-to-create-cool-lock-screen-backgrounds-for-windows-phone-8.aspx</link><pubDate>Fri, 12 Apr 2013 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/how-to-create-cool-lock-screen-backgrounds-for-windows-phone-8.aspx</guid><description><![CDATA[ 
<p>In this post there's no code whatsoever, it's just a simple but
nice feature of Windows Phone 8 that I think create some great
first impressions of the awesomeness of Windows Phone. It's all
about creating a wide image that then is used as background for
both the ordinary lock-screen as well as the Kids Corner
lock-screen. It will give a nice transition when swiping to the
Kids Corner.</p>

<p>First you naturally need a great image to start with. The best
result you'll get if it's at least 1536x1280 for WXGA devices and
1440x1280 for 720p devices. If you have a WVGA device you could
either go for the 1536x1280 image or at least try to find an image
that is 960x800. For this demonstrative purpose I found a very nice
photo on <a href="http://www.leksandsif.com/"
title="http://www.crestock.com/">http://www.leksandsif.com/</a>,
it's not really the dimensions I'm looking for, but close
enough.</p>

<p><img src="/media/1628/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_LeksandsIF_small_3.jpg" width="510" height="249" alt="LeksandsIF_small" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></p>

<p>I will also use <a href="http://www.getpaint.net/">Paint.Net</a>
which is free (and should actually be shipped together with
Windows. IMO it's that good).</p>

<p>I will create an image for a WXGA device and hence I like the
image to be 1536x1280. Either I crop it manually by using the
rectangle selection tool or select the Resize or Canvas Size menu,
depending on the actual image being used. The resulting image looks
like this:</p>

<p><img src="/media/1633/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_LeksandsIF_cropped_small_3.jpg" width="307" height="256" alt="LeksandsIF_cropped_small" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></p>

<p>I then copy this image to my Windows Phone Device, usually by
just connecting the device through USB and leverage explorer.</p>

<p>The last steps is to actually select this image for both the
ordinary lock screen background, and remember to align it to the
left:</p>

<p><img src="/media/1638/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_Left_3.png" width="154" height="256" alt="Left" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></p>

<p>In the KidsCorner I choose the same image, but this time aligned
to the right.</p>

<p><img src="/media/1643/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_Right_3.png" width="154" height="256" alt="Right" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></p>

<p>If the width of the image is exactly twice the width of the
screen resolution, there will be no seam between these images and
the lock screen will be very nice in result:</p>

<p><a
href="/media/1648/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_wp_ss_20130412_0005_2.png">
<img src="/media/1653/Windows-Live-Writer_How-to-create-cool-lock-screen-backgroun_1287A_wp_ss_20130412_0005_thumb.png" width="307" height="256" alt="wp_ss_20130412_0005" border="0" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;"/></a></p>

<p>How nice backgrounds can you create?</p>
]]></description></item><item><title>Designing a login screen as you like it to be!</title><link>http://www.coderox.se/blog/designing-a-login-screen-as-you-like-it-to-be!.aspx</link><pubDate>Thu, 07 Feb 2013 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/designing-a-login-screen-as-you-like-it-to-be!.aspx</guid><description><![CDATA[ 
<p><a
href="/media/1590/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_login_2.png">
<img title="login"
style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: left; padding-top: 0px; padding-left: 0px; margin: 0px 10px 0px 0px; border-left: 0px; display: inline; padding-right: 0px"
 border="0" alt="login" align="left"
src="/media/1595/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_login_thumb.png"
 width="135" height="240" /></a>So here is a very basic and very
"vanilla" looking login screen which could be leveraged for any
Windows Phone application with some customization of logos and
possibly colors as well. But there is a major issue with the
proposed design and I wonder if you can spot it without me
explaining? Can you spot it?</p>

<p>It might be hard to see but becomes very clear when you see the
next picture<a
href="/media/1600/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_issue_one_2.png">
<img title="issue_one"
style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 0px 10px; border-left: 0px; display: inline; padding-right: 0px"
 border="0" alt="issue_one" align="right"
src="/media/1605/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_issue_one_thumb.png"
 width="135" height="240" /></a> which clearly demonstrates that
when putting input controls so low on the layout grid and the
InputPane (SIP) becomes visible to allow entering text, it will
obscure some of the other controls and make it hard (almost
impossible) to navigate to the password textbox. At least you will
have to make sure to "loose" focus and allow for the SIP to
disappear before selecting the next textbox (passwordbox) to enter
text into.</p>

<p>The same issue exists in other platforms (at least iOS and
Windows 8 which I've tried) but there exists some nice looking
features to handle those issues. In Windows 8 there is a class
called InputPane which raises events we can subscribe to, and
what's interesting is that the same class exists in Windows Phone 8
as well, but the events doesn't get triggered. I've reached out to
Microsoft in the forums but still hasn't been provided with an
answer and that means I have to work around it.</p>

<p>I did search a while and found a post by <a
href="http://blogs.msdn.com/b/jaimer/archive/2010/11/05/guessing-if-the-sip-is-visible-in-a-windows-phone-application.aspx">
Jamie Rodriguez</a> that explains a method to guess if the SIP is
visible or not and that was used to create this solution which I
find most suitable for my needs:</p>

<p>In short it uses dependency properties and bindings to subscribe
to the RootFrames translation transform which takes place when the
SIP appears or disappears. Jamie clearly explains that there are
some&nbsp; edge cases in which this method doesn't always produces
the expected behavior (related to the existance of physical
keyboard on the device), but it's good enough for me.</p>

<p>My page (in this case called the MainPage) will use a similar
pattern and do two things when the SIP appears (and disappears): It
will translate transform (move in the Y-axis) the entire page a
specific amount of pixels depending on which control was focused,
and it will also make sure that the logo gets scaled to better fit
in the remaining of the page.</p>

<p><a
href="/media/1610/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_solution_one_2.png">
<img title="solution_one"
style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: left; padding-top: 0px; padding-left: 0px; margin: 0px 10px 0px 0px; border-left: 0px; display: inline; padding-right: 0px"
 border="0" alt="solution_one" align="left"
src="/media/1615/Windows-Live-Writer_Designing-a-login-screen-as-you-like-it-_C8A0_solution_one_thumb.png"
 width="135" height="240" /></a>On the left you can see the
produced result which in my opinion is a much better experience
than the one above to the right. It's very easy to transition to
the password box and as easy to then hit either login or signup (if
you don't have an account yet). You can also notice that I scaled
the logo down 50%, this is naturally optional but if you wan't to
keep your brand look and feel, it might be important that logos
don't get cropped or similar.</p>

<p>The actual translation transformation is simply done by
specifying a negative translation in the Y-axis either by 200
points (if the username has been focused) or 100 points (if the
password is in focus as the first control). The scaling of the logo
is done by using a Visual State and some animation to create an
appealing scaling effect both in and out.</p>

<p>Instead of formatting the code in this post I've chosen to
publish <a
href="https://skydrive.live.com/redir?resid=43718AEA38E6FF58!2750&amp;authkey=!AGyI9C9FAi5wrfA">
the solution on skydrive instead</a>! It's a Windows Phone 8
solution, but I don't see why it shouldn't work on earlier versions
as well.</p>

<p>When opening the solution you might notice that the code-behind
file is physically moved to a subfolder, this is because I'm also
working on sharing as much code as possible with Windows 8 but
that's not important for this post.</p>

<p>Hopefully you'll be able to use it if you have requirements on
the login controls being positions low on the display.</p>
]]></description></item><item><title>How to try and limit your Windows Store app to only use Landscape orientation</title><link>http://www.coderox.se/blog/how-to-try-and-limit-your-windows-store-app-to-only-use-landscape-orientation.aspx</link><pubDate>Thu, 27 Sep 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/how-to-try-and-limit-your-windows-store-app-to-only-use-landscape-orientation.aspx</guid><description><![CDATA[ 
<p>When developing Windows 8 apps you might decide that Portrait
mode is not useful in your app. There's lots of reasons why that
might be the case but you still need to be careful when making that
decision. The fact is that you can't really force your application
to be run ONLY in one orientation or the other, you can only tell
the runtime to "prefer" one orientation (or some). This is done by
simply opening the package.appxmanifest in the "Solution Explorer"
and in the tab "Application UI" check the appropriate checkboxes
for "Supported rotations". What this preference is actually doing
is telling devices that have hardware-support for realizing when
your device is held in either direction to disregard that option.
The user can however manually "force" the display to rotate by
using the Display Properties in the Desktop which would cause all
applications to run with a specific rotation.</p>
]]></description></item><item><title>Customize the color of an indeterminate progress bar</title><link>http://www.coderox.se/blog/customize-the-color-of-an-indeterminate-progress-bar.aspx</link><pubDate>Wed, 29 Aug 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/customize-the-color-of-an-indeterminate-progress-bar.aspx</guid><description><![CDATA[ 
<p>To keep your users aware of the fact that there's asynchronous
actions in progress, the indeterminate progress bar is a common
practice. One thing I've noticed is that when you add a ProgressBar
element to a page in your Windows 8 page, the color of the
indeterminate state is static meaning that there's no public
property that you can use to set a specific color. One approach
might be to retemplate the entire control, but it's a bit drastic
when there's actually an easier approach.</p>

<p>The secret behind the static color is a SolidColorBrush resource
named "ProgressBarIndeterminateForegroundThemeBrush" (you should
have guessed that name on your first attempt, shouldn't you <img src="/media/1509/Windows-Live-Writer_Customize-the-color-of-an-indeterminate-_EC84_wlEmoticon-smile_2.png" alt="Ler" class="wlEmoticon wlEmoticon-smile" style="border-style: none;"/> ). But this resource can't actually be
found in your project so it's not too easy to modify it. But with a
little code, there's nothing that can't be done. First you create a
little helper method in your App-class in App.xaml.cs:</p>

<pre class="csharpcode">
<span class="kwrd">private</span> <span
class="kwrd">void</span> SetupCustomColors()
{
    <span class="kwrd">if</span> (<span
class="kwrd">this</span>.Resources.ContainsKey(<span
class="str">"ProgressBarIndeterminateForegroundThemeBrush"</span>))
    {
        var brush = <span class="kwrd">this</span>.Resources[<span
class="str">"ProgressBarIndeterminateForegroundThemeBrush"</span>] <span
 class="kwrd">as</span> SolidColorBrush;
        brush.Color = Colors.Red;
    }
}
</pre>

<p>You can naturally choose any color you like as I chose Red
above. Then you just make sure this code gets called in the
OnLaunched handler, why not in the top?</p>

<pre class="csharpcode">
<span class="kwrd">protected</span> <span
class="kwrd">override</span> async <span
class="kwrd">void</span> OnLaunched(LaunchActivatedEventArgs args)
{
    SetupCustomColors();
    ...
</pre>

Running your app, you should notice that the progress bar renders
nicely with any color you choose.]]></description></item><item><title>A potential bug in Windows Phone that impacts icons with transparent PNG’s</title><link>http://www.coderox.se/blog/a-potential-bug-in-windows-phone-that-impacts-icons-with-transparent-png’s.aspx</link><pubDate>Sat, 04 Aug 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/a-potential-bug-in-windows-phone-that-impacts-icons-with-transparent-png’s.aspx</guid><description><![CDATA[ 
<p>A minor but yet irritating bug in Windows Phone (which Microsoft
also could have fixed very easy in my opinion) is apparent when
getting notified about updates to applications in the Marketplace
hub. When navigating to the list of available updates you might see
something like the screenshot below (sorry for the Swedish UI
elements):</p>

<p><a
href="/media/1477/Windows-Live-Writer_Why-transparent-PNGs_B39F_Screen%20Capture%20(2)_2.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="Screen Capture (2)" border="0" alt="Screen Capture (2)"
src="/media/1482/Windows-Live-Writer_Why-transparent-PNGs_B39F_Screen%20Capture%20(2)_thumb.jpg"
 width="146" height="242" /></a></p>

<p>That seems fine, no apparent issues here, but wait a minute, if
we change the theme to light instead and revisit the same page, the
behavior is slightly different:</p>

<p><a
href="/media/1487/Windows-Live-Writer_Why-transparent-PNGs_B39F_Screen%20Capture_2.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="Screen Capture" border="0" alt="Screen Capture"
src="/media/1492/Windows-Live-Writer_Why-transparent-PNGs_B39F_Screen%20Capture_thumb.jpg"
 width="146" height="242" /></a></p>

<p>This is naturally not something that the creators of the app
Focusin is responsible for, they have simply (as I've done myself a
lot of times) created an application icon with a white iconic
foreground and a transparent background which causes the users
accent color to shine through in the Start Screen and in the
Application List. But since the Marketplace application/hub doesn't
leverage the accent color as background element for these icons in
the update list, the experience is quite frankly not that
great.</p>

<p>This also impacts the hardware manufacturer's own list of
applications since they often use these transparent icons for their
applications.</p>

<p>My suggested solution is naturally to simply update the
DataTemplate for the updates to include a rectangle which is as
large as the icons, and fill it with the current accent color, if
this application is build with XAML/C#?</p>

<p>Another observation from these screenshots is naturally the use
of an ApplicationBar which leverages an ordinary rectangular button
instead of the recommended (and only publicly allowed) round
ones.</p>
]]></description></item><item><title>Getting started with SharpDX for Windows 8 development</title><link>http://www.coderox.se/blog/getting-started-with-sharpdx-for-windows-8-development.aspx</link><pubDate>Sun, 17 Jun 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/getting-started-with-sharpdx-for-windows-8-development.aspx</guid><description><![CDATA[ 
<p>One of the managed solutions for building DirectX games on
Windows 8 and still adhere to the Metro-application requirements
seems to be the SharpDX framework. If you've spent years educating
yourself in managed languages and the .NET runtime or maybe doesn't
feel like switching entirely to the native environment of proper
DirectX applications for Windows 8, SharpDX could be the path.
Currently there aren't a lot of tutorials to help you get started
but I hope to help there in the coming weeks or so. The first thing
you need to do is get the environment configured for development
and build and here is a short guide that I hope will help.</p>

<p>There is a couple of prerequisites that needs to be in place
before everything works but if you have time I'll guide you through
most of it. I decided to go for the GIT way in this tutorial even
though you could probably leverage .zip instead to download the
source. Why you might ask, well one of the reasons is that I've
grown quite fond of the "GitHub for Windows" application while
doing development. It's quite nice and have a very pretty
Metro-styled UI even though it doesn't install as a
Metro-application on Windows 8. Unfortunately this means that you
also need an account on GitHub as well as an account on Google if
you want to leverage one of the steps below.</p>

<h2>Install prerequisites</h2>

<p>Visual Studio 2012 - <a
title="http://msdn.microsoft.com/sv-se/windows/apps/br229516.aspx"
href="http://msdn.microsoft.com/sv-se/windows/apps/br229516.aspx">http://msdn.microsoft.com/sv-se/windows/apps/br229516.aspx</a></p>

<p>Visual Studio is naturally needed for development and the latest
release has some very nice tools for game development which I will
blog about in the future. You should absolutely go for the Ultimate
release since it got all of the tools you need and more <img
class="wlEmoticon wlEmoticon-smile"
style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none"
 alt="Smile"
src="/media/1404/Windows-Live-Writer_Getting-started-with-SharpDX_10667_wlEmoticon-smile_2.png" /></p>

<p>Windows SDK 7.1 - <a
title="http://www.microsoft.com/en-us/download/details.aspx?id=8279"
 href="http://www.microsoft.com/en-us/download/details.aspx?id=8279">
http://www.microsoft.com/en-us/download/details.aspx?id=8279</a>&nbsp;</p>

<p>Instead of downloading the separate DirectX SDK we will leverage
the Windows SDK version 7.1 to build the SharpDX library. This do
however also mean that you'll need some extra space on that
harddrive of yours.</p>

<p>GIT for Windows - <a title="http://windows.github.com/"
href="http://windows.github.com/">http://windows.github.com/</a></p>

<p>I've found that one of the easiest ways to download SharpDX,
with the code and samples, and also be certain that I get the
latest version is by cloning the GIT repository. But to be able to
do that we need to install GIT on the Windows 8 installation,
either by manually installing all the tools required or simply by
leveraging the ClickOnce installation available. Once that
installation is done I insert my credentials for GitHub and then
it's time to add the repository.</p>

<p>Update 2012-08-29: I noticed when I tried to build SharpDX on
Windows 8 RTM as described below that I also needed the .NET
Framework 3.5 Service Pack 1 in order to succed. That can be
downloaded here: <a
title="http://www.microsoft.com/en-us/download/details.aspx?id=22"
href="http://www.microsoft.com/en-us/download/details.aspx?id=22">http://www.microsoft.com/en-us/download/details.aspx?id=22</a></p>

<h2>Clone SharpDX with GIT</h2>

<p>Once you've installed and configured (with your credentials) the
GitHub for Windows installation you need to add the repository and
download all the files from <a
title="http://code.google.com/p/sharpdx/"
href="http://code.google.com/p/sharpdx/">http://code.google.com/p/sharpdx/</a>.&nbsp;
If this repository should have been published on GitHub it would
have been as easy as pressing a button on the website, but now we
need to tell the local GitHub installation where to find it. You
can use this link: <a
href="/github-windows:/openRepo/https:/code.google.com/p/sharpdx/">github-windows://openRepo/https://code.google.com/p/sharpdx</a>
which will open the GitHub application and ask for your
google-credentials. If you would like to use it the more manual way
you can simply open the Git-Shell application and type 'git clone
<a
href="https://code.google.com/p/sharpdx/'">https://code.google.com/p/sharpdx/'</a>
which will create a local clone of the source code. Give it some
time to download all of the files and prepare for the important
build step!</p>

<p><a
href="/media/1409/Windows-Live-Writer_Getting-started-with-SharpDX_10667_github-sharpdx_2.png">
<img
style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px"
 border="0" alt="github-sharpdx"
src="/media/1414/Windows-Live-Writer_Getting-started-with-SharpDX_10667_github-sharpdx_thumb.png"
 width="614" height="338" /></a></p>

<h2>Build SharpDX</h2>

<p>Once the repository is cloned, hit the Windows key and type
"SDK" which will bring up the Windows SDK 7.1 Command Prompt.
Navigate to the repository which most likely will be in your
usernames Documents folder under GitHub, in my case it's:
"c:\Users\Johan\Documents\GitHub\sharpdx\". In that directory you
type the command: "MakeSharpDX.cmd win8 build". Yes it's that
simple since the team behind the development have provided us with
all the scripts required to get started. Hit enter, and let the
compiler do it's magic. Once it's done you will have a new
directory called Bin\Win8Metro\ with the .dll required to develop
applications and games with SharpDX.</p>

<h2>Convenient step for easy access to assemblies</h2>

<p>Something that I've grown quite fond of in Windows in the latest
versions is the Libraries structure. I've made it somewhat a habit
to create a specific library called Assemblies in which I add
bin-directories for easy access while doing development. Easiest
way of doing this is to right click the Libraries folder in the
Windows Explorer and choose New | Library. Then pick a describing
name such as "Assemblies" and hit enter. Select this newly created
library and choose to Include a folder, navigate to the recently
created bin directory and select it. Now you can easily add these
assemblies without having to remember the path and also very easy
navigate to the files.</p>

<h2>Run the samples</h2>

<p>Now I navigate to the directory sharpdx\Samples\Win8\ and open
the Win8Demos solution. Most likely you'll notice that the
references to the SharpDX assemblies are messed up and hence needs
to be added to each project. Thanks to the Assemblies library
that's no big deal. Simply right click each solutions References
folder and add the appropriate references. Once you have all
references in place, choose which sample you want to run and off
you go!</p>

<p><a
href="/media/1419/Windows-Live-Writer_Getting-started-with-SharpDX_10667_sample_2.png">
<img
style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px"
 border="0" alt="sample"
src="/media/1424/Windows-Live-Writer_Getting-started-with-SharpDX_10667_sample_thumb.png"
 width="344" height="194" /></a></p>
]]></description></item><item><title>The console app of Windows Phone</title><link>http://www.coderox.se/blog/the-console-app-of-windows-phone.aspx</link><pubDate>Fri, 15 Jun 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/the-console-app-of-windows-phone.aspx</guid><description><![CDATA[ 
<p>Yesterday I decided to evaluate how far I could go in creating a
minimal application in Windows Phone, my goal was the
following:</p>

<ol>
<li>As few lines of code as possible</li>

<li>As few lines of configuration as possible</li>

<li>As few files as possible</li>

<li>As few references as possible</li>

<li>The smallest XAP-size possible</li>
</ol>

<p>The result is quite interesting and here is a short description
of the end result.</p>

<p>I ended up with a project with only three files:</p>

<ul>
<li>WMAppManifest.xml</li>

<li>App.cs</li>

<li>ApplicationIcon.png</li>
</ul>

<pre class="brush: xhtml; toolbar: false">
&lt;?xml version="1.0" 
      encoding="utf-8"?&gt;
&lt;Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" 
            AppPlatformVersion="7.1"&gt;
  &lt;App xmlns="" 
       ProductID="{30c53039-eda6-4897-898f-0274e8914fe7}" 
       Title="PhoneApp1" 
       RuntimeType="Silverlight" 
       Version="1.0.0.0" 
       Genre="apps.normal" 
       Author="PhoneApp1 author" 
       Description="Sample description" 
       Publisher="PhoneApp1"&gt;
    &lt;IconPath&gt;ApplicationIcon.png&lt;/IconPath&gt;
    &lt;Capabilities/&gt;
    &lt;Tasks&gt;
      &lt;DefaultTask Name="_default" /&gt;
    &lt;/Tasks&gt;
    &lt;Tokens&gt;
      &lt;PrimaryToken TokenID="PhoneApp1Token" 
                    TaskName="_default"&gt;
        &lt;TemplateType5&gt;
          &lt;BackgroundImageURI&gt;ApplicationIcon.png&lt;/BackgroundImageURI&gt;
          &lt;Count&gt;0&lt;/Count&gt;
          &lt;Title&gt;PhoneApp1&lt;/Title&gt;
        &lt;/TemplateType5&gt;
      &lt;/PrimaryToken&gt;
    &lt;/Tokens&gt;
  &lt;/App&gt;
&lt;/Deployment&gt;
</pre>

<p>The code above is the entire WMAppManifest.xml. I've removed as
much I think is possible.</p>

<pre class="brush: c-sharp; toolbar: false">
using System.Windows;
using System.Windows.Controls;
using Microsoft.Phone.Controls;

namespace PhoneApp1
{
    public class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            var grid = new Grid();
            grid.Children.Add(new TextBlock { Text = "hello world" });
            Content = grid;
        }
    }

    public class App : Application
    {
        public App()
        {
            var frame = new PhoneApplicationFrame();
            frame.Content = new MainPage();
            RootVisual = frame;
        }
    }
}
</pre>

<p>And here is all of the code for the application. I've removed
all XAML-code and use "code-behind" for all creation. The
ApplicationIcon.png file is a simple 1x1 pixel image which is used
both for application icon and tile-background. The end result
became:</p>

<ol>
<li>As few lines of code as possible - 27 lines (including some
empty lines and line breaks&nbsp; for readability)</li>

<li>As few lines of configuration as possible - 30 lines (having
all attributes and elements on separate lines, 19 if I keep
attributes on same line as beginning element)</li>

<li>As few files as possible - 3 files</li>

<li>As few references as possible - 5 references ( Microsoft.Phone,
mscorlib, system, System.Core, System.Windows)</li>

<li>The smallest XAP-size possible - 2,74 kb</li>
</ol>
]]></description></item><item><title>The console app of Windows Phone, now in XAML</title><link>http://www.coderox.se/blog/the-console-app-of-windows-phone,-now-in-xaml.aspx</link><pubDate>Fri, 15 Jun 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/the-console-app-of-windows-phone,-now-in-xaml.aspx</guid><description><![CDATA[ 
<p>So this is a short update (or actually a new version) of <a
href="/blog/the-console-app-of-windows-phone">the previous
post</a>. I wanted to see if I could leverage XAML and actually
found a similar solution with less code, but just slightly larger
in file-size:</p>

<p>I added a file called App.xaml and added the following code:</p>

<pre class="brush: xhtml; toolbar: false">
&lt;Application x:Class="PhoneApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"&gt;
    &lt;Application.RootVisual&gt;
        &lt;phone:PhoneApplicationPage&gt;
            &lt;Grid&gt;
                &lt;TextBlock Text="hello world" 
                           FontFamily="Segoe WP" 
                           Foreground="White" 
                           FontSize="14"/&gt;
            &lt;/Grid&gt;
        &lt;/phone:PhoneApplicationPage&gt;
    &lt;/Application.RootVisual&gt;
&lt;/Application&gt;
</pre>

<p>Then I updated the App.cs file and it now contains only the
following code:</p>

<pre class="brush: c-sharp; toolbar: false">
namespace PhoneApp1 {
    public partial class App : System.Windows.Application {
        public App() {
            InitializeComponent();
        }
    }
}
</pre>

<p>The rest of the application is the same as before. The end
result:</p>

<ol>
<li>As few lines of code as possible - 15 lines of XAML and 7 lines
of C# (including some empty lines and line breaks for
readability)</li>

<li>As few lines of configuration as possible - 30 lines (having
all attributes and elements on separate lines, 19 if I keep
attributes on same line as beginning element)</li>

<li>As few files as possible - 4 files</li>

<li>As few references as possible - 5 references ( Microsoft.Phone,
mscorlib, system, System.Core, System.Windows)</li>

<li>The smallest XAP-size possible - 2,99 kb</li>
</ol>
]]></description></item><item><title>Coderox.se migrated to Umbraco CMS</title><link>http://www.coderox.se/blog/coderoxse-migrated-to-umbraco-cms.aspx</link><pubDate>Fri, 15 Jun 2012 00:00:00 GMT</pubDate><guid>http://www.coderox.se/blog/coderoxse-migrated-to-umbraco-cms.aspx</guid><description><![CDATA[ 
<p>The <a href="">www.coderox.se</a> website have just been
migrated to use Umbraco CMS. Umbraco was chosen based on its strong
community and other successful implementations.</p>

<p>To handle the migration and development process, Coderox also
leveraged the excellent services of <a
href="http://www.ontrax.se">www.ontrax.se</a>.</p>

<p>Hopefully the website will now better serve it's purpose in the
future and also be more flexible and prepared for possible
extensions and additions.</p>
]]></description></item></channel></rss>
