Event List in Visual Studio 2015

Using VS2013, it was possible, at least with VB.NET, to double-click the control, and then a default event will appear in the code file. Above this was a drop-down list of other possible events for this control.

Now I work in VS2015 and C #, but this list is not. I can still double-click the control to get the default event, but I cannot add another event. I do not think I should edit the constructor file.

How do I do it now? Do I need to add events to the code file now?

for example, I want to be able to delete a file in my Windows application. So I need to add an event for this.

+4
source share
3 answers

Winforms:
 enter image description here

Wpf: To see the properties window:
enter image description here

enter image description here

+7
source

Using VS2013, you could, at least with VB.NET, double-click on the control, and then the default event will appear in the code file. Above this was a drop-down list of other possible events for this control.

This is called the navigation bar . You can enable / disable it in the Tools → Options → Text Editor → {Select Language} → Navigation Bar menu.

BUT ... the navigation bar behaves differently in C # than in VB.Net. It will not do what you want in C #, sorry!

IDE #, , , "" " ", , .

#, , , VB.Net. # , IDE . , :

Button btn = new Button();

Click(), :

btn.Click +=

= {Tab}, :

    private void Btn_Click(object sender, EventArgs e)
    {
        throw new NotImplementedException();
    }
+4

Button xaml, , .

0

Source: https://habr.com/ru/post/1609686/


All Articles