我想每this blog post但在vb.netWPF標記擴展在VB.Net不工作
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
</Application.Resources>
<JumpList.JumpList>
<JumpList ShowRecentCategory="True">
<JumpTask Title="Save as..." Arguments="-saveas"
ApplicationPath="{local:ApplicationFullPath}">
</JumpTask>
</JumpList>
</JumpList.JumpList>
</Application>
創建VB.Net標記擴展,但它是扔
錯誤1未知的構建錯誤,'密鑰不能爲空。 參數名稱:鑰匙行9位置62.' C:\ Users \用戶jessed.ECREATIVE \我的收存箱\項目\ C2D2 \ C2D2 \ Application.xaml 9 62 C2D2
我轉換的例子的C#部
Public Class ApplicationFullPath
Inherits Markup.MarkupExtension
Public Overrides Function ProvideValue(ByVal serviceProvider As System.IServiceProvider) As Object
Return System.Reflection.Assembly.GetExecutingAssembly.Location()
End Function
End Class
我思念的東西?任何幫助將不勝感激
創建一個標記擴展來返回一個值是...我不知道,只是不這樣做。 – 2011-04-14 23:14:15