我在我的项目中添加了FlowListView。正如在 中提到的那样,当点击中的一个项目时,我将面临整个行突出显示的问题,在android中没有这样的问题。我添加了如下所示的自定义渲染器:
主要项目中的:
using DLToolkit.Forms.Controls;
namespace Mynamespace
{
public class CustomFlowListView : FlowListView
{
}
}
In UWP:
using Listpm;
using Listpm.UWP;
using Xamarin.Forms;
using Xamarin.F
我有以下示例应用程序代码:
App.cs (入境点)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace App1
{
public class ListItem
{
public string ItemText { get; set; }
public string ItemDetail { get; set; }
public string P
我已经在一个UWP应用程序工作了相当一段时间。我们最近决定过渡到Xamarin,这样我们就可以轻松地支持Android和UWP。我在为我们的代码库设置一个PCL时没有任何问题。现在,当我试图重写Xamarin.Forms的UI时,我遇到了一些噩梦。我试图完成一些相对简单的事情,我肯定是做错了什么,但是,我想不出是什么。
我想显示一个listView。以下是XAML:
<ContentPage.Content>
<StackLayout>
<Label Text="This is the bill page."
我花了几个小时试图让我的表单应用程序在UWP上工作。我终于意识到我把Visual中的解决方案平台下拉设置为64位。当我将它设置为AnyCPU或32位时,它可以正常工作。
当对64位构建运行时,我看到的错误是:
类型为“System.NotImplementedException”的异常发生在Xamarin.Forms.Platform.UAP.dll中,但未在用户代码中处理附加信息:方法或操作未实现。
我在可移植项目中的App.cs类的构造函数中得到了这个错误。Stacktrace是:
at Windows.UI.Xaml.Setter.get_Value() at Windows.UI.Xa
我在Xamarin项目上工作,并在UWP项目中为我的自定义控件制作了自定义渲染器。我发现了如何使用xml代码设置ControlTemplate。
XML方式:
var tb = new TextBox(); // or what I do in Xamarin var tb = Control;
var ct = (Controls.ControlTemplate)XamlReader.Load(@"
<ControlTemplate TargetType=""TextBox"" xmlns='http://schemas.microso
因此,我现在已经完成了对我的Xamarin应用程序的编码,并且在Debug构建中都能很好地工作。然后,我通过存档和签署APK在安卓上测试了发布版本,它运行良好,但在试图构建UWP项目包文件时出现了问题。如果我尝试启动程序,则会得到以下异常:
+ $exception {Xamarin.Forms.Xaml.XamlParseException: No embeddedresource found for AppPrescribe.App
at Xamarin.Forms.Xaml.XamlLoader.Load(Object view, Type callingType)
我正在开发一个Android/iOS/UWP Xamarin.Forms应用程序。在过去的几周里,我主要研究Android/iOS应用程序。现在,我想在UWP中再次启动我的应用程序并获得错误:
System.TypeLoadException
HResult=0x80131522
Message=Could not find Windows Runtime type 'Microsoft.Graphics.Canvas.UI.Xaml.CanvasImageSource'.
Source=Xamarin.Forms.Platform.UAP
StackTrace
我有在iOS xamarin表单上使用的自定义呈现的代码,但是我希望UWP类似,
using System;
using MobileAssessment.Interface;
using MobileAssessment.iOS;
using MobileAssessment.Pages;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using iOSPlatform = Xamarin.Forms.Platform.iOS.Platform;
[assembly: Xamarin.Forms.D
在Xamarin.Forms UWP中,下面的代码抛出System.NullReferenceException版本为2.4.0.280。
public class CustomLayoutView : Layout<View>
{
Grid grid;
public CustomLayoutView()
{
grid = new Grid();
Children.Add(grid);
}
protected override void LayoutChildren(double x, double y, d