Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugDragGestureRecognizer - codebehind - not working on iOS and Android - works on windows. #22545

Open
RobDaytona opened this issue May 21, 2024 · 6 comments
Labels
area-gestures Gesture types platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@RobDaytona
Copy link

RobDaytona commented May 21, 2024

Description

I create a new default maui app using the latest VS2022, I give the hello world label and ID and add a BugDragGestureRecognizer to it. The label can be dragged in Windows, but not iOS or Android - I am using physical devices with latest Operating systems.

Steps to Reproduce

Create File -> New Maui App
Open mainpage.xaml and give the Hello world an ID: of lbhelloWorld

 Update the MainPage.cs constructor method like so:
 
    public MainPage()
    {
        InitializeComponent();

        var dragGestureRecognizer = new DragGestureRecognizer
        {
            CanDrag = true
        };

        lbhelloWorld.GestureRecognizers.Add(dragGestureRecognizer);


    }

Run the project, you should be able to drag the Hello World label around, but cannot in iOS or Android

dotnet workload list

Installed Workload Id Manifest Version Installation Source

android 34.0.52/8.0.100 VS 17.9.34723.18
maui-windows 8.0.7/8.0.100 VS 17.9.34723.18
maccatalyst 17.2.8004/8.0.100 VS 17.9.34723.18
ios 17.2.8004/8.0.100 VS 17.9.34723.18

Use dotnet workload search to find additional workloads to install.

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 17.4.1 , Android Version 14

Did you find any workaround?

I have not found a work around please help.

Relevant log output

No response

@RobDaytona RobDaytona added the t/bug Something isn't working label May 21, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 21, 2024
@ninachen03
Copy link

Verified this issue with Visual Studio 17.10 Preview 7 (8.0.40 & 8.0.3 ). Can repro it.
code as below
image

image

@PureWeen
Copy link
Member

@ninachen03 can you attach your repro please?

@ninachen03
Copy link

@drasticactions drasticactions changed the title BugDragGestureRecognizer - codbehind - not working on iOS and Android - works on windows. BugDragGestureRecognizer - codebehind - not working on iOS and Android - works on windows. May 24, 2024
@RobDaytona
Copy link
Author

just checking in..

@kubaflo
Copy link
Contributor

kubaflo commented Jun 9, 2024

It works for me with the following code

    <ScrollView>
        <VerticalStackLayout>
            <Label Text="label" x:Name="label"/>
        </VerticalStackLayout>
    </ScrollView>
		public MainPage()
		{
			InitializeComponent(); 
			
			var dragGestureRecognizer = new DragGestureRecognizer
			{
				CanDrag = true
			};

        	       label.GestureRecognizers.Add(dragGestureRecognizer);
		}
Screen.Recording.2024-06-09.at.11.03.12.mov

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-gestures Gesture types platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants