Questions tagged c#

Explore the latest questions and answers asked by our top developers.

Xamarin Forms Properties VS Xamarin Essentials Preferences

I have recently started using the Xamarin Essentials and I personally love the work the team has done on the package. I was just going through the documents for the same i.e. and I got Across the Preferences API which look slick and work well too. But what I would personally like to know is […]

By FreakyAli
Published
Categorised as Uncategorised Tagged , , , ,

How to get device token in iOS 13 with Xamarin?

Our RegisteredForRemoteNotifications code broke because the token was retrieved with: deviceToken.ToString().Trim(‘<‘).Trim(‘>’).Replace(” “, “”); This used to work but not with iOS 13 because the data will be like this: “{length = 32, bytes = 0x965b251c 6cb1926d e3cb366f dfb16ddd … 5f857679 376eab7c }” There’s answers for how to do this correctly with objective c and swift […]

By axlrtr
Published
Categorised as Uncategorised Tagged , , , ,

Read AVAudioPcmBuffer audio data as a float[] in C# Xamarin.iOS

I am attempting to read audio data from an AVAudioPCMBuffer into an array of float values. The following is an extension method I have created for this purpose: public static float[] ToFloatArray(this AVAudioPcmBuffer pcmBuffer) { if ((pcmBuffer != null) && (pcmBuffer.FloatChannelData != IntPtr.Zero)) { int length = (Convert.ToInt32(pcmBuffer.FrameLength) * 2); if (length > 0) { […]

By Lemonseed
Published
Categorised as Uncategorised Tagged , ,

Xamarin.iOS Operation is not supported on this platform Exception at Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateDynamicMethod

I’m working on a cross-platform project with Xamarin.Forms. In my project, I’m using an API to login by a username and password. When I try to login on Android and UWP platorms, it works perfectly. But when I want to login in my iOS project, It throws an exception that says: System.PlatformNotSupportedException: Operation is not […]

By Amir Abdollahi
Published
Categorised as Uncategorised Tagged , , ,

Xamarin.iOS handle push notification when app is not closed

I managed to handle push notification if the app is in the background using the method didReceiveRemoteNotification. Is there a way to handle the push notification if the app is in the foreground and not closed ? Thanks Source: Xamarin.ios Questions

By Seif Selmi
Published
Categorised as Uncategorised Tagged , ,

How to change Navigationbar title irrespective of Tab title

I am setting the page title on the Navigationbar as public Homework () { InitializeComponent (); Title = “Homework”; } This page is a child page of Tabbed page where the Tab already has the Title “Tab1”. Now when I open the Homework.cs page from Tab1, The above code changing Tab title to Homework and […]

By Priyanka Agrawal
Published
Categorised as Uncategorised Tagged , ,

Entry show and hide password

I want an entry to have an icon before the placeholder, and a icon in the end of the entry, to show and hide the text in the entry, i had an entry with the show and hide icon using this tutorial: https://www.techierathore.com/2017/09/xamarin-forms-tip-implement-show-hide-password-using-effects/ But now I want to have icons before the entry too, I […]

By Phill
Published
Categorised as Uncategorised Tagged , , , ,

How to Change the Color of Slider on Xamarin.Forms, on Android, iOs, UWP using custom renderers?

I have changed successfully the color of the Slider on Android creating a Custom Renderer Here the example. [assembly: ExportRenderer(typeof(CustomSlider), typeof(CustomSliderRenderer))] namespace ForteMultiplataform.Droid { public class CustomSliderRenderer : SliderRenderer { public CustomSliderRenderer(Context context) : base(context) { } protected override void OnElementChanged(ElementChangedEventArgs<Slider> e) { base.OnElementChanged(e); if (e.NewElement != null) { string colorSlider = “#008000”; Control.ProgressDrawable.SetColorFilter(Xamarin.Forms.Color.FromHex(colorSlider).ToAndroid(), PorterDuff.Mode.SrcIn); […]

By Led Machine
Published
Categorised as Uncategorised Tagged , , , ,

Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries

I am working on xamarin ios app and trying to push a ViewController in a simple manner but after repeating the process of (push and go back, push and go back,..) i got an error. Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of […]

By hmali
Published
Categorised as Uncategorised Tagged , ,

Xamarin Forms – Equivalent of CollectionViewSource

In WPF and other XAML based technologies there was a class called CollectionViewSource. It was useful because rather than filtering and sorting inline etc. one would put a layer over the top of the actual collection, and only expose the sorted/filtered view to the UI. This meant that the model would stay clean while the […]

By Christian Findlay
Published
Categorised as Uncategorised Tagged , , , ,
1 10 11 12 13 14

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq