Bug 43203 - Event handlers are duplicated across all controls
Summary: Event handlers are duplicated across all controls
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.1.2 (C7SR1)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 42736 ()
Depends on:
Blocks:
 
Reported: 2016-08-09 21:46 UTC by reemfz
Modified: 2016-09-02 16:13 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description reemfz 2016-08-09 21:46:50 UTC
Hi,

I discovered another bug in the iOS designer in VS.

problem description:
declaring an event handler in one control is replicated across all the controls in the view controller 

steps to reproduce:
1. drag few controls (buttons) into the view controller.
2. From properties, click on the Events tab and declare an event.
3. click on a different control and notice that the same event is also present in that control (or any other ones in the view controller).

actual:
when an event handler is added via the designer, it gets replicated across all the controls in the view controller.

expected:
event handlers should be control's specific. each control (view) needs to have its own set of control. similar to how xcode declares Outlets and Actions. 
if you want to hook up the same handle to multiple controls of the same type, it needs to be done explicitly. 

Version:

Xamarin iOS 9.8.2.22
Xamarin VS 4.1.2.18
Comment 1 Alan McGovern 2016-08-10 10:21:11 UTC
This should've been fixed as part of https://github.com/xamarin/md-addins/commit/414dc49d7964c7a66c793da718785b7b9c329d96. The issue was the property panel was not updating correctly so it did not accurately reflect the actions associated with the selected control. It should be fixed as part of the next cycle8 release.
Comment 2 Alan McGovern 2016-09-02 16:13:10 UTC
*** Bug 42736 has been marked as a duplicate of this bug. ***