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
2320
Underlying TextBox in XamComboEditor
posted

I have a XamComboEditor for which I have set the XamComboEditor.ComboBoxStyle property in order to modify the item template of the dropdown list

Now, I want to set AcceptsReturn=true and VerticalAlignment=Top on the underlying TextBox. Can anyone point me in the right direction as to how to do this?

I have played with the supplied styles and templates to no end without success.

 

  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you put the following code in the EditModeStarted event of the XamComboEditor:

     

    var textbox = Utilities.GetDescendantFromName(xamComboEditor1, "PART_EditableTextBox");
    (textbox as TextBox).AcceptsReturn = true;
    (textbox as TextBox).VerticalAlignment = System.Windows.VerticalAlignment.Top;
    

     

    Feel free to write me if you have further questions.