Completed
Last Updated: 29 Oct 2013 08:48 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 29 Oct 2013 08:48
Category:
Type: Bug Report
0
FIX. - RadListView layout does not arrange correctly list view items
To reproduce:
-add a RadListView with size (480, 333);
-add about 30 items;
-use the following code:
public Form1()
{
    InitializeComponent();

    radListView1.ViewType = ListViewType.IconsView;
    radListView1.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;

    radListView1.AllowArbitraryItemWidth = false;
    radListView1.AllowArbitraryItemHeight = false;
    radListView1.ItemSpacing = 0;
    radListView1.ItemSize = new Size(100, 30);
}

public class MyListView : RadListView
{
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadListView).FullName;  
        }
    }

    protected override RadListViewElement CreateListViewElement()
    {
        return new MyBaseListViewElement();
    }
}

public class MyBaseListViewElement : RadListViewElement
{
    protected override BaseListViewElement CreateViewElement()
    {
        return new MyIconListViewElement(this);
    }
}

public class MyIconListViewElement : IconListViewElement
{
    public MyIconListViewElement(RadListViewElement owner) : base(owner)
    {
    }

    protected override void HandleDownKey(KeyEventArgs e)
    {
        base.HandleRightKey(e);
    }

    protected override void HandleUpKey(KeyEventArgs e)
    {
        base.HandleLeftKey(e);
    }

    protected override void HandleLeftKey(KeyEventArgs e)
    {
        base.HandleUpKey(e);
    }

    protected override void HandleRightKey(KeyEventArgs e)
    {
        base.HandleDownKey(e);
    }
}

Navigating via Left/Right arrow keys does not work properly each time.
0 comments