Bug 22153 - Styling entry control
Summary: Styling entry control
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-17 20:29 UTC by mgwalm
Modified: 2015-05-20 17:49 UTC (History)
6 users (show)

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

image of problem (6.56 KB, image/png)
2014-08-17 20:29 UTC, mgwalm

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 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.

Related Links:

Description mgwalm 2014-08-17 20:29:53 UTC
Created attachment 7707 [details]
image of problem

im have problems styling an entry box. The following is my xaml:

Label TextColor="{x:Static helpers:Colors.LabelTextColor}" Text="Quoted:" VerticalOptions="Center"/> Entry BackgroundColor="{x:Static helpers:Colors.TextBackgroundColor}" Text="{Binding QuantityQuoted, Mode=TwoWay}" Grid.Column="1" />

LabelTextColor = Color.Black; TextBackgroundColor = Color.FromHex("#FFCCCCCC"); // GRAY

THE ATTACHED file shows the result. the gray is not in the entry's background, but in a large blob around the entry box. this large blob is on all entry boxes and it throws my whole layout. ie it makes the whole entry box much bigger than it should be.
Comment 1 Rajneesh Kumar 2014-08-22 12:52:24 UTC
I have checked this issue and I am not able to reproduce.

Could you please provide us sample project and your environment info? So, that we can reproduce this issue at our end.

You can get Build info: Help=>About Microsoft Visual studio=> Copy Information

Environment Info:

Windows 7
Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)
Comment 2 mgwalm 2014-08-23 21:53:21 UTC
just download the xaml samples from github.

change the homepage.xaml to include the following:

  {ListView x:Name="listView"}
          {StackLayout Orientation="Vertical"
                       Padding="5, 0"}
            {StackLayout Orientation="Horizontal"
                         Padding="5, 0"}
              {Label Text="{Binding PageName}"
                   VerticalOptions="Center" /}

              {Button Text="View"
                      Command="{Binding GoToCommand}"
                      CommandParameter="{Binding PageType}" /}

              {Button Text="Source"
                      Command="{Binding BrowseCommand}"
                      CommandParameter="{Binding PageName}" /}
            {!--{Editor Text="one line" HeightRequest="200" BackgroundColor="Yellow"
                    VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"/}--}
            {Entry Text="text" BackgroundColor="Gray" /}

ive just added the {Entry Text="text etc.

Surely you can see the background of the entry is not your color, but a large area around the entry is your color.
Comment 3 Ram Chandra 2014-09-02 09:17:03 UTC
I have checked this issue and I am able to reproduce this issue.

When I use the code mentioned in comment 2 and deploy the application on android device, I observed that I am getting the same behavior as mentioned in bug. The background of the entry is not  in gray color, but the large area around the entry is in gray color.

Screencast (Device): http://www.screencast.com/t/f89fjgOQh

Note: I am not getting this behavior on emulator.
Screencast (Emulator): http://www.screencast.com/t/7FZxd6TgX

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional

Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)
Comment 4 Michael 2015-05-20 17:49:51 UTC
I have confirmed with Xamarin.Forms 1.4.2 that the entry background color property is updating the background color as expected.