portable-class-library

Xamarin Studio Targeting netstandard

孤街醉人 提交于 2019-12-23 15:34:17
问题 I am trying to upgrade my pcl library to target the netstandard in Xamarin Studio on my Mac. But I don't see the option. All the information I have found only talk about using Visual Studio. Xamarin Blog Oren's blog When I look for the option they talk about in Xamarin Studio, I can't find it. 回答1: As of Xamarin Studio 6.0.2 you can consume .Net Standard libs, but NOT create them. The ability to create .NET Standard Libraries in Xamarin Studio on macOS will be available in the future, but

Use System.Net.Sockets in PCL (.Net 4.5 + phone 8)

烈酒焚心 提交于 2019-12-23 15:05:04
问题 I have existing .Net libraries which work already for .Net 4.5 and Windows Phone 8. Now I would like to convert this in a portable class library and suddenly I can't use System.Net.Sockets anymore. I only cheched .Net 4.5 and windows phone 8. Xbox/store app/silverlight is not selected. Xamarin is automaticly selected because it has the same requirements. I can avoid sockets by using interfaces and stuff, but why can't I use it if they both support it? There are other questions on

The tag 'ViewModelLocator' does not exist in XML namespace clr-namespace:XXX

六眼飞鱼酱① 提交于 2019-12-23 12:58:49
问题 I have tried numerous other solutions without any success. I have a class called ViewModelLocator which is located in my portable class library. It has a property in it called ViewModels , which is of type Dictionay<K, V> Then I have a Windows Phone 8 project that references the portable class library. I added the following to the WP8 app.xaml: <Application x:Class="Kaizen.WP8.Test.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com

PCL vs .NET Standard library for SQLite in UWP

一曲冷凌霜 提交于 2019-12-23 12:53:53
问题 I have following problem. I use Portable library in my UWP application (Portable library is shared with Xamarin app). This portable library references SQLite. In this Portable library I also use Prism and Unity. For that reason I still can't upgrade them to .NET Standard. SQLite library I use is SQLite-net-pcl version 1.4.18. In my UWP app I add same nugget package. The problem is that this nugget package also support .net standard, as result, when I build my UWP library, I got different

Is it possible to take advantage of the ICommand in an ASP.NET MVC project?

女生的网名这么多〃 提交于 2019-12-23 12:48:18
问题 Basically, I am creating a portable class library, and creating a bunch of ViewModels: public class CustomerViewModel : ViewModelBase { public string FirstName { ... } // INPC public string LastName { ... } // INPC public string FullName { get { return FirstName + " " + LastName; } } public ICommand DoFooCommand { get; private set; } // DelegateCommand private bool CanDoFoo(object parameter) { ... } private void DoFoo(object parameter) { ... } } This is great if I want for reusability for

Xamarin Forms: Letter spacing in Label Text

十年热恋 提交于 2019-12-23 12:34:02
问题 Hi I am building an cross platform app using Xamarin forms PCL. In that app I need to add letter spacing to label text. I need space between label text characters. Is there any way to achieve this for all platforms. Letterspacing property is available in ANDROID but I need solution for all the platforms like ios, uwp, win8/8.1. 回答1: Forms control public class LetterSpacingLabel : Label { public float LetterSpacing { get; set; } } The Android renderer code looks like: public class

xamarin support in Add Portable Class Library dialog

爱⌒轻易说出口 提交于 2019-12-23 12:24:07
问题 What are the steps required to make the two items available in the Add Portable Class Library dialog? 回答1: Please see my answer in Creating a PCL that targets Monodroid In the meantime, there are quite a few blog posts around on how to get PCLs working unofficially - eg.: http://blogs.endjin.com/2013/05/xamarin-platform-setup-gotchas/ http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html 来源: https://stackoverflow.com/questions/16678066/xamarin-support-in-add-portable

Can the Async CTP be used with a portable library

邮差的信 提交于 2019-12-23 09:27:11
问题 I was looking to see if the Async CTP with a portable class library? 回答1: No. The Async CTP has different dlls for Desktop, Phone, Silverlight 4, and Silverlight 5. Hopefully in the near future, all these platforms will support Task (and async) natively, and then portable class libraries would be able to use async. Update: Microsoft.Bcl.Async can be installed for portable libraries targeting .NET 4.0/4.5, Windows Store apps, Silverlight 4/5, and Windows Phone 7.5/8.0 回答2: As a heads up, we've

What happened to .ToShortDateString in .NET Portable Class Library

落爺英雄遲暮 提交于 2019-12-23 07:26:34
问题 I am wondering why there is no .ToShortDateString in the .NET Portable Class Library. I have 2 projects (Silverlight, and regular .NET Class Library) that use the same code, and the code involves calling .ToShortDateString() on a DateTime object. In order to reuse the same code instead of copying it in 2 places, I created a portable class library so it can be imported by both Silverlight and .NET Class Library. Unfortunately, it doesn't seem like .ToShortDateString() is available when using

StreamReader and Portable Class Library

天大地大妈咪最大 提交于 2019-12-23 07:19:31
问题 I am writing a ConfigManager class using Portable Class Libraries. PCL supports StreamReader and StreamWriter classes that I want to use, but the PCL version of those classes do not support passing in a string during construction. PCL also does not support the reader.Close() and writer.Close() . Lastly it doesn't support the FileStream class. So I am looking for an answer to any one of the following questions: How can I get the StreamReader and StreamWriter classes working in a PCL? How can I