问题标签 [windows-phone-8.1]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
3361 浏览

c# - 有什么方法可以将通过编程方式创建的 UIElement 保存在图像文件中?

我正在尝试在 Windows Phone 8.1 (C#) 应用程序的 JPG/PNG/BMP 图像中保存以编程方式创建的 UIElement。

我正在使用 RenderAsync() 方法使用类 RenderTargetBitmap,但它仅适用于在 XAML 代码中创建的 UI 元素。当我在直接在 C# 中创建的 UI 元素上使用它时,出现以下异常:“System.ArgumentException(值不在预期范围内。)”

我做错了什么还是这个类不允许渲染以编程方式创建的 UIElement(s)?有没有办法在 Windows Phone 8.1 上做到这一点?谢谢!

这是我使用的代码:

0 投票
2 回答
1782 浏览

windows-phone-8.1 - Windows Phone 8.1 MapTileSource binding with MVVM

I'm trying to bind the DataSource of a MapTileSource to a property on my view model, but I am getting the error REGDB_E_CLASSNOTREG on the Maps:MapTileSource line (underlined in blue is VS editor). I could always use a binding helper to achieve the same effect (I needed to in the 8.0 version of my app) but this seems like it should just...work. Any idea what is wrong?

I also tried with just a static data source with the same effect:

Edit: I tried the sample code at http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn632728.aspx and it works fine, so it seems obvious that the MapTileSource itself is not unregistered. But that is all codebehind and uses no data binding, so it is not of much use to me.

Edit 2: If I ignore the error and try to deploy the app to the phone emulator, I get this on InitializeComponent() of the view:

0 投票
6 回答
82326 浏览

c# - Universal Apps MessageBox:“当前上下文中不存在名称‘MessageBox’”

我想使用 MessageBox 在我的 WP8.1 应用程序中显示下载错误。

我补充说:

但是当我输入:

我得到错误:

在对象浏览器中,我发现这样的类应该存在,并且在“项目->添加引用...->程序集->框架”中显示所有程序集都被引用。

我错过了什么吗?还是有另一种方式来显示消息框之类的东西?

0 投票
1 回答
4037 浏览

xaml - 在 xaml 中添加 Appbar(通用应用程序)

如何使用 Hub 模板将带有按钮的应用栏添加到 Windows Phone 8.1 应用?我没有看到任何明确的例子来说明如何做到这一点。

具体来说,使用 Hub 模板,我想将 appbar 菜单项添加到 ItemsPage.xaml。

0 投票
2 回答
846 浏览

c# - 读取页面导航上传递的字符串数组

我目前不确定当我从 WP8.1 中的另一个页面传递一个字符串时应该如何读取参数。这实际上是我在导航到另一个页面时用来传递参数的代码:

这就是说,我不确定我应该如何从其他页面读取我传递的参数。例如,我知道如何读取整数值。我试过像这样读取这个参数,但在这个过程中我肯定会丢失一些数据:

0 投票
1 回答
864 浏览

c# - 是否可以知道用户在 Windows 运行时(通用)应用程序中的 ListView 或 GridView 项目中点击的位置?

所以我只想知道我是否可以知道用户是单击了 Windows 运行时应用程序中可单击 ListView 或 GridView 控件中项目的左侧还是右侧。是否可以?如果是这样,怎么做?

0 投票
2 回答
1386 浏览

windows - 当 Windows Phone 8.1 开发者预览版可用时,我在哪里可以下载它?

看了微软的 Build 大会,了解了 Windows Phone 8.1,决定下载 Windows Phone 8.1 开发者预览版。

当 Windows Phone 8.1 开发者预览版可用时,我在哪里可以下载它?

0 投票
3 回答
4824 浏览

windows-phone-8 - 如何在 Windows Phone 8.1 上执行 POST 操作

我正在努力POSTWindows Phone 8.1.

PostMessage方法执行时不会捕获任何异常。但是,其中的POST方法MessagesController永远不会被调用。

我如何执行POSTfor Windows Phone 8.1

代码如下:

0 投票
7 回答
5448 浏览

windows-phone-8.1 - Windows Phone 8.1 通用应用程序中 MarketplaceReviewTask 的替代品是什么

我到处寻找,只是找不到从我的应用程序启动评分和评论的方法。有谁知道如何在新的 Windows Phone 8.1 上启动此任务?

0 投票
0 回答
357 浏览

oauth - 通过 WebAuthenticationBroker 登录后,应用程序在 Resuming 屏幕上挂起

更新:这似乎只发生在我在模拟器中运行应用程序时。当我在真实设备上运行它时,一切都按预期工作。


我在我的应用程序中使用WebAuthenticationBroker让用户通过 OAuth 向 Fitbit 进行身份验证。

WebAuthenticationBroker 成功地将 args 传回给我(即包含令牌和秘密的最终 URI),我能够进行后续调用以从 Fitbit 检索访问令牌。所有这些都按预期工作。

我的问题是该应用程序然后挂在“正在恢复...”行军蚂蚁屏幕上。这发生在 WebAuthenticationBroker Fitbit 登录屏幕消失后,并且与我之后执行的任何代码无关。我已经删除了所有这些代码,它仍然会发生。

我用来启动 WebAuthenticationBroker 的调用是

我假设在所有这些之后我错过了一个步骤,这是返回我的应用程序页面所必需的。我已经尝试了各种我能想到的东西,但我不确定我需要在哪里以及如何做到这一点才能让它发挥作用。

我从 WebAuthenticationManager 获取带有令牌/秘密参数的 CallbackUrl 的方式是

非常感谢您的帮助!:)

_ 求和