Im having a bit of difficulty with some WPF/C#/SQL Server CE code.
I have a WPF User Control with the following line of code in the constructor:
MyDatabase database = new
where MyDatabase is a class generated using SQLMetal.exe from MyDatabase.sdf.
When I added this control to other controls, the application runs fine and I'm able to access my database.
When I try to edit these parent controls, the XAML editor throws the following error:
>The database file cannot be found. Check the path to the database. [ Data Source = D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MyDatabase.sdf ]
Why does the XAML editor redirect my DataDirectory to "D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\" and why does the XAML editor execute my database access code?
How can I fix this so I can use this control in a XAML editor?
View Complete Post