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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:08:14+00:00 2026-05-15T14:08:14+00:00

One user control is a list box where each item in the list has

  • 0

One user control is a list box where each item in the list has a button. When the button is clicked, editable detail about the item is displayed in another user control. The detail knows what to display and how to display it via data binding to a view model. Both user controls are in the same window.

The problem I am finding tricky here is to set the focus to the first non read only text box.

I have seen one solution here that involves writing a markup extension. It’s also a bit old now though, and I am wondering if there is a simpler way to do this.

Cheers,
Berryl

I should have pointed out that the EditCommand that is the trigger for getting the focus to the textbox is in a view model bound to the listing user control. I don’t mind having code behind for ui concerns though.

UPDATE
Here’s a recent nifty post by Josh Smith that addresses part of what the intention is here; to be able to control focus through the ViewModel.

  • 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-15T14:08:15+00:00Added an answer on May 15, 2026 at 2:08 pm

    Alright, there may be other ways to do this but because the Josh Smith solution I alluded to in my question uses the Data Binding framework itself, it is a no brainer for use with MVVM. No mucking around with the visual tree or trying to twist your mind around nested controls – simple, elegant, and best of all it works!

    BH

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

Sidebar

Related Questions

I have made one custom user control (search text box), which basically consists of
I've created a user control (in vb.net code) that contains two dock panels, one
The user sees a form with many controls, including a list box. He selects
I have a list and I am using a web user control and the
I am using a strongly typed user control in one of the view. The
I’m creating a UserControl for a rich TreeView (one that has context menus for
One of our programs is sometimes getting an OutOfMemory error on one user's machine,
I have one user who gets an error message when he closes his browser.
I installed Python 2.6 for one user on Windows Vista. Python works okay, but
How would you ensure that only one user is logged in per account at

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.