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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:20:57+00:00 2026-05-10T21:20:57+00:00

I have a really simple WPF UserControl: <UserControl x:Class=dr.SitecoreCompare.WPF.ConnectionEntry xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml x:Name=connEntry BorderBrush=Navy BorderThickness=1

  • 0

I have a really simple WPF UserControl:

<UserControl x:Class='dr.SitecoreCompare.WPF.ConnectionEntry' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'  x:Name='connEntry'  BorderBrush='Navy' BorderThickness='1' Margin='5,0,0,5' > <StackPanel Margin='0,10,0,0' >     <Label FontWeight='ExtraBold' Content='{Binding ElementName=connEntry, Path=Title}'></Label>     <Label Margin='0,5,0,0'>Server:</Label>     <TextBox x:Name='txtServer' TabIndex='1' Text='{Binding Path=ServerName}' ></TextBox>     <Label>Database:</Label>     <TextBox x:Name='txtDatabase' TabIndex='2' Text='{Binding Path=DatabaseName}'></TextBox> </StackPanel> 

This is used twice in the same window. Now, I can select the first TextBox on both th instances of my UserControl, but the second (‘txtDatabase’) textbox cannot be selected, neither by tabbing or clicking. Why is this ? Am I missing something with regards to creating WPF usercontrols ?

EDIT: DatabaseName is not readonly, it is a simple property. The XAML for the window the usercontrol is placed on looks like this:

<Window x:Class='dr.SitecoreCompare.WPF.ProjectDialog'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'     xmlns:c='clr-namespace:dr.SitecoreCompare.WPF'            Title='Choose project' Height='280' Width='500'      WindowStartupLocation='CenterOwner' WindowStyle='SingleBorderWindow' HorizontalAlignment='Center' ShowInTaskbar='False' ShowActivated='True' ResizeMode='NoResize' VerticalContentAlignment='Top' VerticalAlignment='Center'>     <StackPanel>         <Label>Choose databases</Label>         <Grid>             <Grid.ColumnDefinitions>                 <ColumnDefinition />                 <ColumnDefinition />             </Grid.ColumnDefinitions>             <c:ConnectionEntry Grid.Column='0' x:Name='connMaster' Title='Master:' Padding='5' />             <c:ConnectionEntry Grid.Column='1' x:Name='connSlave'  Title='Slave:'  Padding='5' />         </Grid>         <StackPanel Orientation='Horizontal' HorizontalAlignment='Right' Margin='0,0' >             <Button x:Name='btnCancel' Click='btnCancel_Click'>Cancel</Button>             <Button x:Name='btnOK' Click='btnOK_Click'>OK</Button>         </StackPanel>     </StackPanel>  </Window> 
  • 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. 2026-05-10T21:20:58+00:00Added an answer on May 10, 2026 at 9:20 pm

    Try Mode=TwoWay in your binding. I’ve seen this where the initialization sets the value and the control can not set the the value.

    <TextBox x:Name='txtDatabase' TabIndex='2' Text='{Binding Path=DatabaseName, Mode=TwoWay}'></TextBox> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a really simple operation on a WPF app in order to try
I have a really strange problem with WPF. A simple window with a button
I have a really simple WPF ListBox with SelectionMode set to Multiple. <ListBox SelectionMode=Multiple
I have a really simple XML file that I'm trying to read, but I
I have a really simple Rails app. Basically an article with comments. I want
I have a really simple blog application and I want to add a really
I have a really simple mod-rewrite rule : RewriteRule ^(.*)$ index.php?url=$1 [PT,L] As an
I have a really simple table with two rows and two columns. I want
A really simple shell script question. I have a file with something like this:
I have what is probably a really simple, studid question but I can't find

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.