Last active
October 4, 2017 20:24
-
-
Save hartez/646fe8d96ab037991b6235f3d224e6c9 to your computer and use it in GitHub Desktop.
View accepts input after translation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TranslatePage : ContentPage | |
{ | |
public TranslatePage() | |
{ | |
var layout = new RelativeLayout(); | |
double viewSize = 100; | |
var box = new Entry | |
{ | |
HeightRequest = viewSize, | |
WidthRequest = viewSize, | |
Placeholder = "entry", | |
}; | |
layout.Children.Add(box, | |
Constraint.RelativeToParent(parent => -110), | |
Constraint.RelativeToParent(parent => - 110), | |
Constraint.Constant(viewSize), Constraint.Constant(viewSize)); | |
Content = layout; | |
var startGesture = new TapGestureRecognizer | |
{ | |
Command = new Command(async () => | |
{ | |
await box.TranslateTo(200, 200); | |
}) | |
}; | |
layout.GestureRecognizers.Add(startGesture); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment