I'm trying to capture the component and Show or Hide him on @onmouseover, but it gives me an error of:
Error CS0029 Cannot implicitly convert type 'Microsoft.AspNetCore.Components.ElementReference' to '%ComponentName%'. And it's not reconizing the Show method.
Meaning, the compiler is seeing the Component as 'Microsoft.AspNetCore.Components.ElementReference' which doesn't have a Show method.
Am i doing something wrong?
โ Do not edit this section. It is required for docs.microsoft.com โ GitHub issue linking.
@caiohoffmann Provide more info: Show the component. What's its name (file name)? Where is it in the app (what folder)? What SDK are you on (dotnet --version)? What version of VS? FYI: We're all ๐๐๐
๐ right now on 3.0 updates. Your best bet for a fast answer is probably to open an issue on Stack Overflow or a support chat, such as Slack or Gitter.
[EDIT by guardrex to fix code block]
In my TaskBlock.razor:
<BlockMenu @ref="Menu" />
@code {
private MenuBlock Menu;
private void ShowMenu()
{
Menu.Show();
}
}
I'll open an issue on StackOverflow either way!
Did you mean ...
private BlockMenu Menu;
Yes!
Thanks, sorry for that!