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

  • SEARCH
  • Home
  • 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 8453617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:48:49+00:00 2026-06-10T11:48:49+00:00

I read the article about using a TabControl on Windows Phone application. I can

  • 0

I read the article about using a TabControl on Windows Phone application. I can avoid it to fire when it is first load. However, the selectionChanged fired twice when user click the tab. Would someone can help me how to fix it. Thanks in advance.

There is my TabControl:

<cc:TabControl Grid.Row="1" SelectionChanged="tabList_SelectionChanged" x:Name="tabList">
        <cc:TabItem Height="80" Header="Events" Foreground="Black"/>
        <cc:TabItem Height="80" Header="Details" Foreground="Black"/>
        <cc:TabItem Height="80" Header="Notes" Foreground="Black" />
    </cc:TabControl>

There is cobe behind:

 public partial class Tab : PhoneApplicationPage
{
    private bool blnFristLoad=true;  
    public Tab()
    {
        InitializeComponent();
        tabList.SelectionChanged += new SelectionChangedEventHandler(tabList_SelectionChanged);
    }

private void tabList_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {

        if (blnFristLoad == false)
        {
            TabItem t = (sender as TabControl).SelectedItem as TabItem;
            t.Content = "202020";
                       }
        else blnFristLoad = false;                



    }
  • 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-10T11:48:50+00:00Added an answer on June 10, 2026 at 11:48 am

    It’s very obvious in your code. You are adding SelectionChanged event handler twice. One from your XAML code and the other from the code behind. As you are using += symbol, the eventhandler is added as a seperate instance.

    Remove one of those statements.

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

Sidebar

Related Questions

I read an article about using CLR integration in sqlserver and was wondering what
I read an article about using C# 3 features in C# 2 where you
I have read this article about using WMI to change the settings of NICs
I read an article about the optimisation of nested product of matrices, using dynamic
I have already read Josh Smiths article about binding commands to view model using
I had read article about how stackoverflow reduced its CPU usage by using lucene.
I have read various articles about passing variables around using RMI. Some of them
I read an article about a regular expression to detect base64 but when I
I've read an article about the Named Loop Idiom in C++ : http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Loop This
I recently read an article about password hashing . How are MD5 or SHA1

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.