From bef98d1d1274c219a62b71429be62fdb1fd7fc66 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 10 Aug 2024 09:08:33 +1000 Subject: [PATCH] Update readme.md --- readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/readme.md b/readme.md index 37328e53..e2e2ebe2 100644 --- a/readme.md +++ b/readme.md @@ -12,10 +12,12 @@ Injects code which raises the [`PropertyChanged` event](https://msdn.microsoft.c **It is expected that all developers using Fody [become a Patron on OpenCollective](https://opencollective.com/fody/contribute/patron-3059). [See Licensing/Patron FAQ](https://github.com/Fody/Home/blob/master/pages/licensing-patron-faq.md) for more information.** + ## Usage See also [Fody usage](https://github.com/Fody/Home/blob/master/pages/usage.md). + ### NuGet installation Install the [PropertyChanged.Fody NuGet package](https://nuget.org/packages/PropertyChanged.Fody/) and update the [Fody NuGet package](https://nuget.org/packages/Fody/): @@ -27,6 +29,7 @@ PM> Install-Package PropertyChanged.Fody The `Install-Package Fody` is required since NuGet always defaults to the oldest, and most buggy, version of any dependency. + ### Add to FodyWeavers.xml Add `` to [FodyWeavers.xml](https://github.com/Fody/Home/blob/master/pages/usage.md#add-fodyweaversxml) @@ -37,6 +40,7 @@ Add `` to [FodyWeavers.xml](https://github.com/Fody/Home/blob/ ``` + ## Overview **NOTE: All classes that implement `INotifyPropertyChanged` will have notification code injected into property setters.** @@ -109,6 +113,7 @@ internal static class InternalEventArgsCache (the actual injected type and method names are different) + ## Code Generator Starting with version 4 PropertyChanged.Fody ships with a C# code generator that can even more simplify your code by generating @@ -164,6 +169,7 @@ You can configure the code generator via properties in your project file: - *IsCodeGeneratorDisabled*: Set to `true` to switch off the code generator. - *EventInvokerName*: Change the name of the event invoker method from `OnPropertyChanged` to your favorite name. + ### Workaround for WPF projects targeting multiple frameworks: WPF projects targeting multiple frameworks may fail during the compilation of the `*_wpftmp.csproj` with @@ -189,6 +195,7 @@ This can be fixed by adding this build target to your project: --- + ## Notes - **Dependent properties** — In the above sample, the getter for `FullName` depends on the getters for `GivenName` and `FamilyName`. Therefore, when either `GivenName` or `FamilyName` is set, `PropertyChanged` is raised for `FullName` as well. This behavior can be configured manually using the [`AlsoNotifyFor` attribute](https://github.com/Fody/PropertyChanged/wiki/Attributes#alsonotifyforattribute) on the source property, or the [`DependsOn` attribute](https://github.com/Fody/PropertyChanged/wiki/Attributes#dependsonattribute) on the target property). @@ -207,6 +214,7 @@ This can be fixed by adding this build target to your project: For more information, see the [wiki pages](https://github.com/Fody/PropertyChanged/wiki). + ## Icon Icon courtesy of [The Noun Project](https://thenounproject.com)