xamarin/Xamarin.Forms

Frame BorderColor requires Padding to be visible

开放

#6,835 创建于 2019年7月10日

 (12 条评论) (1 个反应) (0 位负责人)C# (1,926 个派生)batch import
e/4 :clock4:help wantedp/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

I think this issue relates to this https://xamarin.github.io/bugzilla-archives/27/27460/bug.html

Frames require padding to be greater or equal to 1 to be visible. Also when adding setting padding to 1 and the border shows it doesnt appear so nicely around the corners either if the corners have corner radius set.

Expected Behavior

To be able to see the bordercolor without specifing padding.

Actual Behavior

No border color is shown when padding is 0 or not set, bordercolor displays when padding is >=1

Basic Information

  • Version with issue: 4.1.0.581479
  • Last known good version: NA
  • IDE: Visual Studio 2019 Latest 16.1.6
  • Platform Target Frameworks:
    • iOS:
    • Android: 9.0
    • UWP:
  • Android Support Library Version:
  • Nuget Packages: NA
  • Affected Devices: NA

Regarding below I have frame with padding set to 1 and the corneRadius set to 5, the corner is cutting over the borderColor. If there was no padding then I would expect it it to nicely wrap the frames border and adding padding shouldnt affect that.

Screenshots

device-2019-07-10-141212

The XAML is setup like this:

                                <Frame
                                            Margin="0,5"
                                            Padding="1"
                                            BorderColor="White"
                                            CornerRadius="5">
                                            <Grid RowSpacing="0">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <ffloadingimage:CachedImage
                                                    Grid.Row="0"
                                                    Aspect="AspectFill"
                                                    ErrorPlaceholder="{StaticResource ErrorImage}"
                                                    HeightRequest="80"
                                                    RetryCount="3"
                                                    RetryDelay="1000"
                                                    Source="{Binding Image}" />
                                                <BoxView
                                                    Grid.Row="0"
                                                    BackgroundColor="{StaticResource XeniaBlackThemeColor}"
                                                    HeightRequest="80"
                                                    Opacity="0.5"
                                                    VerticalOptions="End" />
                                                <Label
                                                    Grid.Row="0"
                                                    FontFamily="{StaticResource BoldFont}"
                                                    FontSize="{StaticResource SubHeader}"
                                                    HorizontalOptions="Center"
                                                    HorizontalTextAlignment="Center"
                                                    MaxLines="1"
                                                    Text="{Binding Name}"
                                                    TextColor="White"
                                                    VerticalOptions="Center" />
                                            </Grid>
                                        </Frame>

贡献者指南