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 6990789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:24:12+00:00 2026-05-27T19:24:12+00:00

I am making a application where i would like to log in with a

  • 0

I am making a application where i would like to log in with a face detection. But this is not real, its just to make ik look like its scanning.
So when i press the LOG IN button, the kinect takes my picture and show me the picture, on top of it is showing me in a text that its scanning.
Now i am stuck with the following issue, when i press the login button, the scanning label appears, but i would like to fire an other event that takes me to the next page, the homepage.
So i want the SCANNING label appearing for 3 seconds, and then the page should change.
This is what i tried, i worked with a timer, but that doesnt do annything.

    private void ActionButton_Click(object sender, System.EventArgs eventArgs)
    {

        _main.TakePicture();
        identifyBox.Source = _main.source.Clone();
        scanningLabel.Visibility = Visibility.Visible;
        _storyboard = (Storyboard)FindResource("scanningSB");
        //_storyboard.Begin();
        Start();
    }

    private void Start()
    {
        _tm = new Timer(3000);
        _tm.Elapsed += new ElapsedEventHandler(_tm_Elapsed);
        _tm.Enabled = true;
    }

    void _tm_Elapsed(object sender, ElapsedEventArgs e)
    {
        if (_tm == new Timer(3000))
        {
             ((Timer)sender).Enabled = false; 
            _main.ContentPage.Children.Clear();
            _main.ContentPage.Children.Add(_homeScreen);
        }
    }

Okay i removed the if statement, but now it fires every 3 seconds a method.
How can i make it work 1 time.

Ok even this works, now i my ContentPage wont change? It gives me this error: The calling thread cannot access this object because a different thread owns it.
What can be wrong?

  • 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-05-27T19:24:13+00:00Added an answer on May 27, 2026 at 7:24 pm

    I think you can remove condition

    if (_tm == new Timer(3000))
    

    and keep it simple

    void _tm_Elapsed(object sender, ElapsedEventArgs e)
    {
    
        ((Timer)sender).Enabled = false; 
    
        _main.ContentPage.Children.Clear();
        _main.ContentPage.Children.Add(_homeScreen);
    
    }
    

    when you set _tm = new Timer(3000); it will set the time to fire event after 3 seconds..

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

Sidebar

Related Questions

I'm making an application and would like to test the toString method I just
I would like to start making my application's 64bit, however, I am not sure
I am making an application for a windows mobile smartphone, and I would like
I am making a small application and would like a small popup to come
I'm making an application in C# (with Express Edition) for which I would like
Im making an application which uses few languages. I would like to have possibility
While making a WPF application I would like to change the default FocusVisualStyle (the
I'm making a web application and I would like a cute jquery based menu
I am making a web application using php, and I would like to implement
I would like to distribute my 20-jar application as pack200 files, but I also

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.