Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 adding _1 to click event handler

Visual Studio 2012 is adding _1 to any click event handler I create in XAML

ie: I create a new WPF solution, drop a button, in XAML give button a Name, type 'click' and intellisense brings up 'New Event Handler', I click it, it creates event BUT its named btn_test_click_1

In VS2010 we don't get _1, how can I stop this happening its driving me mad?

UPDATE I can confirm this has been fixed with VS2012 Update 2

like image 712
tinmac Avatar asked Jan 10 '13 14:01

tinmac


People also ask

How do you create event handlers with visual studio net?

From the Class Name drop-down list at the top of the Code Editor, select the object that you want to create an event handler for. From the Method Name drop-down list at the top of the Code Editor, select the event. Visual Studio creates the event handler and moves the insertion point to the newly created event handler.

Are event handlers also subroutines?

Event handlers are procedures that are called when a corresponding event occurs. You can use any valid subroutine with a matching signature as an event handler. You cannot use a function as an event handler, however, because it cannot return a value to the event source.


1 Answers

I can confirm this has been fixed with VS2012 Update 2

like image 112
tinmac Avatar answered Oct 24 '22 23:10

tinmac