public AddIssueDialog() { // Required to initialize variables InitializeComponent(); ultimateSpellSL1.IncludeDirectory = CommonUtils.UltimateSpellIncludeUrl; PromptButton.Visibility = CMS.AppSetting.IssuePromptEnabled ? Visibility.Visible : Visibility.Collapsed; mModel = new AddIssueViewModel(new CmsWebService.Issue()) {View = this}; mModel.ModelLoaded += e => { DataContext = mModel; GotFocus += AddIssueDialog_GotFocus; // }; }
public AddIssueDialog(CmsWebService.Issue copy, int copiedId) { // Required to initialize variables InitializeComponent(); ultimateSpellSL1.IncludeDirectory = CommonUtils.UltimateSpellIncludeUrl; Title = string.Format("Copy of Issue {0}", copiedId); PromptButton.Visibility = CMS.AppSetting.IssuePromptEnabled ? Visibility.Visible : Visibility.Collapsed; mModel = new AddIssueViewModel(copy, true) {View = this}; mModel.ModelLoaded += e => { DataContext = mModel; GotFocus += AddIssueDialog_GotFocus; }; }