Visual Studio 2015 XAML debugging tools from a Snoop perspective

*Update for new RC features: changes-to-visual-studio-2015-xaml-debugging-tools-in-rc Anyone who has done a significant amount of work in WPF is probably familiar with XAML debugging tools like Snoop. A few other tools have come along since with similar functionality that also works across different XAML platforms, but for WPF Snoop still packs a punch. Finally, after almost a decade, Visual Studio is getting the kind of visual tree debugging that’s been an essential part of XAML development (and it will work on all XAML platforms)....

March 29, 2015 · 5 min · 948 words · John Bowen

Breaking XAML Stretch with StackPanel

A StackPanel works great as far as stretching in one direction (opposite the orientation): it behaves just like a Star sized Grid with one row or column. The problem happens in the direction of the StackPanel’s Orientation, where it behaves as an infinitely sized container. This results in the StackPanel passing an available width or height of Infinity to each of its children, which for some types of elements can make it difficult to size properly....

January 11, 2015 · 4 min · 724 words · John Bowen

Optimizing INotifyPropertyChanged for performance vs convenience

One of the central aspects of implementing the MVVM pattern is the ubiquitous invocations of INotifyPropertyChanged.PropertyChanged in property setters. The simplest version that is commonly seen just passes the property name as a string and builds an EventArgs object in the shared NotifyPropertyChanged method. public int MyProperty { get { return _myProperty; } set { if (_myProperty == value) return; _myProperty = value; NotifyPropertyChanged("MyProperty"); } } Over time, the verbosity of the basic pattern boilerplate has been reduced in various ways, usually with one of two goals: shorter code or stronger links between the event args and the name of the property itself....

November 17, 2014 · 4 min · 652 words · John Bowen

Digesting the flood of announcements from Visual Studio Connect()

Day 1 of the Visual Studio Connect() event today was packed with announcements, some of which are pretty dramatic changes to the Microsoft development landscape. The obvious headline announcement which everyone is talking about (and will likely continue to) is the Open Sourcing and Mac/Linux support for the .NET Core Framework. This, along with the NuGet deployment mechanism for app-local copies of the framework, are going to be a huge shift in how ....

November 12, 2014 · 2 min · 360 words · John Bowen