portable-class-library

Xamarin.forms how to Change the Nav Bar Color [duplicate]

梦想的初衷 提交于 2019-12-06 19:48:27
This question already has answers here : How to change backGround color in Xamarin forms NavigationPage (3 answers) Closed 3 years ago . I am trying to change the nav BarBackgroundColor background color on portable class library project, so how to Change the Nav Bar Color on Xamarin.Forms The NavigationPage has a BarBackgroundColor property which you can set. https://developer.xamarin.com/api/type/Xamarin.Forms.NavigationPage/ var nav = new NavigationPage(new ContentPage { Title = "Page" } ); nav.BarBackgroundColor = Color.Blue; 来源: https://stackoverflow.com/questions/36062495/xamarin-forms

Tab Control in MVVM CROSS

这一生的挚爱 提交于 2019-12-06 16:08:40
问题 We are developing an application that supports WP, Android & iOS operating systems using Xamarin framework. Need to create two tabs Filter & Search, using filter tab will select some values from drop down, date picker and load the listing grid of search tab. But I couldn't able to find a sample application for creating tab control in MVVM CROSS (Portable Library Class). ViewModel Class: public class SearchWOViewModel : MvxViewModel { public readonly ISearchWOService _serachwo; public

Portable Class Library - you must add a reference to assembly 'System.Net, Version=2.0.5.0

折月煮酒 提交于 2019-12-06 15:59:58
We have a Portable Class Library targeting 4.0. A WPF application references this which is a standard .NET 4.0 app. The PCL references the System.Net.NetworkCredential class. When we build the .NET 4.0 app we get an error: The type 'System.Net.NetworkCredential' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'. Several posts say to install KB2468871. That doesn't apply/change things. If we add an assembly reference to "System.Net 4.0.0.0" in the app then the

Could not load assembly Microsoft.Threading.Tasks.dll

心不动则不痛 提交于 2019-12-06 15:04:37
I am receiving the following error on iOS and Android project. Anybody has any workaround for this issue? This post recommends a workaround but the steps are vague. C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Microsoft.Threading.Tasks.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver

Portable Class Library, XmlAnyElementAttribute

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:15:29
In a Portable Class Library , I have a class that contains a member with an XmlAnyElement attribute. public partial class VariableWebServiceResponse { private List<System.Xml.XmlElement> anyField; public VariableWebServiceResponse () { this.anyField = new List<System.Xml.XmlElement>(); } [System.Xml.Serialization.XmlAnyElementAttribute(Order=0)] public List<System.Xml.XmlElement> Any { get { return this.anyField; } set { this.anyField = value; } } } This type of class works perfectly in .NET 4.0 so I have code like: private T Deserialize<T>(VariableWebServiceResponse response) { var name =

I cannot create SQLiteConnection in PCL version of Sqlite.net on WP8

孤街醉人 提交于 2019-12-06 13:03:43
I'm using a PCL version of Sqlite.net from https://github.com/oysteinkrog/SQLite.Net-PCL This code below doesn't work for some reasons on WP8: var sqliteFilename = Path.Combine(ApplicationData.Current.LocalFolder.Path, "MyDB.db3"); var db = new SQLiteConnection(new SQLitePlatformWP8CSharp(), sqliteFilename); And I am receiving this error: An exception of type 'SQLite.Net.SQLiteException' occurred in SQLite.Net.DLL but was not handled in user code Additional information: Could not open database file: C:\Data\Users\DefApps\AppData\{149B7F85-2C71-4BEF-984F-903BA7DB80DA}\Local\MyDB.db3 (CannotOpen

No such table sqlite when execute query on xamarin forms pcl

大憨熊 提交于 2019-12-06 09:20:46
问题 I have a problem with the reading of the tables on the SQLite database. my OBJ_User class: namespace Fimap.Models { public class OBJ_User { public int DLR_Id { get; set; } public string DLR_Username { get; set; } public string DLR_Password_Hash { get; set; } public object DLR_Nome { get; set; } public string DLR_Cognome { get; set; } public int DLR_Tipo { get; set; } public string DLR_Azienda { get; set; } public object DLR_Telefono { get; set; } public object DLR_Email { get; set; } public

Exception using await HttpClient.GetAsync in Portable Class Library

£可爱£侵袭症+ 提交于 2019-12-06 07:16:31
问题 I have Portable Class Library(net40+sl4+win8+wp71) with code: public static async Task<Dictionary<string, FeedItem>> GetFeeds() { try { string data; using (HttpMessageHandler handler = new HttpClientHandler()) { using (HttpClient httpClient = new HttpClient(handler)) { data = await httpClient.GetStringAsync(FeedsUrl + Guid.NewGuid()).ConfigureAwait(false); } } if (data != null) { //... } return null; } catch { return null; } } Microsoft.Bcl, Microsoft.Bcl.Async and Microsoft.Net.Http are

C# PCL HMACSHAX with BouncyCastle-PCL

十年热恋 提交于 2019-12-06 07:06:42
I want to implement this logic in portable C# class: static JsonWebToken() { HashAlgorithms = new Dictionary<JwtHashAlgorithm, Func<byte[], byte[], byte[]>> { { JwtHashAlgorithm.HS256, (key, value) => { using (var sha = new HMACSHA256(key)) { return sha.ComputeHash(value); } } }, { JwtHashAlgorithm.HS384, (key, value) => { using (var sha = new HMACSHA384(key)) { return sha.ComputeHash(value); } } }, { JwtHashAlgorithm.HS512, (key, value) => { using (var sha = new HMACSHA512(key)) { return sha.ComputeHash(value); } } } }; } but HMACSHA256 , HMACSHA384 and HMACSHA512 does not exist in portable

FileNotFoundException in Portable Class Library?

谁说胖子不能爱 提交于 2019-12-06 05:16:53
I have 3 assemblies, a WP7 app (targeting 7.0), a Web Services project (running 4.0), and a Portable Class Library (built from the template & targeting WP7, SL4 & .NET 4.0) which contains a common type used between the first two. When run locally (in IIS Express) things work just fine, however when run against a deployed instance of the Web Services assembly (on a remote IIS server I have little control of) fails with the following exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Xml.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken