How should the Next WPF Version Look Like?

June 26, 2015

Microsoft has announced the next WPF version, as part of the new .NET 4.6. I’ve heard the news that WPF is back in development and it made me pretty happy; it was about time! A few months back, Microsoft started to talk about what to expect in this new update. Unfortunately, I was disappointed to see that there’s really nothing new. The feature list is mostly performance enhancements (which should have been done a long time ago), allowing interop with Direct3D 11/12 instead of Direct3D 9 (this was overdue as well), some improvements to the default control templates and...
one comment

Windows 10 Developer Readiness Live Session

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

Using CLRMD to replace KD/CDB/NTSD and maybe WinDbg?

May 14, 2015

I’ve been using the WinDbg low level debugger for several years now when things get hairy such as looking inside a .NET process and searching for memory leaks and other nasties. Or investigating a dump file, sometimes a kernel crash dump file (created because of the infamous “blue screen of death”), or when faced with a production system where Visual Studio does not (and will not) exist. Anyone who’s ever used WinDbg (or its equivalent console based debuggers – CDB, NTSD and KD) knows the feeling of wanting to get at some information but not always sure how...
no comments

Build 2015 Impressions

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

Making COM Collections Easily Consumable by .NET

April 13, 2015

In .NET, developers are accustomed to using constructs such as foreach to iterate over collections. In .NET, “Collection” refers to two types of objects: 1. Those that implement the IEnumerable or IEnumerable<T> interface.2. objects that don’t implement these interfaces, but have a method called GetEnumerator that return some object that has the following: a. Has a MoveNext method that returns a boolean and accepts nothing.b. Has a Current property that returns the type of object that the collection provides. Notice that no IEnumerator interface implementation is required. All this means that the (e.g. C#) compiler does pattern matching...
no comments

Building a Cross Platform Game with MonoGame – Part 2

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)

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...
one comment

File Open Picker in Windows Phone 8.1

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

Tip: Enable Kernel Debug output on Vista and up

December 17, 2014

Those writing device drivers, or are interested in seeing outputs from a kernel driver’s calls to the KdPrint macro or the DbgPrint function may find that the messages don’t appear on Windows Vista or newer versions of Windows. Even when using a tool such as DebugView (from SysInternals), running with administrative privileges, with kernel capture turned on, nothing seem to appear from expected drivers: The reason is that in Vista and up kernel output is conditional, based on some flags that can be set in KdPrintEx, DbgPrintEx, etc. A complete explanation can be found in the MS...
2 comments

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