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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:30:14+00:00 2026-06-17T02:30:14+00:00

I have a WPF application that uses a ComboBox with items populated from the

  • 0

I have a WPF application that uses a ComboBox with items populated from the server. The control works well in it’s current setup but has a small issue that I would like to resolve. When I click on the DropDown button to open the list of items I can only select items if the mouse is hovering over the text of that item. If I have the mouse hover over the row but not directly on the text then the control doesn’t seem to recognize that row should be selected. Is there anyway to set focus on the current row and not just on the item?

EDIT

The comboBox is stored in a UserControl that derives from a class that handles network transmission between the client and the server. The XAML just creates the control and assigns a name for it while the code behind does all of the logic. In this case the server sends information to be used for the combobox and in the snippet provided below takes the XML with the text items and assigns them to the control itself. This all works well but the problem is when the client tries to select the item. Unless the mouse is directly over the text the ComboBox doesn’t register. I would like to have it so that the ComboBox selects the item as long as the mouse is over the same row as the text.

XAML

<local:Control x:Class="ControlLibrary.ComboBox"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:local="clr-namespace:ControlLibrary" >
    <ComboBox Name="comboBox" FontWeight="Bold" />
</local:Control>  

C#

XmlNodeList nodelist = xmlNode.SelectNodes("Items");
comboBox.Items.Clear();
foreach (XmlNode node in nodelist)
{
    ComboBoxItem tempItem = new ComboBoxItem()
    {
        Content = node.Attributes["text"].Value
    };

    comboBox.Items.Add(tempItem);
}

Thanks in advance for the advice.

  • 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-17T02:30:15+00:00Added an answer on June 17, 2026 at 2:30 am

    Try to place this text box inside a dockpanel or grid

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

Sidebar

Related Questions

I have a WPF application that uses MVVM data bindings. I am adding items
I have a WPF windows application that uses the ms ribbon control for the
we have a WPF application that uses CurrentPrincipal to handle security. This all works
I have a simple WPF application that uses ClickOnce to handle installing. Within this
I have an application that uses WPF Composite, and I have an issue. I've
I have a fairly large application that uses WPF for its user interface. I
We have a WPF Application that runs from both desktop and as a XBAP
I have an WPF Full Tust explorer application that uses a COM assembly. In
I have a C# WPF (.NET 4.0) application that uses Excel interop to read
I have a WPF application that uses Caliburn.Micro. I have a DataGrid: <DataGrid x:Name=WeatherStations

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.