Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The automatically generated code does not work in axaml files #506

Open
jqrv opened this issue Dec 3, 2024 · 0 comments
Open

The automatically generated code does not work in axaml files #506

jqrv opened this issue Dec 3, 2024 · 0 comments
Labels

Comments

@jqrv
Copy link

jqrv commented Dec 3, 2024

Describe the bug

Just a sample:

<Button x:Name="BtnTest" Click=""/>

When you focus on the Click event, a menu appear to allow you to add an event handler. However, this menu does not function correctly. The issues are as follows:

  1. It creates a function named Button_Click instead of BtnTest_Click, which is inconsistent with the naming convention based on the button's name.
  2. The generated Button_Click function is not actually created in the code-behind file.
  3. You cannot navigate to the Button_Click function using either Ctrl+Left Mouse Click or through a hotkey.

To Reproduce

To improve clarity and maintainability, it would be better if the automatically generated method followed the naming convention of the control, and was properly implemented in the code-behind for easy navigation.

AvaloniaVS plugin version

11.8

Avalonia version

11.2

Visual Studio version

17.12.1

Relevant log output

sorry, there is no message to send.

Additional context

No response

@jqrv jqrv added the bug label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant