【发布时间】:2017-10-16 09:01:40
【问题描述】:
美好的一天,
我遇到了https://github.com/Windows-XAML/Template10 的问题
在我的视图中假设我有一个文本框,并且它的文本属性绑定到我的虚拟机(注意:我的虚拟机从 template10 继承了 BindableBase:
private string _sampleText;
public string SampleText {
get { return _sampleText; }
set { this.SetProperty(ref _sampleText, value); }
}
但每次我在文本框上输入文本时,我都有一个来自 RaisePropertyChanged 的 null 引用异常
我想我需要在我的 app.xaml.cs 上使用 BootStrapper 初始化 template10
怎么样?
谢谢
【问题讨论】:
-
除了基本设置外,没有额外的框架初始化。你看过样品吗?您使用的是什么模板(Minimal、Blank 或 Hamburger)?
-
是的,是的,我发现你只需要安装template10模板包
-
注意不要将主存储库与可用的 nuget 混淆。 Master = T10.2 其中 nuget 为 10.0
标签: c# uwp template10