Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Highlighting the text in XamComboEditor with mouse click
posted

Hi,

I want following behaviour in XamComboEditor: when I do the mouse left click, it should select the text displayed in the combo box. I have tried to use GotMouseCapture event and comboEditor.Focus() but it is not working. Below is the parts of the code:

Xaml:

<ig:XamComboEditor
Name="xamSearchBox"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Standard"
IsEditable="True"
DropDownButtonDisplayMode="Focused"
AllowDropDownResizing="True"
GotMouseCapture="xamSearchBox_GotMouseCapture"
>

C#:

private void xamSearchBox_GotMouseCapture(object sender, System.Windows.Input.MouseEventArgs e)
{
   xamSearchBox.Focus();
}

 

Parents
  • 16495
    Offline posted

    Hello,

     

    Thank you for your post.

     

    I have been looking into it. I have created a small sample application and it seem the default behavior of XamComboEditor is to get focus and select the text when click on it with mouse left  button.  I could not managed to reproduce the behavior that you have described. If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter. I created a short video to show you how the application work on my, please let me know if I am missing something from your scenario.

     

    Looking forward to hearing from you.

    XamComboEditorMouseLeftButton-sampleAndVideo.zip
Reply Children