Skip to content

Release v1.6.0

Compare
Choose a tag to compare
@IGood IGood released this 06 Jul 23:43
· 15 commits to main since this release
1ea6309
  • BPZ does routed events!
    Similar to dependency properties, routed events will be registered & implemented when static read-only fields are setup correctly.
    The type of the event handler & the routing strategy can be specified if necessary (see readme for more details).

Write this, not that:

// 👩‍💻 👍 Write this (using BPZ):
public static readonly RoutedEvent SeasonChangedEvent = Gen.SeasonChanged<string>();

// 👩‍💻 👎 Not that (idiomatic implementation):
public static readonly RoutedEvent SeasonChangedEvent = EventManager.RegisterRoutedEvent(nameof(SeasonChanged), RoutingStrategy.Direct, typeof(RoutedPropertyChangedEventHandler<string>), typeof(MyClass));
public event RoutedPropertyChangedEventHandler<string> SeasonChanged
{
    add => this.AddHandler(FooChangedEvent, value);
    remove => this.RemoveHandler(FooChangedEvent, value);
}