WinUI3 : How to add Inline selection table in TextBox or RichEditBox

Harshithraj1871 1,356 Reputation points


I'm working on WinUI3 desktop application in cpp. I want an inline selection table in TextBox/RichRditBox like this,

User's image

How can I get a selection list in middle of RichEditBox/textBox like above. One way i could think of is to add the TextBox in Canvas and place a ListView in cursor position with help of the parent Canvas. Is there any better way to do this?

thank you

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
655 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 7,696 Reputation points Microsoft Vendor


    Welcome to Microsoft Q&A!

    How to set an height and width for MenuFlyout and can we get its scroll viewer?

    You can't style a MenuFlyout directly. Instead, you apply a style to the MenuFlyoutPresenter that provides the visuals for the flyout. And then you could use a Setter to set the Width of the MenuFlyout.

    And you couldn't set an height for MenuFlyout.

    You could refer to the docs:

    MenuFlyout.MenuFlyoutPresenterStyle Property

    MenuFlyoutPresenter Class

    is there a way to get fouc on both.

    There is no way to get fouc on both.

    As far as I'm concerned, there is no better way to do this.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

1 additional answer

Sort by: Most helpful
  1. Castorix31 79,921 Reputation points

    You can use a MenuFlyout