xamarin-forms

Detect tap on / off AVPlayerViewController controls

可紊 提交于 2019-12-12 11:56:50
问题 Based on the answer from this question, I have implemented an event handler that detects when an AVPlayerItem finishes 'naturally'(through AVPlayerItem.DidPlayToEndTimeNotification ) and when it finishes because the user has used the seek bar to reach the end of the video (through AVPlayerItem.TimeJumpedNotification ). I would like to extend this further by checking, in the event handler for the second case, whether the user has stopped seeking - i.e their finger has been lifted from the

Detect user skipping to end of AVPlayer video

ε祈祈猫儿з 提交于 2019-12-12 02:40:06
问题 I've written a Xamarin.Forms iOS app Page that users an AVPlayer to play a video via a custom page renderer. When the video finishes, or when the user scrubs to the end of the video (using controls created by AVPlayerViewController ), they should be sent to the next ContentPage in the app. I can track when the video 'naturally' finishes by observing the AVPlayerItem.DidPlayToEndTimeNotification on the AVPlayerItem _playerItem , like so: videoEndNotificationToken = NSNotificationCenter

Xamarin - Could not load assembly 'PCLStorage.Abstractions

℡╲_俬逩灬. 提交于 2019-12-11 01:06:18
问题 After adding the FlurlHttp Nuget package to my PCL project my app will no longer deploy to my emulator due to an assembly loading error Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'PCLStorage.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'PCLStorage.Abstractions.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve

XamarinForms AppCompat OnOptionsItemSelected

荒凉一梦 提交于 2019-12-10 18:45:25
问题 I have recently updated xamarin forms to 1.5.1-pre1 so that I can use the beautiful AppCompat themes. It works and looks very nice. I do have one problem, in my old FormsApplicationActivity I used to override the OnOptionsItemSelected method to intercept when the user was clicking on the back arrow icon and do some viewmodel cleanup. Apparently this method is not being called after using the FormsAppCompatActivity. How can I intercept the "soft" back button press (toolbar icon not hard back

Xamarin Forms: How to use Embedded Resources in PCL Project for Image

风流意气都作罢 提交于 2019-12-10 14:48:43
问题 I have 4 Images in my Resources Directory into my Portable Project and i would like to use them directly for an ImageSource (because i need to bind it). ImageSource myImageSource = ImageSource.FromResource("resources.image.png"); I tried this but it doesn't recognize the path. How can i use my images for an ImageSource ? 回答1: Ok, my bad i forgot the name of my project before the Resources directory ImageSource myImageSource = ImageSource.FromResource("NameOfProject.Resources.image.png"); 来源:

Google Place Autocomplete in Xamarin.Forms

半城伤御伤魂 提交于 2019-12-10 13:54:21
问题 Has anyone integrated Google Place Autocomplete using Xamarin.Forms? I am to use it on a map for location suggestions. I've only seen resources for Xamarin.Android and Xamarin.iOS but on the part of implementing the AutoCompleteView, that I also don't know. I would be very thankful if someone could guide me with this. Thank you! 回答1: Place autocomplete can be implemented by using the Google Place API, whenever user enter a character, matching location with the entered character will be

Xamarin Forms InitializeComponent does not exist

吃可爱长大的小学妹 提交于 2019-12-10 04:04:57
问题 I am learning Xamarin Forms for Visual Studio 2015 and trying to create a simple Shared project using Xaml but I keep getting InitializeComponent does not exist (as well as any reference to Xaml controls in cs classes). It is my understanding that in the latest versions of Xamarin, Xaml works in Shared Xamarin Forms Projects (and not only in PCL projects). I've tried running the latest betas that got released less than a month ago but still no luck. Any advice is greatly appreciated. 回答1:

How to bind collection of images in Xamarin Forms Cross-Platform

旧时模样 提交于 2019-12-08 08:24:23
问题 In WPF , I can easily bind a collection of image sources to a WrapPanel with image template for instance: <ItemsControl ItemsSource="{Binding YourChildItems}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> I cannot find an alternative Cross-platform Xamarin Forms way of binding my Image collection to any panel based control. 回答1: There is an equivalent of ItemsControl in Xamarin.Forms labs called RepeaterView . It

Xamarin forms increase ProgressBar height

青春壹個敷衍的年華 提交于 2019-12-07 19:07:41
问题 I have been developing a Xamarin forms application. I want to increase the height of the progress bar control. I used custom renders to change the color of the progress control. But I couldn't find any way to increase the height. Please help me. following is my Custom render class. public class MyProgressBarRenderer:ProgressBarRenderer { protected override void OnElementChanged ( ElementChangedEventArgs<Xamarin.Forms.ProgressBar> e) { base.OnElementChanged (e); Control.ProgressTintColor =

Xamarin forms increase ProgressBar height

半世苍凉 提交于 2019-12-06 10:35:02
I have been developing a Xamarin forms application. I want to increase the height of the progress bar control. I used custom renders to change the color of the progress control. But I couldn't find any way to increase the height. Please help me. following is my Custom render class. public class MyProgressBarRenderer:ProgressBarRenderer { protected override void OnElementChanged ( ElementChangedEventArgs<Xamarin.Forms.ProgressBar> e) { base.OnElementChanged (e); Control.ProgressTintColor = Color.FromHex ("#254f5e").ToUIColor(); } } Add this override to MyProgressBarRenderer, and adjust Y as