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.
I have the following in my Xamarin.Forms 2.0 project:
<Setter Property="ColumnSpacing" Value="0" />
MyCustomControl.xaml: (note the root element type)
MyCustomControl.xaml.cs: (note the base class)
public class MyCustomControl : Grid
The implicit style setting Grid.ColumnSpacing=0 by default is NOT applied to instances of MyCustomControl.
However, if I revert the base class to a ContentView and nest the Grid inside of that instead, the implicit style IS applied:
The documentation states implicit styles become "the default for all objects of that type." It does not mention any exceptions to this behavior.
implicit properties are not applied to inherited controls in Xamarin.Forms. This is by design, for some good reason I can't remember right now.
Documentation says "for all object of that type". you custom control is of type MyCustomControl, which eventually inherit from Grid, but is not of type Grid.
I'll ask our doc team to clarify this. Thanks For the report.