Why doesn't this work?
/// <summary> |
/// Satisfies req for IPartnerMessenger. Dynamically Loads Partner radtab content. |
/// </summary> |
/// <param name="PartnerType"></param> |
/// <param name="partner"></param> |
public void NotifyPartnerSelection(Type PartnerType, Partner partner) |
{ |
if (PartnerType == typeof(EmailPartner)) |
{ |
this._selectedPartner = (EmailPartner)partner; |
this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new EmailPartnerView(this, (EmailPartner)partner)); |
} |
else if (PartnerType == typeof(NamedCallPartner)) |
{ |
this._selectedPartner = (NamedCallPartner)partner; |
this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new NamedCallPartnerView(this, (NamedCallPartner)partner)); |
} |
else if (PartnerType == typeof(AnonymousCallPartner)) |
{ |
this._selectedPartner = (AnonymousCallPartner)partner; |
this.PartnerRadTabItem.SetValue(RadTabItem.ContentProperty, new AnonymousCallPartnerView(this, (AnonymousCallPartner)partner)); |
} |
else |
ClientErrorHelper.ShowError(new Exception("Stuff went wrong")); |
} |
I have tried it as just setting the content property directly as well. Basically it works for the first assignment to the content property and then all other setting attempts although the radtabitem.content property changes, the user control displayed in the tab does not change.