简体   繁体   English

UWP社区工具包,包含源代码

[英]UWP Community Toolkit with source code

"UWP Community Toolkit" is good tool. “UWP社区工具包”是一个很好的工具。 https://github.com/Microsoft/UWPCommunityToolkit/tree/master https://github.com/Microsoft/UWPCommunityToolkit/tree/master

but If we installed it with NuGet, We can not access source code ( I thought ). 但是如果我们用NuGet安装它,我们就无法访问源代码(我想)。 Now, I only want to use "RadialGauge" only in this toolkit. 现在,我只想在此工具包中使用“RadialGauge”。 and I want to modify "RadialGauge" a bit.. then, I started to use RadialGauge with source code without NuGet install. 我想稍微修改一下“RadialGauge”..然后,我开始在没有NuGet安装的情况下使用RadialGauge和源代码。

here is my step. 这是我的一步。

  1. I open New UWP project with C# VS 2017. 我用C#VS 2017打开了新的UWP项目。

  2. I installed this code to my "Controls" folder. 我将此代码安装到我的“Controls”文件夹中。 UWP RadialGauge Source UWP RadialGauge来源

  3. and I make this project. 我做了这个项目。

but No display, Just white UWP windows is opened... Why ? 但没有显示,只打开白色的UWP窗口......为什么? I need help... with my poor UWP knowledge, to resolve is not possible... 我需要帮助......凭借我糟糕的UWP知识,解决是不可能的......

在此输入图像描述

Here is project file. 这是项目文件。

https://www.dropbox.com/s/alvw6wcbiv5itsp/RadialGaugeTest.zip?dl=0 https://www.dropbox.com/s/alvw6wcbiv5itsp/RadialGaugeTest.zip?dl=0

When you define a custom control , most of the time you want to give it a default style. 定义自定义控件时 ,大多数情况下要为其指定默认样式。 This style needs to be placed inside a ResourceDictionary called Generic.xaml which then needs to be inside a folder called Themes . 这种样式需要放在名为Generic.xamlResourceDictionary ,然后需要在名为Themes文件夹中

In your case, you have only copied the code part over. 在您的情况下,您只复制了代码部分。 To make the control show up on your page, all you need to do is go grab its default style from here , put it in a Generic.xaml resource dictionary, and then put the dictionary into a folder called Themes . 要使控件显示在页面上,您需要做的就是从此处获取其默认样式,将其放入Generic.xaml资源字典中,然后将字典放入名为Themes的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UWP 社区工具包 - UWP Community Toolkit UWP Community Toolkit DataGrid不显示数据 - UWP Community Toolkit DataGrid not displaying data UWP 社区工具包 MasterDetailsView 未按预期绑定 - UWP Community Toolkit MasterDetailsView not binding as expected UWP 社区工具包中的主详细信息视图 - Master-Details view in UWP Community Toolkit 异常行为-XAML / UWP Community Toolkit Scale动画 - Irregular behavior - XAML / UWP Community Toolkit Scale animation C# 社区工具包 Mvvm 源代码生成器:ObservableProperty - C# Community Toolkit Mvvm Source Generator: ObservableProperty WPF桌面应用程序,Windows 10通知Toast 2016(UWP社区工具包) - WPF Desktop App, Windows 10 Notification Toast 2016 (UWP Community Toolkit) uwp-community-toolkit:GridView-在用户控件上使用CanDrag和DragStart进行Pb选择,在MasterDetail上进行 - uwp-community-toolkit : GridView - Pb selection on usercontrol with CanDrag and DragStarting on MasterDetail 我需要有关 C# Community Toolkit Mvvm Source Generator 的帮助 - I need help regarding C# Community Toolkit Mvvm Source Generator UWP 项目:如何在 CODE 中将阴影 (Microsoft.Toolkit.Uwp.UI.AttachedShadowBase) 附加到 UIElement - UWP Project: how to attach a drop shadow (Microsoft.Toolkit.Uwp.UI.AttachedShadowBase) to a UIElement in CODE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM