Completed
Last Updated: 25 Sep 2014 08:03 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 03 Jul 2014 06:41
Category:
Type: Bug Report
0
FIX. RadCollapsiblePanel - In RightToLeft mode the control disappears after collapsing
To reproduce:
public Form1()
{
    InitializeComponent();
    radCollapsiblePanel1.ExpandDirection = Telerik.WinControls.UI.RadDirection.Right;
    radCollapsiblePanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
}


Workaround:
public class CustomCollapsiblePanel : RadCollapsiblePanel
{
    protected override RadCollapsiblePanelElement CreateCollapsiblePanelElement()
    {
        return new CustomCollapsiblePanelElement(this);
    }

    public override string ThemeClassName  
    { 
        get 
        { 
            return typeof(RadCollapsiblePanel).FullName;  
        }
    }
}

public class CustomCollapsiblePanelElement : RadCollapsiblePanelElement
{
    bool rtl = false;

    public CustomCollapsiblePanelElement(RadCollapsiblePanel ownerControl) : base(ownerControl)
    {
    }

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

    protected override void OnHeaderButtonClick(object sender, EventArgs e)
    {
        rtl = this.RightToLeft;
        this.RightToLeft = false;
        base.OnHeaderButtonClick(sender, e);
    }

    protected override void OnMouseUp(MouseEventArgs e)
    {
        this.RightToLeft = rtl;
        base.OnMouseUp(e);
    }
}
0 comments