xamarin-forms

Get value of Xamarin Forms Custom Rendered Checkbox

瘦欲@ 提交于 2020-01-07 05:07:10
问题 I have a Checkbox view rendering properly in Xamarin Forms: public class CheckBoxRenderer : ViewRenderer<LegalCheckbox, CheckBox> { protected override void OnElementChanged(ElementChangedEventArgs<LegalCheckbox> e) { base.OnElementChanged (e); CheckBox control = new Android.Widget.CheckBox(this.Context); control.Checked = false; control.Text = "I agree to terms"; control.SetTextColor (Android.Graphics.Color.Rgb (60, 60, 60)); this.SetNativeControl(control); } } I want to check whether or not

MvvmCross - How to get iOS Views to load from a different assembly?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-06 19:57:22
问题 I am trying to get the Views in my xamarin-forms + mvvmcross project to load correctly with no luck. Project structure breakdown: Project: Shared.Core - 100% cross platform code, view models, models, etc.. Project: Shared.Mobile - Xamarin-forms views Project: iOS - uses shared views Project: Android - uses shared views Project: UWP - uses shared views Project: WPF - uses WPF native views I have a working WPF project using mvvmcross and am trying to get the mobile going starting with iOS. The

Xamarin “GenerateResourceDesigner” task failed unexpectedly and .dll file could not be found

最后都变了- 提交于 2020-01-04 04:31:28
问题 Hi I'm running a Xamarin PCL project thats deploying to all platforms including UWP windows 10 and windows 8. I've just merged a branch on git and resolved some conflicts (not very well clearly) and i'm getting a few errors. The first error: The "GenerateResourceDesigner" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'Vigour, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Vigour.dll' at

Xamarin “GenerateResourceDesigner” task failed unexpectedly and .dll file could not be found

六眼飞鱼酱① 提交于 2020-01-04 04:31:05
问题 Hi I'm running a Xamarin PCL project thats deploying to all platforms including UWP windows 10 and windows 8. I've just merged a branch on git and resolved some conflicts (not very well clearly) and i'm getting a few errors. The first error: The "GenerateResourceDesigner" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'Vigour, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Vigour.dll' at

App resuming results in crash with FormsAppCompatActivity

霸气de小男生 提交于 2019-12-30 18:53:18
问题 I have a Xamarin Forms app, currently being built for Android. I have a MainActivity that used to extend FormsApplicationActivity , but because I want to use a custom theme I had to change it to extend FormsAppCompatActivity (see my other question: Xamarin Forms custom theme not working). Ever since changing from FormsApplicationActivity to FormsAppCompatActivity the app crashes whenever I switch out of the app and then back into the app. It throws an error in the App.xaml.cs class in the

Create Multiselect Listview with Xamarin Forms(Xamarin Cross Platform)

本小妞迷上赌 提交于 2019-12-23 03:40:44
问题 I am trying to implement a Listview with Checkbox controll in each item of Listview.If I want to delete two items I will check those two items and click of delete it should delete.I explored more about this kind of concept but not able to find single demo example in Github as well. Programming Language:Xamarin forms not in Xamarin android or Xamain IOS.I already know how to implement in those platforms.But I dont have any sample code at least to for better understanding of "Multiselect and

Migrating to FormsApplicationActivity causing exceptions in NavigationRenderer

半世苍凉 提交于 2019-12-23 02:47:14
问题 In my app I replaced AndroidActivity with FormsAppCompatActivity. Now in a custom renderer extending NavigationRenderer, I get an exception that's traced to method Xamarin.Forms.Platform.Android.NavigationRenderer.SwitchContentAsync: [MonoDroid] UNHANDLED EXCEPTION: [MonoDroid] System.InvalidCastException: Cannot cast from source type to destination type. [MonoDroid] at Xamarin.Forms.Platform.Android.NavigationRenderer.SwitchContentAsync (Xamarin.Forms.Page,bool,bool) <IL 0x000bd, 0x003fe>

Xamarin Forms custom theme not working

♀尐吖头ヾ 提交于 2019-12-22 19:25:10
问题 I have an Android app that uses Xamarin Forms 2.0. I made a custom theme to set some colors. I created these files: Resources/values/styles.xml (AndroidResource) <?xml version="1.0" encoding="utf-8" ?> <resources> <style name="SmartbitLight" parent="SmartbitLight.Base"> </style> <style name="SmartbitLight.Base" parent="Theme.AppCompat.NoActionBar"> <item name="colorPrimary">@color/blueLight</item> <item name="colorPrimaryDark">@color/blueDark</item> <item name="colorAccent">@color/grey</item>

How to change Xamarin back button in menu bar?

十年热恋 提交于 2019-12-22 10:56:36
问题 this is what I have: this is what I want to get: If there is no pages in navigation stack, then title icon will be in left corner, else there will be back arrow and "Back" text. I didn't find any options to customize it, is it possible at all? 回答1: You can change arrow to hamburger icon if you use your MasterPage within NavigationPage: Detail = new NavigationPage(masterPage); If you want to hide icon - it only applies to Android. It can be solved with custom renderer (http://developer.xamarin

Xamarin Forms Android App Crashes Running Debug with VS Android Emulator

若如初见. 提交于 2019-12-17 07:23:41
问题 I have a basic Xamarin Forms app I created. It works fine against the iOS simulator. However when I try and run with a VS Android Emulator (5.1in Marshmallow) it crashes every time upon opening. Even when I try and run without debugging. Below is the error I keep seeing: 01-14 16:22:10.290 D/Mono ( 1366): AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/App3.Droid-2/libaot-mscorlib.dll.so" not found 01-14 16:22:10.290 D/Mono ( 1366): AOT module '/Users/builder