WinUI3 : Unable to drag button

Harshithraj1871 1,681 Reputation points
2022-12-20T06:56:16.637+00:00

Hi,

I'm trying to achieve Drag and Drop experience for Button , I did

272384-image.png
Should we have to do the same workaround suggested for the textbox - Ref ?

Thank You

Universal Windows Platform (UWP)
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.
844 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,889 questions
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 20,921 Reputation points Microsoft External Staff
    2022-12-21T02:21:32.76+00:00

    Hi @Harshithraj1871 ,

    I also can't drag and drop the control in my test.
    In document Drag and drop.

    Be specific about what's draggable. Users won't want to drag everything in your app, only certain items, such as images or text.

    So WinUI3 is designed like this.

    You can follow the two solutions I provided before. Although it is a bit troublesome, this is the only way for the time being.
    WinUI3: Drag Grid with Streached elements
    WinUi3: Unable to drag TextBox

    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.


0 additional answers

Sort by: Most helpful

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.