Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:42:12+00:00 2026-06-11T02:42:12+00:00

I am using C#, Silverlight, Visual Studio for Windows Phone 7. I am interested

  • 0

I am using C#, Silverlight, Visual Studio for Windows Phone 7.

I am interested in getting only the visual elements that are currently displayed on the screen during a pivot. For example, my pivot could have 5 PivotItems, but I only want to get the items that are on display after each flick.

Right now, I can get the entire pivot from the visual tree, and obviously I could select a specific PivotItem. But I want to be able to get only the current pivot on the screen. The end goal is to get the absolute position of the elements on the screen, regardless of the current PivotItem.

Is this possible? If so, how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:42:14+00:00Added an answer on June 11, 2026 at 2:42 am

    SelectedItem and/or SelectedIndex on the Pivot would return the currently visible PivotItem.

    Sample Code for you to illustrate my point:

    XAML:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <!--Pivot Control-->
        <controls:Pivot x:Name="SomePivot" Title="MY SAMPLE PIVOT">
                <StackPanel>
                    <Button Content="Button 0"/>
                    <Button Content="Button 1"/>
                    <Button Content="Button 2"/>
                    <Button Content="Button 3"/>
                    <Button Content="Button 4"/>
                    <Button Content="Button 5"/>
                    <Button Content="Button 6"/>
                    <Button Content="Button 7"/>
                    <Button Content="Button 8"/>
                    <Button Content="Button 9"/>
                    <Button Content="Button 0"/>
                    <Button Content="Button 1"/>
                    <Button Content="Button 2"/>
                    <Button Content="Button 3"/>
                    <Button Content="Button 4"/>
                    <Button Content="Button 5"/>
                    <Button Content="Button 6"/>
                    <Button Content="Button 7"/>
                    <Button Content="Button 8"/>
                    <Button Content="Button 9"/>
                </StackPanel>
            </controls:PivotItem>
            <controls:PivotItem Header="item2">
                <Button Content="Button D" Name="B"/>
            </controls:PivotItem>
            <controls:PivotItem Header="item3">
                <Button Content="Button D" Name="C"/>
            </controls:PivotItem>
            <controls:PivotItem Header="item4">
                <Button Content="Button D" Name="D"/>
            </controls:PivotItem>
        </controls:Pivot>
    
        <Button Grid.Row="1" Content="Get Current Pivot Item" Click="GetCurrentPivotItem"/>
    </Grid>
    

    Code-Behind:

    private void GetCurrentPivotItem(object sender, RoutedEventArgs e)
    {
        PivotItem pivotItem = (PivotItem)SomePivot.SelectedItem;
        Debug.WriteLine("Pivot Item : {0}", pivotItem.Header);
        foreach (var element in VisualTreeHelper.FindElementsInHostCoordinates(new Rect(20, 0, 480, 700), pivotItem))
        {
            if (element is Button)
            {
                Debug.WriteLine("{0}", ((Button)element).Content);
            }
        }
    }
    

    Does this help?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to compile a Silverlight project for Windows Phone using Visual Studio 2010
While working with SilverLight using Visual Studio 10, I found that in design mode
I'm using the Silverlight business application (Navigation application) template that comes with Visual studio
I am using express edition visual studio 2010 for windows phone 7 , 7.1
I have a Silverlight application that I am maintaining. I am currently using Visual
I'm using Silverlight 3 in Visual Studio 2008. Unfortunately I can't seem to get
I'm using SilverLight on Visual Studio 2008, Ver 3.5 SP1, I have a small
I'm using the lastest version of Silverlight 2.0 within Visual Studio 2008. I have
I am new to silverlight. I am programming in Visual Studio 2010 for Windows
I am using Silverlight 4, in Visual Studio 2010. I have some Domain Services

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.