CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Posts
    57

    How can we handle Enter key on richTextBox in WPF?

    Hi friends.
    I want to handle Enter key or Space bar key on richTextBox in WPF.
    By KeyDawn event I couldn't do it.

    Can you help me ?

  2. #2
    Join Date
    Jun 2008
    Posts
    57

    Re: How can we handle Enter key on richTextBox in WPF?

    OK. I found it :

    <RichTextBox Name="t" PreviewKeyDown="t_PreviewKeyDown"></RichTextBox>


  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can we handle Enter key on richTextBox in WPF?

    Yes. In general any WPF event that has a 'Preview' prefix is fired before the operation has occurred.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured