Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 5 of 5
  1. thehappycactus's Avatar
    Member

    Posts
    9 Posts
       #1  
    I'm currently writing an PivotApplication that'll need a PerformanceProgressBar in several different PivotItems. I was wondering: instead of creating a different progress bar for each PivotItem, is there a simple way I can share a single one between each PivotItem?

    Or should I just suck it up and make multiple ProgressBars?

    Thanks!
  2. DarthVeda's Avatar
    Member

    Posts
    54 Posts
    Global Posts
    56 Global Posts
    #2  
    You can place pivot and pivot items in a grid, and once you have populated all pivot items, place a progress bar in the outer grid, it should encompass all pivot pages. Not sure why you would want to do that but it can be done.
    Eg:
    <Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.Resources>
    <loc:VisibilityToBooleanConverter x:Key="VisibilityToBooleanConverter"/>
    <loc:InvVisibilityToBooleanConverter x:Key="InvVisibilityToBooleanConverter"/>
    </Grid.Resources>
    <!--Pivot Control-->
    <controls: Pivot Name="Pivot1" Title="1">
    <!--Pivot item one-->
    <controls: PivotItem Header="1">
    <Grid>

    </Grid>
    </controls: PivotItem>

    <!--Pivot item two-->
    <controls: PivotItem Header="2">
    <Grid>
    </Grid>
    </controls: PivotItem>
    <controls: PivotItem Header="3">
    <Grid>
    </Grid>
    </controls: PivotItem>
    </controls: Pivot>
    <toolkit: PerformanceProgressBar IsIndeterminate="{Binding Visibility, ElementName=somecontrol, Converter={StaticResource VisibilityToBooleanConverter}}" Height="20" />
    </Grid>
    Thanked by:
  3. thehappycactus's Avatar
    Member

    Posts
    9 Posts
       #3  
    Oh, of course! Thanks, that's really helpful.

    I want to do it because I'll be needing a progress bar on multiple Pivot Items...is that odd?
  4. DarthVeda's Avatar
    Member

    Posts
    54 Posts
    Global Posts
    56 Global Posts
    #4  
    when you show the progressbar, you are hinting to user to wait and not do any action.. each progressbar is an indication of an activity which might be unique to a pivot screen. to have one in general is very generic :)

    just my 2 cents on design.
  5. rudyhuyn's Avatar
    Member

    Posts
    32 Posts
    #5  
    You can also use the native progress bar

    SystemTray.ProgressIndicator=new ProgressIndicator (){ IsVisible= true, IsIndeterminate = true};

Posting Permissions