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

Harshithraj1871 1,536 Reputation points
2023-10-31T08:49:51.76+00:00

Hi,

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.
791 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 9,766 Reputation points Microsoft Vendor
    2023-11-03T07:16:38.97+00:00

    Hello,

    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.

    Jeanine


    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 85,706 Reputation points
    2023-10-31T10:00:46.34+00:00

    You can use a MenuFlyout


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.