partial void ButtonClicked(NSObject sender) { string text = MessageTextField.Text; if (String.IsNullOrWhiteSpace(text)) { MDToast toast = new MDToast("Enter message to text field above", MDToast.DurationShort); toast.Show(); } else { MDToast toast = new MDToast(text, MDToast.DurationShort); toast.Show(); } }
public async Task CapturePhoto() { var videoConnection = stillImageOutput.ConnectionFromMediaType(AVMediaType.Video); var sampleBuffer = await stillImageOutput.CaptureStillImageTaskAsync(videoConnection); var jpegImageAsNsData = AVCaptureStillImageOutput.JpegStillToNSData(sampleBuffer); var image = new UIImage(jpegImageAsNsData); image.SaveToPhotosAlbum(null); var toast = new MDToast("Une photo est disponible dans votre bibliothèque", 2); toast.Show(); }
partial void handleSingleLineToast(MaterialControls.MDButton sender) { var toast = new MDToast("Toast test message", 1.0); toast.Show(); }
partial void handleLongLineToast(MaterialControls.MDButton sender) { var toast = new MDToast("Attention! This is a very very very long long text message", 1.0); toast.Show(); }