Browse Source

docs: Don't override InitializeComponent (#71)

pull/10407/head
Artyom V. Gorchakov 4 years ago
committed by GitHub
parent
commit
a2e7ba4ad2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md

2
README.md

@ -84,6 +84,8 @@ public partial class SignUpView : ReactiveWindow<SignUpViewModel>
### Advanced Usage
> Never keep a method named `InitializeComponent` in your code-behind view class if you are using the generator with `AvaloniaNameGeneratorBehavior` set to `InitializeComponent` (this is the default value). The private `InitializeComponent` method declared in your code-behind class hides the `InitializeComponent` method generated by `Avalonia.NameGenerator`, see [Issue 69](https://github.com/AvaloniaUI/Avalonia.NameGenerator/issues/69). If you wish to use your own `InitializeComponent` method (not the generated one), set `AvaloniaNameGeneratorBehavior` to `OnlyProperties`.
The `x:Name` generator can be configured via MsBuild properties that you can put into your C# project file (`.csproj`). Using such options, you can configure the generator behavior, the default field modifier, namespace and path filters. The generator supports the following options:
- `AvaloniaNameGeneratorBehavior`

Loading…
Cancel
Save