How to Keep popup open when press enter key in textbox

Ribbon for WPF Forum

Posted 8 years ago by Juan
Version: 13.1.0580
Avatar

Now I using a splitButton with some textbox in PopupGallery items.

Is therer any way to keep the popup open, when user finish typing and press enter key in these textboxs?

        <ribbon:SplitButton Click="..." >
        <ribbon:PopupGallery UseSingleColumn="True" ItemsSource="{Binding Path=...}" >
             <ribbon:PopupGallery.ItemTemplate>
                <DataTemplate>
                    <ribbon:TextBox Text ="{Binding Key, Mode=TwoWay}" />
                </DataTemplate>
              </ribbon:PopupGallery.ItemTemplate>
        </ribbon:PopupGallery>

Comments (1)

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Juan,

You could probably swap in a normal WPF TextBox instead. 

Or alternatively you could class a class that inherits ribbon:TextBox, override its OnKeyDown and block the base method call if Key.Return is pressed.


Actipro Software Support

The latest build of this product (v2020.1.0) was released 17 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.