Collection View outline shows under and over my horizontal collection

91 views Asked by At

I have problem with CollectionView outline. I create simple horizontal colletionView, and it is working, but on top and bottom I have gray outline.

view outline

XAML

<CollectionView BackgroundColor="White"  
                    Margin="0,15,0,0"  
                    x:Name="NewSubMenu" 
                    ItemsLayout="HorizontalList"
                    SelectionMode="Single" 
                    HeightRequest="35" 
                    SelectionChanged="OnCollectionViewSelectionChanged"
                    ItemsSource="{Binding MyListSource}"
                    HorizontalOptions="FillAndExpand">
        <CollectionView.ItemTemplate >
            <DataTemplate>

                <Grid BackgroundColor="White" >                            
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup Name="CommonStates">
                            <VisualState Name="Normal" />
                            <VisualState Name="Selected" >
                                <VisualState.Setters>
                                    <Setter Property="BackgroundColor" Value="White" />
                                    <Setter TargetName="_label" Property="Label.TextColor" Value="Black" />
                                </VisualState.Setters>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Label Text="{Binding Name}" 
                           x:Name="_label" ClassId="{Binding Id}"
                           TextColor="{StaticResource TamnoBraon}"  
                           TextTransform="Uppercase" Padding="5,1,10,1" FontSize="Large"></Label>
                </Grid>

            </DataTemplate>
        </CollectionView.ItemTemplate>
    </CollectionView>

Does anyone have same problem?

0

There are 0 answers