Launching Windows Store Apps Programmatically

Saturday, October 24, 2015

Windows Apps (a.k.a. Store apps or Metro apps) run in a dedicated sandbox, providing “extra protection” from outside apps and OS as opposed to classic Windows applications. One consequence of this is that launching a Windows App using a classic CreateProcess call will generally fail. For example, if we run the Weather app that comes with Windows and look at the command line that was used to start the process (e.g. using Task Manager or Process Explorer), this is what we see: "C:\Program Files\WindowsApps\Microsoft.BingWeather_4.6.169.0_x86__8wekyb3d8bbwe\Microsoft.Msn.Weather.exe"      -ServerName:App.AppX2m6wj6jceb8yq7ppx1b3drf7yy51ha6f.mca Clearly, there...
2 comments

Windows 10 Developer Readiness Live Session

Sunday, May 31, 2015

Next week, on June 8th, I’ll be presenting a live session (with my colleague Alon Fliess) on developing with the new Windows Universal Platform on Windows 10, focusing on apps with C# and XAML. This is just one of several such sessions happening all over the world on the week of June 8-12 by MVPs. My session will be in Hebrew with Q&A interactively possible and encouraged. You are all invited! Learn about Windows 10 and the universal windows platform with Visual Studio 2015 with slides and code samples. Register for the session here. The main page for all...
no comments

Build 2015 Impressions

Saturday, May 2, 2015

The Build 2015 conference just ended. It was one of the most important Build/PDC conferences since the Build/PDC inception. Most (if not all) sessions are available on channel 9, and even those that attended Build (myself included) were in only a fraction of the sessions since there were about 10 of them in each time slot. To get a good overview of the various announcements and get links to important downloads, you should head to this post in the Visual Studio blog. What follows are my own impressions and opinions on some of what I experienced at this year’s...
no comments

Building a Cross Platform Game with MonoGame – Part 2

Thursday, March 19, 2015

In the first part we’ve seen how to install MonoGame for use with Visual Studio and how to create a new project. We’ve seen some of the boilerplate code created by the project wizard and discussed briefly the game asset file. We are now ready to put our own special stuff into the game. We’ll start by doing some cleanup, as our project has the default spinning cube. I’ve also renamed the Game class from Game1 to InavdersGame and the C# file correspondingly. Open InvadersGame.cs and remove all the code in the Draw method except the Clear call:protected override void Draw(GameTime...
one comment

Building a Cross Platform 2D Game with MonoGame (Part 1)

Thursday, March 12, 2015

Ever since Microsoft ditched the XNA framework (for whatever reason), it didn’t provide any viable alternative for .NET developers. Microsoft attempted to encourage developers to switch to native DirectX to do game development (and other apps that would otherwise benefit from XNA). But DirectX is not a real alternative “out of the box” for .NET (and even C++) developers; DirectX is very low-level, and it’s almost impractical to create a full-fledged game with DirectX directly; DirectX is a great base for game engines. For writing an actual game, developers typically use some framework that sits on top of...
2 comments

File Open Picker in Windows Phone 8.1

Wednesday, February 18, 2015

The Windows 8 Store model introduced the FileOpenPicker class, which is kind of the modern replacement for the classic Windows open file dialog. Technically, it’s more than that – it can get files from “virtual” locations such as Facebook and OneDrive; and besides, it looks much better than the classic open file dialog. Showing the FileOpenPicker is just a matter of calling PickSingleFileAsync or PickMultipleFilesAsync and awaiting for the result: var picker = new FileOpenPicker {         FileTypeFilter = { ".jpg", ".png" },         ViewMode = PickerViewMode.Thumbnail }; var file = await picker.PickSingleFileAsync();   When Universal apps came along, it...
no comments

Introduction to Win2D

Wednesday, November 19, 2014

The Windows Runtime UI stack uses XAML for general 2D layout and graphics. It provides various controls, such as TextBox, ItemsControl and DatePicker. It even provides shape-like elements such as Line, Ellipse, Rectangle and Path. However, the XAML layout and rendering engine, while flexible, may not be performant enough for certain kind of applications and games. Also, it does not support general “drawing” functions (WPF for example, does provide that with the DrawingContext class). Win2D is a new Windows Runtime library that is currently in development by Microsoft that provides a WinRT wrapper over Direct2D. Direct2D is a DirectX...
3 comments

“Universal” Mandelbrot

Wednesday, September 10, 2014

Those of you following my blog may have noticed a somewhat “obsessiveness” with the Mandelbrot Set. In the past, I’ve created a WPF version and a C++ AMP version (and privately a few more versions). I thought it was high time to write yet another version as a “Universal” app, running on Windows 8.1 and Windows Phone 8.1, while sharing as much code and XAML as possible. My approach was to port the WPF version to universal. First, I created a blank new Universal App project in C#: This results in 3 projects being created – Mandelbrot.Windows, Mandelbrot.WindowsPhone...
one comment

Tip: Accessing Binary Resources in Portable Class Library

Sunday, August 10, 2014

Portable Class Libraries (PCLs) provide a nice way to share code by allowing the library to be referenced from a number of different types of projects. As I’ve blogged before, when targeting Windows Phone 8.1 and Windows 8.1 the common surface for the PCL grows significantly and even allows sharing of XAML and other UI-related types. However, when targeting more frameworks such as the desktop .NET, the common surface drops significantly. One of the things we may want to do is to add some binary resource (image, XML file, etc.) and process it as part of the PCL. This...
no comments

Create a second accent color in Windows Phone 8.1 (kinda)

Saturday, May 17, 2014

Windows Phone has the notion of an “accent color” that appears as the default background for transparent tile areas on the home screen; apps use it extensively for various purposes as they assume the user really likes that color. Personally, I like darker colors with the dark theme on the home screen, as the white text is clear and pleasant. However, apps that use the accent color for text on a black background make the text hard to read sometimes. In these cases I wish I had selected a brighter accent color. With Windows Phone 8.1 we can actually...
no comments