Tag: xamarin

2020.09.01.

Xamarin.Forms save and open PDF file

This project you can find at: https://github.com/officialdoniald/Xamarin.Forms.Save.Open.PDF. It could be a real situation that your app need to save or open a pdf file. How can it possible? Throught DependencyService. There are many companies, who deal with generationg PDF Document in Xamarin.Forms. We need to create a PDF Document first and than save it. But if you want to open an exists document, just read […]

2020.09.01.

Xamarin.Forms – Android – change the Theme at runtime

This project you can find at: https://github.com/officialdoniald/Xamarin.Forms—Change-Android-Theme-at-runtime In the .NET Standard/PCL Project we can’t say that, please change the Theme right now, because wehave to implement some platform specific implementation in the Android project. How can the two project communicate? Now, we will see another way, unlike the previous ones, we will use events, not dependency service. So, let’s create our event class in the […]

2020.09.01.

Xamarin.Android.SerialPort

This project you can find at: https://github.com/officialdoniald/Xamarin.Android.SerialPort. Serial Port wrapper for Xamarin.Android. If you want to change some feature of the Serial Port, just clone this repo and change it. In the SerialPort project you have to go to the SerialPortWrapper folder and the SerialPort.cs. After the update you have to Rebuild, and if you want to use the recently updatet SerialPort class, you have […]

2020.09.01.

Xamarin.Android.CanBus

This project you can find at: https://github.com/officialdoniald/Xamarin.Android.Canbus. Usage: Don’t forget to copy the lib folder to your project! First step: copy the lib folder to you project. You have to change the Properties of theese files: libcanbus.so: AndroidNativeLibrary canbus_helper.jar: AndroidJavaLibrary canbus_micro_fixed.jar: AndroidJavaLibrary Create Canbus: Canbus _canbus = _canbus = new Canbus(250000); _canbus.PackageReceive += Canbus_PackageReceive; _canbus.CanbusStatusChanged += Canbus_CanbusStatusChanged; _canbus.CanbusExceptionOccour += Canbus_CanbusExceptionOccour; Read from the Canbus: Sending […]

2020.09.01.

Xamarin.Forms – change cursor’s color – Android

This code (https://github.com/officialdoniald/Xamarin.Forms.CustomControls/blob/master/XamarinForms.CustomControls/XamarinForms.CustomControls.Android/CustomRenderer/CustomEntryRenderer.cs ) : IntPtr IntPtrtextViewClass = JNIEnv.FindClass(typeof(TextView)); IntPtr mCursorDrawableResProperty = JNIEnv.GetFieldID(IntPtrtextViewClass, “mCursorDrawableRes”, “I”); will change the cursor’s color. If you want to really change the color of the cursor, you have to create in the Resources/Drawable folder a my_cursor.xml file: https://github.com/officialdoniald/Xamarin.Forms.CustomControls/blob/master/XamarinForms.CustomControls/XamarinForms.CustomControls.Android/Resources/drawable/my_cursor.xml <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle”> <solid android:color=”@color/colorCursors”></solid> <size android:width=”2dp” /> </shape> @color/colorCursors is a color from the Resources/values/color.xml. If you don’t have this file, […]

2020.09.01.

Xamarin.Forms – CustomSearchBar

This project, you can find at: https://github.com/officialdoniald/Xamarin.Forms.CustomControls We have to create some platforms specific code (custom NavigationPage Renderer), because in the base Xamarin.Forms code, we can’t find this implementation. So first step, we have to create a class in the .NET Standard/PCL project: CustomSearchBar ( https://github.com/officialdoniald/Xamarin.Forms.CustomControls/blob/master/XamarinForms.CustomControls/XamarinForms.CustomControls/SearchBar/CustomSearchBar.cs ). using Xamarin.Forms; namespace XamarinForms.CustomControls.SearchBar { public class CustomSearchBar : Xamarin.Forms.SearchBar { public static readonly BindableProperty BorderColorProperty = BindableProperty.Create(nameof(BorderColor), […]

2020.09.01.

Xamarin.Forms – ListView – CustomTextCell

This project, you can find at: https://github.com/officialdoniald/Xamarin.Forms.CustomControls We have to create some platforms specific code (custom NavigationPage Renderer), because in the base Xamarin.Forms code, we can’t find this implementation. So first step, we have to create a class in the .NET Standard/PCL project: CustomTextCell ( https://github.com/officialdoniald/Xamarin.Forms.CustomControls/blob/master/XamarinForms.CustomControls/XamarinForms.CustomControls/ListView/CustomTextCell.cs ). using Xamarin.Forms; namespace XamarinForms.CustomControls.ListView { public class CustomTextCell : TextCell { public static readonly BindableProperty TextFontSizeProperty = BindableProperty.Create(“TextFontSize”, […]

2020.09.01.

Xamarin.Forms.AzureEasyTable NuGetPackage

With this Package, you can use the essential database functions with your Azure Easy Tables. You don’t have to write all of your Tables all functions, just create the Model of your Table with a string id and give it to the functions.What should we do?Step Zero: we must create an Azure Easy Table.First step: we have to download Xamarin.Azure.EasyTableFunctions this NuGetPackage.Than we must create […]