TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Roberto Salemi
NA
146
140.8k
[WPF] Error in Design Mode
Apr 24 2015 11:25 AM
Hi,
In my UserControl I added:
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
if (LicenseManager.UsageMode != LicenseUsageMode.Designtime)
{
if (_operation.Equals(Definition.SampleDetailOperation.Insert))
{
if(DomainData.GetApplicationVar(ApplicationVars.SmplDefaultPriority) != null)
{
cmbSamplePriority.SelectedValue = DomainData.GetApplicationVar(ApplicationVars.SmplDefaultPriority).Value;
}
}
}
}
In RunTime mode the application works, but in DesignMode there is this error:
Microsoft.Practices.ObjectBuilder2.BuildFailedException
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, null]) failed: The value can not be null or an empty string. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy, index 2)
in particular the error is on:
if (DomainData.GetApplicationVar(ApplicationVars.SmplDefaultPriority) != null)
Isn't correct the check:
if (LicenseManager.UsageMode != LicenseUsageMode.Designtime)
{
//TODO
}
?
Thanks.
Reply
Answers (
1
)
RDLC Reports
How I can create connection with SQL database in C# WPF?