我正在尝试制作一个NavigationViewMenu,我需要一个菜单,如下所示
static Home项目
静态标题
来自DB的动态元素作为项目
静态标题
静态项目集
这是我试过的:
<NavigationView.MenuItems>
<NavigationViewItem Icon="Home" Content="Home" Tag="home" />
<NavigationViewItemSeparator />
<NavigationViewItemHeader Content="My Stuff"/>
<NavigationViewList ItemsSource="{x:Bind MyStuff}">
<NavigationViewList.ItemTemplate>
<DataTemplate x:DataType="local:MyModel">
<NavigationViewItem Icon="Pictures" Content="{x:Bind Name}" Tag="{x:Bind Tag}" />
</DataTemplate>
</NavigationViewList.ItemTemplate>
</NavigationViewList>
<!-- Static equivalent to the above:
<NavigationViewItem Icon="Pictures" Content="Woop" Tag="foos"/>
<NavigationViewItem Icon="Pictures" Content="Doop" Tag="foos"/>
<NavigationViewItem Icon="Pictures" Content="Loop" Tag="foos"/>
-->
<NavigationViewItemHeader Content="Other Stuff"/>
<NavigationViewItem Icon="Pictures" Content="Foos" Tag="foos"/>
<NavigationViewItem Icon="ContactInfo" Content="Bars" Tag="bars"/>
<NavigationViewItem Icon="SwitchApps" Content="Bazes" Tag="bazes"/>
</NavigationView.MenuItems>
Run Code Online (Sandbox Code Playgroud)
这就是我所拥有的:
这就是我想要的:
*ngFor
对于UWP,XAML中的Angular有什么好的和实用的吗?
我有一个带有后台传输的Windows应用商店应用程序 来下载内容,它一直运行到现在.但是,一些客户报告说,在他们将PC更新为Creators Update(1703)之后,下载停止工作会产生错误HRESULT: 0x80072EE4
(由我的应用程序从异常中翻译).
有类似的报告:HRESULT 0x80072EE4在使用BackgroundDownloader但在我的情况下,它发生在Windows Update 1703之后.奇怪的是,这个问题不会发生在我的开发者PC上,其中已经安装了相同的更新.
有没有人对问题的根源有任何线索或找到任何解决方法?
我是 docker 的初学者,试图使用 Creator 的更新 bash 子系统让它在我的 Windows 10 机器上运行。我的 dockerfile 在我的 mac 上构建得很好,但是当我docker build
在 Windows 上尝试使用相同的文件时,我收到如下错误:
time="2017-08-28T14:44:36-07:00" level=error
msg="Can't add file \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon
to tar: readlink \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon:
The system cannot find the file specified."
Run Code Online (Sandbox Code Playgroud)
这是为我所有的 node_modules 依赖项打印出来的。我的第一个问题是:是什么触发了我所有 node_modules 的“添加”操作?这些错误信息是在我的 dockerfile 的第一行执行之前打印出来的
Step 1/25 : FROM ubuntu:14.04
Run Code Online (Sandbox Code Playgroud)
其次,这个问题是否与windows中的不同路径有关?对我来说,错误最奇怪的部分是奇怪的路径\\\\?\\C:\\Users\\username
。路径中有过多的斜杠和问号是怎么回事?
第三,就我一个人吗?还是大家在windows bash子系统上使用docker时遇到问题?
注意:我已经尝试设置 Docker 工具箱并运行快速启动终端。运行快速启动终端时出现以下错误
Error with pre-create check:
"This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. …
Run Code Online (Sandbox Code Playgroud) 我已经搜索了如何打印一个简单WebView
的:
<WebView x:Name="MyWebView" Source="http://www.stackoverflow.com" />
Run Code Online (Sandbox Code Playgroud)
我尝试了很多事情:
如何在 Windows 应用商店应用程序中打印 WebView 内容?
遗憾的是,此解决方案并未针对 Windows 10 UWP 应用程序进行更新,但是,我对其进行了转换,因此过时的功能可以正常工作,这导致我遇到了另一个问题。
为了打印,我使用了示例中的一些类(Windows-universal-samples/Samples/Printing/cs/),因为我需要预览。我把上面提到的问题中给出的例子作为:
<RichTextBlock
x:Name="TextContent"
Grid.Row="1"
Grid.ColumnSpan="2"
Width="595"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Foreground="Black"
IsTextSelectionEnabled="True"
OverflowContentTarget="{Binding ElementName=FirstLinkedContainer}">
<Paragraph>
<InlineUIContainer> [The question XAML]
Run Code Online (Sandbox Code Playgroud)
溢出不受管理,因此WebView
看起来像这样:
注意:我是 XAML 语言及其背后的逻辑的新手。
我想了解如何执行此操作以及是否可行?
编辑:
这是我的后面的代码PageToPrint.xaml.cs
:
using System;
using System.Collections.Generic;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace TestPrint
{
/// <summary>
/// Page content to send to the printer
/// </summary>
public sealed partial class PageToPrint …
Run Code Online (Sandbox Code Playgroud)