<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
x:Class="AFICController.EULA"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:res="clr-namespace:AFICController.Resources"
Title="{x:Static res:Strings.WizardWelcomeWindow_Title}"
Width="800"
Height="600"
WindowStartupLocation="CenterScreen"
Icon="/AFICController;Component/Resources/Images/att_icon.ico"
ResizeMode="NoResize">
我正在使用MVVM。我的應用程序首次顯示啓動屏幕,看起來不錯,但之後我希望EULA(最終用戶許可協議)窗口,當我嘗試執行它時,顯示了一個C#WPF Applcation作爲「XAML解析異常」的異常在'System.Windows.Markup.StaticExtension'上提供值拋出異常「通過定位到上述代碼。WPF XAML解析異常發生錯誤?
以下是我從哪裏打電話給EULA的C#代碼。請幫助我正如我試過我的所有方法來消除這個異常。
class App : Application
{
[STAThread()]
static void Main()
{
Splasher.Splash = new SplashScreen();
Splasher.ShowSplash();
Mouse.OverrideCursor = null;
for (int i = 0; i < 5000; i++)
{
Thread.Sleep(1);
}
Splasher.CloseSplash();
new App();
}
/// <summary>
///
/// </summary>
public App()
{
App.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri(@"\Resources\Dictionary\ATTColors.xaml", UriKind.Relative) });
App.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri(@"\Resources\Dictionary\AppButton.xaml", UriKind.Relative) });
Console.WriteLine("EULA Opened");
StartupUri = new System.Uri("EULA.xaml", UriKind.Relative);
//StartupUri = new System.Uri("View/WizardDialog.xaml", UriKind.Relative);
Run();
}
是的,它的工作感謝:) – TheSpy
但它會產生另一個錯誤,如下所示:「與指定的綁定約束匹配的類型'AFICController.EULA'的構造函數的調用引發異常。 – TheSpy
任何人都有這個想法? – TheSpy