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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:15:18+00:00 2026-05-23T21:15:18+00:00

I believe that when my application starts nothing is focused. At least it looks

  • 0

I believe that when my application starts nothing is focused. At least it looks like it. I would like to add event handler to GotFocus event so control shows popup and loses focus, so popup can be shown again without manually removing focus and setting it back. Also it is not needed to have my textbox in focused visual state cause its serving no use to user (this can be changed by template though but answer on this question resolves both issues).

If I am mistaken with my initial observation and something is always focused in silverlight I would like to know what to focus so it looks like nothing is focused (like when app starts). If there is a way to remove visible focus completely – such approach will be better.

EDIT: Actually in my case it turned out a control that had no visualstyle difference when focused was focused at the start of application. I didn’t find anything smarter to do then to focus it in my Unfocus() related method.. To go a bit further I can recommend hitting [enter] key and see what happens, in my case it also changed focused control state, that looked like its unfocused.

Note taken : in Silverlight there is no “nothing focused state”

  • 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-23T21:15:19+00:00Added an answer on May 23, 2026 at 9:15 pm

    Focus in Silverlight is notoriously difficult to manage.

    There are lots of controls that can have focus that show no visual difference when they have focus – very different from WinForms.

    I’ve found it useful the following class useful in some of my Silverlight apps to try to figure out focus problems:

    public static class WatchWhatsGotFocus
    {
        private static DispatcherTimer t;
    
        public static void StartWatching()
        {
            t = new DispatcherTimer();
            t.Interval = TimeSpan.FromMilliseconds(500);
            t.Tick += t_Tick;
            t.Start();
        }
    
        public static void StopWatching()
        {
            if (t != null)
            {
                t.Stop();
                t = null;
            }
        }
    
        static void t_Tick(object sender, EventArgs e)
        {
            var element = FocusManager.GetFocusedElement();            
            if (element != null)
                Debug.WriteLine("Focused element: {0}", element.ToString());
            else
            {
                Debug.WriteLine("No focused element");
            }
        }
    }
    

    So, somewhere in your app, just call WatchWhatsGotFocus.StartWatching() and you’ll see what’s going on.

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

Sidebar

Related Questions

I have a Spring application that I believe has some bottlenecks, so I'd like
I'm using VS2008 to debug an application that starts a new process. I believe
I want to begin unit testing our application, because I believe that this is
While developer a client side application I ran into an error that I believe
I believe that UIView objects can delegate control to views in iOS programming. However,
When the spring.net framework starts up for an asp.net application does the component that
I believe that the rallytagpicker is definitely a useful component. However, I do not
I believe that I did everything necessary to change my app for ipad (was
I believe that in C99, modification of string literals is undefined behaviour. I don't
I used to believe that any variable that is shared between two threads, can

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.