Completed
Last Updated: 20 Oct 2014 14:18 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 04 Aug 2014 11:04
Category: PageView
Type: Bug Report
0
FIX. RadPageView - Arrow keys navigation (Left arrow/Right arrow) is reversed in RightToLeft
Workaround:
public Form1()
{
    InitializeComponent();
    this.radPageView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
}

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

    protected override RadPageViewElement CreateUI()
    {
        switch (this.ViewMode)
        {
            case PageViewMode.Strip:
                return new CustomRadPageViewStripElement();
            
            default:
                return base.CreateUI();
        }
    }
}

public class CustomRadPageViewStripElement : RadPageViewStripElement 
{
    public CustomRadPageViewStripElement()
    {
    }

    protected override Type ThemeEffectiveType     
    { 
        get    
        { 
            return typeof(RadPageViewStripElement);     
        }
    }

    protected override bool IsNextKey(Keys key)
    {
        if (this.RightToLeft)
        {
            if (key == Keys.Left)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        return base.IsNextKey(key);
    }

    protected override bool IsPreviousKey(Keys key)
    {
        if (this.RightToLeft)
        {
            if (key == Keys.Right)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        return base.IsPreviousKey(key);
    }
}
0 comments