1
Vote

NavigationPanel "without header" transition

description

I need to separate FluidHeader from the NavigationPanel and place some tab buttons between, I copy-pasted sources of NavigationPanel class and removed header display, use external header control with it's own paining. (NavigationPanelWithoutHeader : ControlContainer)
Everything looks good for SelectedIndex switch, but transition content falls down in case of navigation.Switch, it falls for ~ 2*PageControl.Top. And works well only with Top == 0.
 
I found one possible fix in TransitionPanel.cs, but it fills black all top non-transition content), and I need to have any top controls untouchable while transition.
[code]
int transTop = 0;
private void OnBeginTransition(int index)
    {
        transTop = this.Parent.Top;
        this.Top = this.Parent.Top;
        this.Parent.Top = 0;
 
        if (BeginTransition != null)
        {
            beginTransitionEventArgs.NewValue = index;
            BeginTransition(this, beginTransitionEventArgs);
        }
    }
 
protected virtual void OnTransitionCompleted(Animation a)
    {
        this.Parent.Top = transTop;
        this.Top = 0;
        if (TransitionCompleted != null)
        {
            TransitionCompleted(this, a.eventArgs);
        }
    }
[/code]

comments