xamarin.android

To run or not run ConfigureAwait(false) with both services and activities with Xamarin Android ver 8, .net Standard

偶尔善良 提交于 2019-12-20 01:52:07
问题 I came across articles below regarding when and where to use ConfigureAwait(false) , but cannot get an answer. You Don’t Need ConfigureAwait(false), But Still Use It in Libraries, and UI apps. (e.g. Xamarin, WinForms etc) https://blog.stephencleary.com/2017/03/aspnetcore-synchronization-context.html This link says opposite answer Best practice to call ConfigureAwait for all server-side code When correctly use Task.Run and when just async-await My questions: Scenario 1 : The code below is

How to use PCL in ASP.NET Core 1.0 RC2 project

时光毁灭记忆、已成空白 提交于 2019-12-20 01:41:47
问题 I want to use a simple (POCO only without other dependencies) PCL with targets Xamarin.Android Universal Windows 10 ASP.NET Core 1.0 in an ASP.NET Core 1.0 RC2 project (all in the same solution). I have added this import to my project.json: "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net451+win8" ], "dependencies": { "PCL.Library": { "target": "project" } } } } I don’t get any errors (compilation or otherwise) and the PCL.Library project shows up in the

ClearableEdittext for xamarin android

馋奶兔 提交于 2019-12-20 01:41:15
问题 I have visited this link and many other links on the stack but I'm unable to find a similar solution for xamarin android : https://stackoverflow.com/a/14470930/7462031 I have implemented the frame layout solution but I want this solution throughout my application So the Clearable Edittext Looked interesting but the droid parts library is not available for xamarin so I am wondering if anyone has a solution for this problem in case you do kindly Help.! 回答1: I achieved it by doing the following

ClearableEdittext for xamarin android

…衆ロ難τιáo~ 提交于 2019-12-20 01:41:03
问题 I have visited this link and many other links on the stack but I'm unable to find a similar solution for xamarin android : https://stackoverflow.com/a/14470930/7462031 I have implemented the frame layout solution but I want this solution throughout my application So the Clearable Edittext Looked interesting but the droid parts library is not available for xamarin so I am wondering if anyone has a solution for this problem in case you do kindly Help.! 回答1: I achieved it by doing the following

the name resources does not exist in the current context Xamarin

本秂侑毒 提交于 2019-12-20 00:59:10
问题 public class MainActivity : Activity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main); EditText val1 = FindViewById<EditText>(Resource.Id.txtuser1); EditText val2 = FindViewById<EditText>(Resource.Id.txtuser2); Error : The name 'Resource' does not exist in the current context. 回答1: I was so resolved (by visual studio) Remove 3 line SetContentView(Resource.Layout.Main); EditText val1 = FindViewById<EditText>

“Resource” contains no Definition for “Animation”

女生的网名这么多〃 提交于 2019-12-19 18:24:49
问题 So i'm currently in the process of evaluating trials of Xamarin.Forms and UI for XamarinForms from telerik. Unfortunately once i link the libraries to the telerik dll's i'm getting a messed up Resource.Designer.cs file. I'm getting 5000 errors of "Resource" contains no Definition for "Animation". (also Resource.Drawable, Resource.Style, Styleable,...) from code like this: public static void UpdateIdValues() { global::Telerik.XamarinForms.ChartRenderer.Android.Resource.Animation.abc_fade_in =

System.IO.FileNotFoundException: Could not load assembly…perhaps doesn't exist in the Mono for Android Profile?

余生长醉 提交于 2019-12-19 18:23:06
问题 I am getting the following error when trying to compile my Android App from Visual Studio (I am using Xamarin plug in). Error 2 Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'PresentationUI.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference,

Binding the Enabled property of a Android button with the MvvmCross

别说谁变了你拦得住时间么 提交于 2019-12-19 18:20:18
问题 I have a problem when I try to bind the "Enabled" property of my Android Button to a Boolean of my ViewModel using the MvvmCross framework and I really don't know the origin of it. So I have a ViewModel which contains the two following properties : private ProjectDetailDTO _projectDetail; public ProjectDetailDTO ProjectDetail { get { return this._projectDetail; } set { _projectDetail = value; RaisePropertyChanged(() => ProjectDetail); RaisePropertyChanged(() => HasPicture); } } private bool

How to add libraries to Xamarin References lists

有些话、适合烂在心里 提交于 2019-12-19 17:27:55
问题 Is there a place to put libraries(dlls) so they show up in the References list in a project to be selected. I know I can manually add them from my personal library, however I would like to be able to have them in the available list so all I need to do is select them. I assume there would be some way to indicate which platform they are for. 回答1: Under Edit References select .Net Assemblies and pick the dll to add to the project. When it is added the first time it will be in the references for

Cannot upgrade nuget packages for Xamarin.Android

喜欢而已 提交于 2019-12-19 17:24:51
问题 I started blank cross-platform projects in Visual Studio 2015 update 2: Visual C# -> Cross-platform -> Blank App (Xamarin.Forms portable). It created 6 projects in the solution. Then I tried to update nugget packages for all of them. Needless to say the firs problem I encountered was the unnecessary reference to *design assemblies. I managed to corrected it. Then I got following message when I see 6 nuget packages are ready to update, 5 of them are for Andriod, and 1 is the newer version of