
private void Me_PreviewClosed(object sender, WindowPreviewClosedEventArgs e)
{
try
{
if (IsChangesInProgress && ClientUtilities.ConfirmDialog(this, LocGeneral.GetControlText("Confirmation"), LocGeneral.GetYesNo("CancelChanges")) != true)
{
e.Cancel = true;
}
else
{
DoAction(this, new ActionEventArgs(ActionEvent.Close));
// Apply persistence if required.
if (mUsePersistence)
{
string errMsg;
PersistenceStorage.Persist(PersistenceStorage.PersistenceAction.Save, this, "BillingModule.BillingDetails" + "." + this.IsReadOnly.ToString(), out errMsg);
mIsAlreadyLoaded = false;
}
}
}
catch (Exception exc)
{
ClientUtilities.DisplayContextEventError(mTracingTool, exc, "BILDT019", "Me_PreviewClosed");
}
}

internal class SeqLink:ILink<SeqStep> { public string ConnectionSide { get; internal set; } object ILink.Source { get { return Source; } set { Source = (SeqStep) value; } } public SeqStep Target { get; set; } //Uncomment either of these to remove the runtime binding error in debug window. However, the appearance is unchanged, AFAICT. //public string Content //{ // get { return String.Empty; } // set { throw new NotImplementedException("Set content was called");} //} //public FrameworkElement Content //{ // get { return new Button() {Height = 30,Width = 30,Content = "SampleText"}; } // set { throw new NotImplementedException("Set was called"); } //} public SeqStep Source { get; set; } object ILink.Target { get { return Target; } set { Target = (SeqStep) value; } } }
Feel free to let me know if you find any errors or more efficient ways to achieve the above.
Please upload your code if you extend the features of this code sample. Every little helps.
Rob