Git for .NET developers @ Boston Code Camp 23

Thanks to all the organizers and sponsors and to everyone for attending! Special thanks to all the volunteer Changesets/Commits for helping out with the experimental demo! If you want to play around go to the demo project on GitHub. Feel free to clone, fork, submit pull requests, or let me know if you want to be added as contributor to try out anything without fear of breaking a real project....

March 21, 2015 · 2 min · 214 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

Roslyn and the future of .NET languages – Language Features

Boston Code Camp 22 materials: Slides | Language Features Demo Code | Post on Extensions The new Visual Studio 2015 Roslyn language features include a grab bag of nice changes to help make code more compact and readable. This isn’t an exhaustive list but some of my favorites. Getter only and initialized auto-properties public string Name { get; } = "John"; This is a much simplified way to create readonly properties, which previously required a full property with a backing field declared as readonly....

November 22, 2014 · 2 min · 355 words · John Bowen

Roslyn and the future of .NET languages – Extensions

Boston Code Camp 22 materials: Slides | Extension Demo Code | Post on Language Features With the new code editors in Visual Studio 2015 now written around the Roslyn compiler a whole new level of extensibility is available both for built in features and user created extensions. If you’ve worked with Visual Studio extensibility before a Roslyn extension can a big improvement both in ease of coding and end user experience....

November 22, 2014 · 2 min · 414 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