0

我有以下代码,我想要一个动画来启用和禁用相关“radpanegroup”中的任何“radpane”。

例如,当我将“radpane”置于 pin 模式时,它的宽度增加了 3 秒,或者另一个例子是边框颜色发生了变化。我的解决方案是使用:

<telerik:RadDocking>

    ...

    ...

    ...

  <telerik:RadDocking.FlyoutBehavior>
            <local:AnimatedFlyoutBehavior/>
  </telerik:RadDocking.FlyoutBehavior>

</telerik:RadDocking>

我使用了“IFlyoutBehavior”接口,结果实现了以下功能:

void IFlyoutBehavior.OnMouseEnter (IFlyoutHost host, RadPane targetPane)
    {

    }

    void IFlyoutBehavior.OnPaneActivated (IFlyoutHost host, RadPane targetPane)
    {
    }

    void IFlyoutBehavior.OnMouseLeave (IFlyoutHost host)
    {

    }

    void IFlyoutBehavior.OnOpeningTimerTimeout (IFlyoutHost host)
    {


    }

    void IFlyoutBehavior.OnClosingTimerTimeout (IFlyoutHost host)
    {

    }

    void IFlyoutBehavior.OnPaneDeactivated (IFlyoutHost host, RadPane targetPane)
    {
        var selectedPane = host.SelectedPane;

        if (selectedPane! = null &&! selectedPane.IsActive && host.CurrentState == FlyoutState.Opened)
        {
            host.StartCloseAnimation ();
        }
    }

    void IFlyoutBehavior.OnPaneMouseLeftButtonDown (IFlyoutHost host, RadPane targetPane)
    {
        if (host.CurrentState! = FlyoutState.Opened)
        {
            host.StartOpenAnimation ();
        }
        else
        {
            host.StartCloseAnimation ();

        }
    }

}

我无法使用足够的这个界面。有没有更好的方法来自定义“radpane”中的动画或以这种方式开发它?

4

0 回答 0