One of the best practices in WPF is to implement the logic behind buttons and menu items as a command instead of a simple event handler. In this article, we review several ways to implement a WPF command, focusing on strategies that minimize the amount of boilerplate code.
This article explores the use of the ICommand interface in a temperature monitor application, contrasting manual and automated approaches using Metalama. Initially, it details how to manually create commands for operating a temperature sensor, highlighting the repetitive coding and potential for errors. Then, it introduces Metalama and its [Command] aspect to automatically generates the necessa...
As the .NET Conf 2024 approaches, we’ve made significant progress in supporting .NET 9.0 and C# 13 with both Metalama and PostSharp. But that’s not all. We’ve also filled usability gaps in introduced types and added several minor features. October was buzzing with community interactions: we hosted an event with Andrea Angella from Productive C#, exchanged blog posts with GoatReview, and publish...
Having previously written about implementing caching aspects with Fody, I wanted to share my experience switching to Metalama and why I believe it offers significant advantages for Metalama users looking to implement caching in their applications.
In .NET desktop and mobile, the INotifyPropertyChanged interface is typically implemented by data objects (i.e., the model layer) to notify the view layer when something changes and the UI needs updating. Implementing this interface is straightforward for trivial cases like automatic properties, but it becomes more complex for computed properties or those that depend on other objects. In this a...