portable-class-library

How can I build a targetting pack for Portable Class Libraries?

两盒软妹~` 提交于 2020-01-01 10:13:09
问题 I'm building some code with these portable class libraries at present. I'm looking to target full .Net, WinRT Metro, Windows Phone, ... and then MonoTouch and MonoDroid. My experiments today show this can work - http://slodge.blogspot.co.uk/2012/04/experiments-with-portable-class.html However, I have hit a fairly significant problem - MonoTouch and MonoDroid currently support these libraries in that you can consume PCLs as binary assemblies, but they don't allow linking between project files

C# PCL Reading from File

只愿长相守 提交于 2020-01-01 08:43:12
问题 So I'm writing a portable class library that targets .NET 4.5, Windows 8 and Windows Phone 8. I'm trying to read from a text file that is part of the project as build content. I see that StreamReader is available in PCL's but I can't seem to find out how to get the stream from a file, given a file path. If anyone could point me to the right structures I'd appreciate it. Also if you could give direction for XML files, too. I'm only reading text files right now, but I'm going to be working in

Trigger an action to start after X milliseconds

久未见 提交于 2020-01-01 08:04:20
问题 I'm developing a Xamarin Forms mobile app, which has a page containing a SearchBar, a ListView, and Map control. The list view contains a list of addresses, which are reflected as pins on the map. As the user types in the SearchBar, the ListView is automatically updated (through ViewModel binding). The ViewModel method that filters the datasource for the list looks something like this... void FilterList() { listDataSource = new ObservableCollection<location>( locationData.Where(l => l.Address

Disable autocomplete in Xamarin.Forms PCL XAML Page

余生长醉 提交于 2020-01-01 04:40:06
问题 I have a PCL which stores my MVVM pages in XAML. I have the following in the XAML file, but I'd like to disable the autocomplete feature on the keyboard. Does anyone know how I can do this in the XAML? <Entry Text="{Binding Code}" Placeholder="Code" /> 回答1: Forms supports a KeyboardFlags.Suggestion enum which I assume is intended to control this behavior, but it doesn't appear to be very well documented. 回答2: Custom Keyboard instances can be created in XAML using the x:FactoryMethod attribute

Searching for the best PCL profile for cross-platform development

一世执手 提交于 2019-12-31 21:34:11
问题 I am working on extending number of supported platforms for my app, it used to support .NET4/Windows Store/Windows Phone, but I hope to also cover Mono for Android and iOS. I've put all business logic, models and view models to portable class libraries (PCL) but it's a big dilemma what subset of platforms I should target. Each combination causes something to fail. Here are the results for 4 platforms that I might use: Profile 78 (NET45+WP8+Store): no problem with TPL,await/async and support

Density of screen in iOS and Universal WIndows App

微笑、不失礼 提交于 2019-12-30 04:12:28
问题 Hi I need to know the density of screen in windows 10/8/8.1 and iOS. I got screen density in Android using DisplayMetrics but I find no such option/property available in UWP and iOS. So Is there any property through which I can get screen density in UWP and IOS. 回答1: UPDATE - June 8th 2018 Xamarin has released Xamarin.Essentials! Xamarin.Essentials provides developers with cross-platform APIs for their mobile applications. Android, iOS, and UWP offer unique operating system and platform APIs

Xamarin Forms: StackLayout with rounded corners

江枫思渺然 提交于 2019-12-30 00:29:04
问题 I am developing an app using Xamarin Forms PCL. I need a StackLayout with rounded corners. I have tried frame as well for rounded corner container but there is no corner radius property available for it. I cannot find renderers for iOS,Android,UWP,Windows 8.1. Please can any one suggest me how to achieve StackLayout with rounded corners along with corner radius property for all the platforms. 回答1: You can use Frame and put StackLayout inside , Note Frame take padding 20 by default : <Frame

.NET PCL exception while converting time from UTC to specified TimeZone

孤人 提交于 2019-12-29 08:49:29
问题 I am developing a project in Xamarin Studio using C#. Its a .net PCL project and my profile is 78. My problem is, i am unable to convert a DateTime from UTC to specified timezone. I am using below code to convert DateTime from UTC to specified local TimeZone. DateTime dateTime = (TimeZoneInfo.ConvertTime (DateTime.SpecifyKind (DateTime.UtcNow, DateTimeKind.Utc), profile.TimeZone)); I am getting below exception The Kind property of the dateTime parameter is DateTimeKind.Utc, but the

Amazon CognitoUserPool and other Objects do not exist

孤人 提交于 2019-12-25 08:04:03
问题 I am trying to get started with the Cognito User authentication and login services. I am using a Xamarin PCL on Visual Studio 2015. I have a User Pool already created and all the necessary SDK's installed (.Core, .CognitoIdentity, .CognitoIdentityProvider, etc.). However, when following the Getting Started guide, none of the Objects that are used in the guide exist in any of the libraries! I have been dealing with this for 2 weeks now and I have given up. All I have are

Azure File Share REST API for Xamarin

夙愿已清 提交于 2019-12-25 04:14:04
问题 In Xamarin client app, I want to access Azure Files using SAS token with Portable Class Library . It seems I can not do it using latest WindowAzure.Storage nuget package as it may only works with Blob, Table,... and it requires lots of dependencies. Is there anyway to accomplish this? 回答1: I ended up with using Azure File Storage REST API. Basically we request SAS token generated from Azure Share first then using that SAS token in URL to send http request to Azure Files Storage: https://