Doc is missing info about Routing Effect ID needing to be removed
- Dominant language
- No language data
- Stars
- 282
- Forks
- 265
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
### Type of issue
Missing information
### Description
[Enter feedback here]
We recently found that some of our Effects that we migrated from Xamarin.Forms to .NET MAUI just weren't working at all. We followed all the steps in this article. Our effects would not display the correct padding on a View it was applied to, or respond to touch actions specified in the Effect.
We were able to fix the issue by removing the unique ID we were passing to the base constructor for the Effects that were inheriting from the RoutingEffect class.
I believe the precursor to this doc was this wiki page: https://github.com/dotnet/maui/wiki/Migrating-Xamarin.Forms-Effects
This shows an example of a Xamarin.Forms Effect that inherits from RoutingEffect. It calls the RoutingEffect base constructor and passes a unique ID as a string parameter:
```
public class FocusEffect : RoutingEffect
{
public FocusEffect () : base ($"Effects.{nameof(FocusEffect)}")
{
}
}
```
The example showing the migrated effect code for MAUI does not include passing this ID, `$"Effects.{nameof(FocusEffect)}"` to the base constructor, but the article also doesn't mention it should be removed.
This seems to be an important step to migrating RoutingEffect, so I wanted to bring it up. I'm not 100% sure which type of RoutingEffects need to have this ID removed. It seemed that some of our Effects did work with this, while others did not.
Some specific examples from our codebase:
### Page URL
https://learn.microsoft.com/en-us/dotnet/maui/migration/effects?view=net-maui-8.0&viewFallbackFrom=net-maui-7.0
### Content source URL
https://github.com/dotnet/docs-maui/blob/main/docs/migration/effects.md
### Document Version Independent Id
7d2c478e-c609-2db1-c61b-7e768affcee9
### Article author
@davidbritch
### Metadata
* ID: 7d2c478e-c609-2db1-c61b-7e768affcee9
* Service: **dotnet-mobile**
* Sub-service: **dotnet-maui**
Contributor guide
Assessment
This issue has not been assessed yet.