locked
Context Menu is not displaying for disable Textbox RRS feed

  • Question

  • Hi,

      I am creating my custom ContextMenu and placing on a TextBox.

    If TextBox is enable/IsReadOnly= false then ContextMenu is displaying(on right click ) But if i make TextBox disable/IsReadOnly=True then context menu is not displaying.

    Is there any settings so that contextmenu should display for selected disable textbox?

    Thanks

    Harsh

    Friday, March 22, 2013 11:25 AM

Answers

All replies

  • Not exactly, if you had some content in the textbox and it's selected I think you can get it to work.

    http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/70bd387f-be77-4f31-8069-99350861e4a9/

    I think an alternative might be a custom control yourtextbox which overrides the standard right click behaviour.

    • Marked as answer by Lisa Zhu Wednesday, April 3, 2013 3:52 PM
    Friday, March 22, 2013 12:16 PM
  • Disabling any control disables the context menu.  It the same for Tooltip.

    Guess the question is : What are you trying to accomplish by making the control both disabled and readonly.  Seems to me that if the textbox is readonly then disabled is pretty much redundant.

    LS


    Lloyd Sheen

    Friday, March 22, 2013 4:19 PM