Introduction to Win2D

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...
no comments

WRL Class Library Template for Windows Phone 8.1

October 6, 2014

The Windows Runtime Library (WRL) is a C++ class library that can be used to author Windows Runtime components in standard C++, without resorting to the C++/CX extensions. The flip side is that it’s much more verbose than C++/CX, looks somewhat similar to authoring COM components with the Active Template Library (ATL). Also, WRL can be used to consume WinRT types without any special extensions. Visual Studio does not provide a project template out of the box for authoring WinRT components with WRL. The team at Microsoft, however, created such a template back in the Windows 8, Visual Studio...
no comments

Windows 10 Preview – First Impressions

October 1, 2014

The curtain is lifted… Microsoft’s new OS is revealed in all its preview – Windows 10. Yes, the name is unexpected. Better guesses were “Windows 9”, “Windows One”, just “Windows” and probably a few others. I admit I don’t like the “10” name. Even-numbered Windows names/versions lately tend to have issues… To install Windows 10 all you need to do is go to http://preview.windows.com , register as an “insider” (which really means anyone), download the bits and install. Of course, I would not use it on a production system. I installed mine on a Hyper-V virtual machine (I’ve used...
2 comments

“Universal” Mandelbrot

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...
no comments

Tip: Accessing Binary Resources in Portable Class Library

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

Data Binding for a WPF TreeView

July 12, 2014

Although the Windows Runtime (WinRT) is all the hype these days (in the Microsoft world at least), WPF is still in heavy use in the “desktop apps” space. To me, WPF is the inspiration for everything XAML-based that came out after it – mainly Silverlight and WinRT. WinRT (and Silverlight before it) still plays catchup to all the WPF features (although WinRT has some nice features not present in the current version of WPF) – there’s even a “user voice” asking to bring some of WPF’s features to WinRT, such as multi bindings, binding in style setters, data typed...
no comments

My DevGeekWeek 2014 Session Demos

June 22, 2014

Today I presented three sessions in the DevGeekWeek 2014 conference held in the Daniel Hotel in Hertzliya (Israel). The session were part of the Core .NET and C# track. My three sessions were on the Task Parallel Library (1), Async programming with C# 5.0 (2) and C# Tips with some discussion of C# 6.0 features (3). Another session was given by my colleague, Igal Tabachnik on building compiler extensions with Roslyn. Thank you all for attending, although I know it was challenging in the first half day, at least, with the A/C cranked up (or should I say...
no comments

DevGeekWeek 2014

May 26, 2014

The DevGeekWeek 2014 conference is scheduled for the 22-26 of June and will be held in the Daniel Hotel in Hertzelia (Israel). This is a developer oriented conference with a lot of great sessions and topics. We at CodeValue are managing and delivering the .NET track (officially called “Extreme .NET with C#”) consisting of 6 full day sessions. There are other tracks covering things like mobile development, Java based development, User Experience, Database development, and more. I am managing the CodeValue sessions along with my colleague Alon Fliess. Our track consists of the following full day...
2 comments

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

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

Universal Apps in Windows 8.1 and Windows Phone 8.1

April 20, 2014

Now that the Build 2014 conference is over and the dust begins to settle, it’s time to look at what we’ve got. And there’s plenty to look at. In this post I’d like to take a closer look at Universal apps, their structure and possible future. The before Before these so-called “universal” apps, creating apps for Windows 8.x Store and Windows Phone 8 was mostly a two-app project. Sure, some logic code could be shared via Portable Class Libraries (PCL), but the common surface of PCLs was too small, leading to many #if/#endif statements. Also, sharing XAML was extremely...
one comment