Beispiel #1
0
        private void updateTabHeader()
        {
            string tabTitle;

            if (title.Length > 25)
            {
                tabTitle = title.Remove(25, title.Length - 25) + "...";
            }
            else
            {
                tabTitle = title;
            }

            if (isLoading)
            {
                StackPanel panel = new StackPanel();
                panel.Height      = 18;
                panel.Orientation = Orientation.Horizontal;

                TextBlock titleBlock = new TextBlock();
                titleBlock.Text   = tabTitle;
                titleBlock.Margin = new Thickness(0, 0, 5, 0);
                panel.Children.Add(titleBlock);

                GifImage indicator = new GifImage(new Uri("throbber.gif", UriKind.Relative));
                indicator.Width  = 16;
                indicator.Height = 16;
                panel.Children.Add(indicator);

                tab.Header = panel;
            }
            else
            {
                tab.Header = tabTitle;
            }
        }
Beispiel #2
0
        private void updateTabHeader()
        {
            string tabTitle = title.Length > 25 ? String.Format( "{0}...", title.Remove( 25, title.Length - 25 ) ) : title;

            if ( isLoading )
            {
                StackPanel panel = new StackPanel { Height = 18, Orientation = Orientation.Horizontal };
                TextBlock titleBlock = new TextBlock { Text = tabTitle, Margin = new Thickness( 0, 0, 5, 0 ) };
                panel.Children.Add( titleBlock );
                GifImage indicator = new GifImage( new Uri( "throbber.gif", UriKind.Relative ) ) { Width = 16, Height = 16 };
                panel.Children.Add( indicator );

                tab.Header = panel;
            }
            else
            {
                tab.Header = tabTitle;
            }
        }