小编Kev*_*lia的帖子

便携式项目中找不到'GalaSoft'MvvmLight

我克隆了一个解决方案,它包含基于GalaSoft MvvmLight库的多个项目,还有两个Portable项目.我已经安装了所有必需的nuget包和引用,但我无法构建这些可移植项目,并且需要首先构建这些可移植项目,因为所有其他项目都引用它.
我在使用GalaSoft的每个文件中都出现了这个(下面)错误.它是一个Portable类库项目.

错误64找不到类型或命名空间名称'GalaSoft'(您是否
缺少using指令或程序集引用

我在这个项目中引用了这个(下面)Portable MvvmLight库

\MvvmLightLibs.4.4.32.7\lib\netcore45\GalaSoft.MvvmLight.dll
\MvvmLightLibs.4.4.32.7\lib\netcore45\GalaSoft.MvvmLight.Extras.dll
Run Code Online (Sandbox Code Playgroud)

这是平台目标
便携式项目平台 - 目标


我试过清理并重新启动visual studio.我现在被困在这个问题超过2天了.此外,我已经尝试检查并取消选中Configuration Manager中的"Build"选项(我已经在某处阅读过)但是没有用.

此外,还有其他44个警告.所有这些看起来都类似于下面的警告.

警告28主要参考"GalaSoft.MvvmLight"无法解析,
因为它对框架程序集"System.Linq.Expressions,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"具有间接依赖性,无法解析在目前有针对性的框架中." .NETPortable,版本= V4.0,外形= Profile158" .要解决此问题,请删除引用"GalaSoft.MvvmLight"或将应用程序重新定位到包含"System.Linq.Expressions,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"的框架版本.

编辑: 问题标题修订

c# mvvm-light windows-phone-8

13
推荐指数
1
解决办法
2001
查看次数

带有POST方法和参数的BackgroundTransferService

我想上传一个文件(录像档案)到服务器通过 BackgroundTransferService.

我的问题是,我还想发送2个参数和文件(POST请求).

那么,使用BackgroundTransferServiceAPI时是否可以发送参数和文件上传..?

代码BackgroundTransferService:

        BackgroundTransferRequest req = new BackgroundTransferRequest(new Uri("ServerURL", UriKind.Absolute));
        req.Method = "POST";
        req.TransferPreferences = TransferPreferences.AllowCellularAndBattery;

        string uploadLocationPath = "/Shared/Transfers/myVideoFile.mp4";
        string downloadLocationPath = "/Shared/Transfers/response.txt";

        req.UploadLocation = new Uri(uploadLocationPath, UriKind.Relative);
        req.DownloadLocation = new Uri(downloadLocationPath, UriKind.Relative);

        req.TransferProgressChanged += req_TransferProgressChanged;
        req.TransferStatusChanged += req_TransferStatusChanged;

        try
        {
            BackgroundTransferService.Add(req);
        }
        catch (Exception ex)
        {
            MessageBox.Show("Unable to add video to upload queue.\nPlease try again later.", App.appName, MessageBoxButton.OK);
        }
Run Code Online (Sandbox Code Playgroud)

请询问是否有人想要更多信息并且无法理解我的问题.

我想快速回复.是或否......如果是,则如何......?

c# file-upload windows-phone background-transfer windows-phone-8

6
推荐指数
1
解决办法
319
查看次数

将图像添加到MapControl的高效/正确方法 - Windows Phone 8.1

我正在开发一个应用程序,其中地图将显示给用户,我需要在地图上添加大约10-12个图像到不同的GeoPoints,每个都有1KB的大小.

我正在动态添加这些图像,如下所示:

Image img = new Image();
img.Height = 35;
img.Width = 35;
img.Source = new BitmapImage(new Uri("ms-appx:///Assets/myImage.png"));
img.RenderTransform = new CompositeTransform() { Rotation = item.bearing };

MapControl.SetNormalizedAnchorPoint(img, new Point(0.5, 0.5));
MapControl.SetLocation(img, new Geopoint(new BasicGeoposition() { Latitude = item.latitude, Longitude = item.longitude }));

myMap.Children.Add(img);
Run Code Online (Sandbox Code Playgroud)

我的问题是

在我添加了这12张图像之后,我的地图控件变成了Soo Laggy,在将地图从一个位置移动到另一个位置时,它会挂起很多.

那么,有没有有效的方法在Windows Phone 8.1 App中向Map添加图像.

编辑:

我试图添加MapIcons到地图,但在这种情况下,MapIcons在特定的缩放级别消失了,但我希望在任何缩放级别保持这些MapIcons可见.

那么有什么方法可以让MapIcons每个缩放级别都可见吗?

bing-maps windows-phone windows-runtime windows-phone-8.1

6
推荐指数
1
解决办法
107
查看次数

在SQLite中将"String"存储为"TEXT"而不是"VarChar" - WP8

我正在使用SQLite将我的数据存储在本地数据库中.我把字符串输入了几个要存储的变量.现在,当我存储该字符串变量时,它将被存储为"VARCHAR"(如下图所示).

图片1

在此输入图像描述

但我想在SQLite中将这些字符串存储为"TEXT"类型.(如下图所示)

图2

在此输入图像描述

我用来存储db的类如下:

public class abc
{
    [SQLite.AutoIncrement, SQLite.PrimaryKey]
    public int _id { get; set; }
    public string a { get; set; }
    public string b { get; set; }
    public string c { get; set; }
    public string d { get; set; }
    public string e { get; set; }
    public string f { get; set; }
    public string g { get; set; }
    public DateTime date { get; set; }

}
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激.

c# sql sqlite windows-phone-8

5
推荐指数
1
解决办法
1万
查看次数

Android Leanback (android tv) 应用程序中的滚动条拇指可见性

我正在开发一个使用 Leanback lib 的 Android TV 项目。

我想要实现的目标是使 VerticalGridView ( androidx.leanback.widget.VerticalGridView) 中内置的垂直滚动条可见。

<androidx.leanback.widget.VerticalGridView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/container_list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:fadeScrollbars="false"
    android:scrollbarThumbVertical="@color/color_green"
    app:fastScrollVerticalThumbDrawable="@drawable/scrollbar_vertical_thumb"
    android:scrollbarSize="5dp"
    style="?attr/rowsVerticalGridStyle" />
Run Code Online (Sandbox Code Playgroud)

如图所示,我尝试设置滚动条大小、可绘制、缩略图样式以及所有其他可能的属性以使滚动条可见。

现在的悲剧是,当我调用verticalGridView.getVerticalScrollbarWidth();方法来检查宽度时,它返回了0。看来 Leanback lib 正在将 VerticalScrollbarWidth 设置为0我找不到的某个地方。

我还尝试查看其他 Leanback 应用程序,尽管视图是可滚动的,但没有应用程序显示滚动条拇指。

为什么??有什么方法可以向我的用户展示 Android TV 应用程序上的滚动条吗?

android scrollbar android-tv leanback

5
推荐指数
0
解决办法
685
查看次数