dotnet-campus / SourceYard

Add a NuGet package only for dll reference? By using dotnetCampus.SourceYard, you can pack a NuGet package with source code. By installing the new source code package, all source codes behaviors just like it is in your project.
MIT License
50 stars 12 forks source link

XAML 和 C# 代码的初始化时机可能有问题,需要修复 #35

Closed walterlv closed 5 years ago

walterlv commented 5 years ago

目标项目

问题

严重性 代码  说明  项目  文件  行   禁止显示状态
错误  MC4003  Cannot resolve the Style Property 'TitleBar'. Verify that the owning type is the Style's TargetType, or use Class.Property syntax to specify the Property. Line 17 Position 17. EasiNoteTool    C:\Users\lvyi\.nuget\packages\walterlv.fluentdesign.source\0.2.0-alpha\src\Themes\Window.Universal.xaml 17  

分析

猜测可能是时机问题。如果 C# 代码能够在静态的时候就存在,也许 XAML 可以找到这个依赖属性。

lindexi commented 5 years ago

从零开始制作 NuGet 源代码包(全面支持 .NET Core / .NET Framework / WPF 项目) - walterlv