This is a migrated thread and some comments may be shown as answers.

need to open the panel on click instead of hover on auto hide are

11 Answers 365 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 17 Sep 2012, 08:16 AM
Hi,
I want to change the default behavior of autohide are, 

at present if i mouseover on auto hide area a panel will opens from left to right with a animation, but i want to open the panel on clicking on auto hide area. 

is it possible if yes can you please tell me how can i do that ?
please check the attached png for more information.

Thanks in advance,
Srinivas.

11 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 19 Sep 2012, 10:14 AM
Hello Srinivas,


Disabling opening of unpinned panes on mouseover can be accomplish with some custom code:

  1. Create a custom pane that inherits RadPane.
  2. Override the OnMouseEnter method
  3. Remove the base call. The only need is to change the visual state. The code should looks like the following snippet:
public class CustomPane : RadPane
{
    protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e)
    {
        this.ChangeVisualState(true);
    }
}

Now, you could use the custom pane instead of the RadPane. When a pane is unpinned, it requires mouse click to bring it front.

Greetings,
George
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Ravi
Top achievements
Rank 1
answered on 23 Nov 2012, 03:15 PM
Hi,
our custom pane(RadPane) is working properly on clicking on the auto hide area, but we have another problem with this.

when our CustomPane is is being un pinned, then if we press the button which is in the autohide area and drag towards right, then the custom pane behaves as default RadPane. In our requirement it should be pinned state or may be it should not be opened.
i have attached a screenshot please check once.
Please let me know if you need any more information.

In the below link you can find a sample solution.
http://www.telerik.com/community/forums/wpf/docking/how-to-remove-change-animation-from-auto-hide-area.aspx

Thanks in advance,
Srinivas.
0
George
Telerik team
answered on 28 Nov 2012, 04:17 PM
Hi Srinivas,

 
Could you please explain in steps what is the default RadPane behavior and how do you want to be changed? Currently, when a pane is clicked, it's brought to front, but not pinned.

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ravi
Top achievements
Rank 1
answered on 29 Nov 2012, 03:04 AM
Hi George,

Let me explain this way...

the default behavior of Radpane is the following:


Case 1. when the pane is Un Pinned state, we see a button on auto hide area, if mouse over or pressed on that button the Radpane comes out and it will be in unpinned state to pin that we have to press the pin icon.


Case 2. Being un pinned when we press and hold the mouse on the button which is on auto hide area and then if we try to drag towards right side then the pane will comes out and the sate will be unpinned.

What we have done:so far for the "case 1"  is the following:

We wanted to open the Radpane and pin the RadPane when we mouse press on the button which is on the auto hide area, we achieved this by overriding the "OnMouseEnter"( Thanks for your help because suggested me this :) ) and its working properly.

What i have requested now is the following :

We don't want to use the  "Case 2" in our projects, simply we wanted to disable this state,,I am requesting you to help me in this case.

please reply if you need any more details..

Thanks again,
Srinivas.


0
George
Telerik team
answered on 03 Dec 2012, 04:20 PM
Hello Srinivas,

 
According to the Case 2: In the RadDocking control there is no difference between clicking on the unpinned pane or clicking and dragging on the unpinned pane - these two operations result in one and the same action - the unpinned pane shows up its content. The content will be shown until the pane has the focus (clicking on the unpinned pane brings the focus) - if you click anywhere in the RadDocking control, the focus will be moved and the unpinned pane will hide its content.

Please, correct me if I misunderstood the given scenario. What do you expect to happen in case 2? Case 2 and the "modified" case 1 (I mean the scenario when OnMouseEnter is overriden) should result in one and the same behavior.

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nargis Hemani
Top achievements
Rank 1
answered on 24 Jan 2013, 05:39 PM
Thank you. CustomPane works for me.
0
Ravi
Top achievements
Rank 1
answered on 11 Jul 2013, 06:59 AM
Hi George

sorry for late reply.

In our case2 we don't want to display the content of unpinned pane(please see your last reply)  when we focus (or click and hold mouse leftbutton) on unpinned(auto hide) area. 
if you can go through our previous conversations i was seeing the following behavior.

during the unpinned state of RadPane when we click and hold(or Drag towards right) mouse left button on auto hide area then we see the RadPane coming out and that will be in unpinned state. this is which we dont want, so we want to open the RadPane only on clicking on the AutoHide area.

feel free to ask if you want more information.
i have a sample project which i wanted to send you but unfortunately i cannot attach to this thread. only png, jpeg, gif files are acceptable here.

Regards,
Srinivas.

0
George
Telerik team
answered on 11 Jul 2013, 02:45 PM
Hello Srinivas,

May I ask you to send a support ticket? You could attach the sample project there as well. This will be of great help for us for pinpointing the problem.

I am glad to assist you further.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ravi
Top achievements
Rank 1
answered on 12 Jul 2013, 03:52 AM
Hi George,

I have opened a ticket ticket id: 714622 

Also i got reply from Telerik Admin, if you wish to check please use the ticket id.

Thank you for your help.

Regards,
Srinivas.

0
Ravi
Top achievements
Rank 1
answered on 28 Oct 2014, 06:07 AM
Hi George,

We are trying to achieve the same functionality in Silverlight but OnPreviewMouseDown is missing, is there any alternate way to achieve the same functionality in Silverlight?

Thanks again, 
Srinivas.

0
Kalin
Telerik team
answered on 29 Oct 2014, 12:31 PM
Hello Ravi,

I just noticed you have opened a support ticket regarding the same question. I've already answered you there, however I will copy my reply here in order to be available for the community and will ask to continue the conversation there:

What I can suggest you in order to achieve the desired would be to hook to the MouseLeftButtonDown event of the CustomPane and Pin it there. However as the event is handled in the code you would need to hook the following way:

public class CustomPane: RadPane
{
    public CustomPane()
    {
        this.AddHandler(UIElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(OnMouseLeftButtonDown), true);
    }
  
    private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
        if (!this.IsPinned)
        {
            this.IsPinned = true;
        }
    }
}

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Docking
Asked by
Ravi
Top achievements
Rank 1
Answers by
George
Telerik team
Ravi
Top achievements
Rank 1
Nargis Hemani
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or