Is it possible to have an animated gif next to the tab caption for each tab? I would like to show some kind of loading icon while the tab contents are loading. If this is not standard, can you suggest how to do this with a custom draw filter.
Thanks,
Eric
You can submit a feature request for this here: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
As a workaround, you can use the following code:
private void OnAnimateImage( object sender, EventArgs args ){ if ( this.ultraTabControl1.IsHandleCreated && this.ultraTabControl1.InvokeRequired ) { this.ultraTabControl1.BeginInvoke( new EventHandler( this.OnAnimateImage ), (Image)sender ); } else { foreach ( UltraTab tab in this.ultraTabControl1.Tabs ) { if ( tab.Appearance.Image != sender ) continue;
if ( this.ultraTabControl1.UIElement != null ) { UIElement element = this.ultraTabControl1.UIElement.GetDescendant( typeof( TabItemUIElement ), tab );
if ( element != null ) element.Invalidate(); }
break; } }}
private void Form1_Load( object sender, EventArgs e ){ this.ultraTabControl1.Paint += new System.Windows.Forms.PaintEventHandler( this.ultraTabControl1_Paint ); ImageAnimator.Animate( (Image)this.ultraTabControl1.Tabs[ 0 ].Appearance.Image, new EventHandler( this.OnAnimateImage ) );}
private void Form1_FormClosed( object sender, FormClosedEventArgs e ){ ImageAnimator.StopAnimate( (Image)this.ultraTabControl1.Tabs[ 0 ].Appearance.Image, new EventHandler( this.OnAnimateImage ) );}
private void ultraTabControl1_Paint( object sender, PaintEventArgs e ){ ImageAnimator.UpdateFrames();}