Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 or GitHub 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.
Created attachment 7939 [details]
Xamarin.Forms Page that shows problem
If a BoxView is initially hidden (i.e. IsVisible = false) and then shown it does not get visually rendered but does take up space in the UI.
Attached is an App.cs Xamarin.Forms page which demonstrates the problem, it has an initially hidden box view, a button to show the hidden box view, and underneath another box view which is initially visible just to prove that box views are working.
When the button is clicked the button and box view underneath the button both get moved down the screen to make space for the box view above but the newly shown box view does not get visually rendered.
Workaround: The box view needs to be assigned a different colour before it is made visible and it will be visually rendered as below:
showButton.Clicked += (sender, args) =>
hiddenBoxView.Color = Color.Blue;
hiddenBoxView.IsVisible = true;
This is potentially a problem if you have a binding to the box view colour in your view model as this then fires a property change when there isn't one.
Created attachment 7940 [details]
Screenshot of problem with box view when shown
I have checked this issue and able to reproduce it.
Steps to reproduce
Create a xamarin forms application and followed above bug description.
I observed that at first when we set boxview IsVisible to false then Boxview doesn't take space in UI as expected but when we set boxview Isvisible to true then boxview took space in UI and doesn't render.
Screencast regarding same : http://screencast.com/t/GUAgoyUy
=== Xamarin Studio ===
Version 5.3 (build 440)
Installation UUID: 2591d519-875d-4afe-a3d9-5fcf391bbd2d
Mono 3.8.0 ((no/45d0ba1)
GTK+ 2.24.23 (Raleigh theme)
Package version: 308000009
=== Apple Developer Tools ===
Xcode 4.6.3 (2068)
=== Xamarin.Mac ===
Version: 184.108.40.206 (Enterprise Edition)
=== Xamarin.iOS ===
Version: 220.127.116.11 (Enterprise Edition)
Build date: 2014-08-26 07:59:55-0400
=== Xamarin.Android ===
Version: 4.16.0 (Enterprise Edition)
Android SDK: /Users/nischal/Desktop/android-sdk-macosx
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
4.5 (API level 21)
Java SDK: /usr
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
=== Build Information ===
Release ID: 503000440
Git revision: accb55419539e512cff857b14b80ec3107996511
Build date: 2014-09-01 08:53:05-04
Xamarin addins: 6dbac4b3a32df080bf98cde838ce89e573a92859
=== Operating System ===
Mac OS X 10.7.4
Darwin nischals-Mac-mini.local 11.4.0 Darwin Kernel Version 11.4.0
Mon Apr 9 19:32:15 PDT 2012
I am also facing similar problem. My BoxView is initially hidden and then on click of button I am toggling the visibility property of BoxView. Its working fine on Android, but in iOS its not rendering the view, but occupying the space, exactly as reported above.
OS X Version : 10.9.5
Xamarin Studio : 5.0.1 (build 3)
Xamarin.Forms : 18.104.22.168 (pre 4)
When this will be fixed?
Same Problem here!
As Workaround, I have tried to add the VISIBLE BoxView in a StackLayout and then make the StackLayout visible and invisible.
This ALSO DON'T WORK!
So, it seems as there is NO WORKAROUND for this Problem yet.
=> Is this bug solved in the next release?
Update to Workaround:
- Use Frame instead BoxView seems to work.
I am also seeing this issue.
Should be fixed in 1.3.3-pre1
fyi, for me, it's fine in Android, but has issues in iOS.
Oh awesome, thanks Jason.
Found the bug, its been around FOREVER so its not technically a regression, as such going to stick it in 1.3.4
> going to stick it in 1.3.4
Should be fixed in 1.3.4-pre1
I have checked this issue with following builds:
Mac OS X 10.10.0
Xamarin Studio: 5.7.1 (build 17)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
Xcode 6.1 (6604)
Xamarin.iOS: 22.214.171.124 (Business Edition)
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0
Observation : When I set boxview "Isvisible" property to true then boxview took space in UI and rendered on UI perfectly.
This issue has been fixed. Hence I am closing this issue.
In 1.4.4, this appears to have regressed.
Still broken in 1.5.0-pre1.
Adding an empty derived BoxView class and renderer as below makes the view appear. I'm sure the SetNeedsDisplay() doesn't need to be called quite this often.
[assembly: ExportRenderer(typeof(ObanBoxView), typeof(Oban.Mobile.iOS.Renderer.ObanBoxRenderer))]
public class ObanBoxRenderer : BoxRenderer
protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
Setting the BackgroundColor OnBindingContextChanged seems to make the BoxView appear.
What is interesting, is that this works:
this.Separator.BackgroundColor = Color.FromRgba(0, 0, 0, 50);
However, this does not:
this.Separator.BackgroundColor = Color.FromRgba(0, 0, 0, 51);
It seems the color values determine whether or not the Boxview’s background is set.
Still experiencing a similar issue to this, although the behavior is different across iOS and Android using Xamarin Forms.
I've attached a BoxViewTest.zip which contains an Xamarin Forms solution. When you launch the app, click the button toggle visibility of the content view.
On Android, it will behave as expected. But on iOS, you will need to click the button three times before the red box view will appear.
This only works because I invert the IsVisible state from the ContentView AND the BoxView inside of it. The BoxView's IsVisible property should by default inherit from the parent (in this case the content view).
If you remove this line of code from the button click event, neither OSes will work.
bv.IsVisible = !bv.IsVisible;
Here is the solution
This is using Xamarin Forms v126.96.36.19992
Still an issue with v188.8.131.5246
This is fixed in 184.108.40.20654