Unplanned
Last Updated: 19 Dec 2019 14:31 by ADMIN
Aaron
Created on: 18 Dec 2019 22:50
Category: ListView
Type: Feature Request
4
BorderLocation property of ListViewItemStyle does not work as expected for RadListView

The BorderLocation property of ListViewItemStyle seems to either not be working correctly, or is severely limited in its capabilities.  Although the Location enum is not marked with [Flags], the values 0, 1, 2, 4, 8, 15 seem to imply bit flags that should be able to get OR'd together. However, when trying to use Location.Top | Location.Bottom, the result is NO border at all.

 

Example:

    public class BorderLocationExample : ContentPage
    {
        private readonly ListViewItemStyle BorderAll = new ListViewItemStyle
        {
            BorderColor = Color.Blue,
            BorderLocation = Location.All,
            BorderWidth = 8
        };

        private readonly ListViewItemStyle BorderTop = new ListViewItemStyle
        {
            BorderColor = Color.Blue,
            BorderLocation = Location.Top,
            BorderWidth = 8
        };

        private readonly ListViewItemStyle BorderTopAndBottom = new ListViewItemStyle
        {
            BorderColor = Color.Blue,
            BorderLocation = Location.Top | Location.Bottom, // <-- DOESN'T WORK !!!  These items have NO border at all.
            BorderWidth = 8
        };

        public BorderLocationExample()
        {
            BackgroundColor = Color.Gray;

            var items = new ObservableCollection<string>
            {
                "Item 1",
                "Item 2",
                "Item 3",
            };

            Content = new StackLayout
            {
                Orientation = StackOrientation.Vertical,
                Children =
                {
                    new RadListView
                    {
                        ItemsSource = items,
                        ItemStyle = BorderAll
                    },
                    new RadListView
                    {
                        ItemsSource = items,
                        ItemStyle = BorderTop
                    },
                    new RadListView
                    {
                        ItemsSource = items,
                        ItemStyle = BorderTopAndBottom
                    },
                }
            };
        }
    }

1 comment
ADMIN
Yana
Posted on: 19 Dec 2019 14:31

Hello Aaron,

Currently setting BorderLocation to different values as flags is not supported in the ListViewItemStyle.  I have converted this into a feature request as I agree this would be a valuable addition to the ListView styling features. 

We're keeping an eye on the public item and will plan it if there's demand.

I've updated your points for your involvement.

Regards,
Yana
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items