how to Remove/change animation from Auto Hide area

9 posts, 0 answers
  1. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 13 Sep 2012 Link to this post

    Hi,

    I have a requirement to change the animation of auto hide area, when i mouse hover on the auto hide area, group panel will opens with a animation, my requirement is as follows,

    i want to open that panel when i click on the button(instead of mouseOver) and also i want to change the animation as i wanted. please see the attachment if you need any clarification.

    Regards,
    Srinivas.

  2. George
    Admin
    George avatar
    1332 posts

    Posted 17 Sep 2012 Link to this post

    Hi 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.

    In order to disable the animation, I would suggest using the AnimationManager.IsAnimationEnabled attached property. Setting it to false will disable the animations in the RadDocking control.

    To change the animation, I would suggest modifying the RadDocking theme and changing the animations there.

    I modified the sample project - you can find it attached. Hope this helps.


    Kind regards,
    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 23 Sep 2012 Link to this post

    Hi George,

    Thank you so much for your help, 

    i have one more requirement here, when i click on the autohide area the RadPane should dock to original position.

    can you please tell me how can i do this ? if you can provide me a example that would be great.

    Regards,
    Srinivas.
  5. George
    Admin
    George avatar
    1332 posts

    Posted 26 Sep 2012 Link to this post

    Hi Srinivas,

    I am not sure I understand what's the requirement here. What do you mean by clicking on the autohidearea - clicking on the pane or somewhere else? If you want to restore the unpinned pane to a pinned state, you could set the RadPane.IsPinned property to true. In other words - this will pin the pane.

    Hope this helps.

    Kind regards,
    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.

  6. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 26 Sep 2012 Link to this post

    Hi George,
    Thank you for your precious help, 

    I have overrided the OnMourEnter of Radpane and changed the moueseenter event)
    public class CustomPane : RadPane
    {
    protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e)
    {
    this.ChangeVisualState(true);
                
    }
            
    now i want to pinned the CustomPane when i click on the auto hide area., please ask me if you need any more information.  

    I have attached a image please check for more information

    Thanks again,
    Srinivas.
  7. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 27 Sep 2012 Link to this post

    Hi Srinivas,

    As I wrote into your other thread you will have to add some custom code into the class that inherits from RadPane. Here is an example:
    protected override void OnMouseUp(System.Windows.Input.MouseButtonEventArgs e)
    {
        base.OnMouseUp(e);
      
        if (!this.IsPinned)
        {
            this.IsPinned = true;
        }
    }

    Regards,
    Ivo
    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.

  8. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 27 Sep 2012 Link to this post

    Hi Ivo ,
    Thank you so much, i appreciate for your help.

    Regards,
    Srinivas.

  9. Ravi
    Ravi avatar
    97 posts
    Member since:
    Jun 2012

    Posted 02 Nov 2012 Link to this post

    Hi,
    To get desired behaviour, we used a custompane(we modified a small behaviour of RadPane) its working properly , but when we do Automated testing UI elements are not identifying, please check the attached screenshot.
    Can you please tell me how to enable the ATPs in custom control of my rad pane .
    Regards,
    Srinivas.
  10. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 07 Nov 2012 Link to this post

    Hi Srinivas,

    I tested this with UI Spy and a sample project using the same approach that you use. However the RadPane itself and its content were both identified by UI Spy. Could you give us more details how do you test this? Also what tool do you use?

    Greetings,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready