Bug 26657 - Can't add UISegmentedControl to a Toolbar in Visual Studio only.
Summary: Can't add UISegmentedControl to a Toolbar in Visual Studio only.
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 3.9
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2015-02-02 16:52 UTC by Jon Goldberger [MSFT]
Modified: 2015-02-18 19:01 UTC (History)
8 users (show)

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

Logs (2.04 MB, application/zip)
2015-02-02 16:52 UTC, Jon Goldberger [MSFT]

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:

Description Jon Goldberger [MSFT] 2015-02-02 16:52:29 UTC
Created attachment 9607 [details]

## Description

When adding a UISegmentedControl to a toolbar, whether a discrete UIToolbar added to the layout or the toolbar that is automatically added with a Navigation page. 

## steps to reproduce:

1. Create a new iOS Unified project in Visual Studio
2. Open the storyboard file in iOS Designer.
3. Drag a UIToolbar onto the view.
4. Drag a UISegmentedController into the UIToolbar added in step 3.

Expected result: There will now be a UISegmentedControl in the toolbar.

Actual result: The UISegmentedControl disappears after releasing the mouse button. 

## Note:

The same does not occur in Xamarin Studio on the Mac. Log files are attached.
Comment 1 Alan McGovern 2015-02-02 17:37:25 UTC
This looks like an Xwt.Wpf issue.

Lluis, are you aware of any recent patches in Xwt which might fix or cause this? https://gist.github.com/alanmcgovern/b0699904cc6ef4b1afce
Comment 2 Alan McGovern 2015-02-13 07:19:51 UTC
*** Bug 27009 has been marked as a duplicate of this bug. ***
Comment 3 Alan McGovern 2015-02-13 08:03:30 UTC
One crasher is fixed, which was the issue adding UISegmentedControl to UIToolBar. There is also a separate issue in the outline panel triggered by something else. That is still under investigation.
Comment 4 Alan McGovern 2015-02-13 09:23:16 UTC
This bug has evidence of bug #27009, but i'll reopen bug #27009 to deal with the outline crash and close this bug as it deals with the specific issue of UISegmentedControl
Comment 5 Shruti 2015-02-16 08:49:00 UTC
I have checked this issue with following builds:

Windows Info: 

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin   3.9.325.0 (96e7814)
Xamarin.Android (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS (09ae75f83eafce1bdc3fa067f281cbdf1ca7b893)

Mac Info:

Mac OS X 10.10.0
Xamarin Studio: 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
Xcode 6.1 (6604)
Build 6A1052d
Xamarin.iOS : 
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

Observation: I have created iOS single view application and drag the toolbar to the view controller and drag segmented control into toolbar, I observed that I am not getting any error/exception and segmented control is placed into the toolbar.

Screencast: http://www.screencast.com/t/LyU2JAoSQ

This issue has been fixed. Hence I am closing this issue.