AddinPageContent Constructor (FormPropertyBag)
Creates a new instance of the AddinPageContent class, using the specified properties.
Namespace: Microsoft.WindowsServerSolutions.Administration.ObjectModel.Adorners
Assembly: Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)
Syntax
protected AddinPageContent(
FormPropertyBag propertyBag
)
protected:
AddinPageContent(
FormPropertyBag^ propertyBag
)
Protected Sub New (
propertyBag As FormPropertyBag
)
Parameters
propertyBag
Type: Microsoft.WindowsServerSolutions.Administration.ObjectModel.Adorners.FormPropertyBagThe properties of the page.
Examples
The following code describes how to derive and implement the constructor. For the complete code sample, see Quickstart: Creating a Hosted Email Adapter.
public DistributionGroupTabContent(FormPropertyBag propertyBag)
: base(propertyBag)
{
tabControl = new DistributionGroupControl(base.PropertyBag);
tabControl.Dock = DockStyle.Fill;
tabControl.AutoScroll = false;
// ATTENTION:
// the reason of loading data in page initiailzing coz that we need the UserName in propertyBag which will be
// filled in with data after the controls are created. Therefore, we cannot get data we want in this ctor.
this.PageInitializing += (object sender, EventArgs e) => { this.tabControl.StartLoadingData(); };
this.PageValidating += (object sender, CancelEventArgs e) =>
{
// Putting the data here coz this method is called in UI thread
base.PropertyBag.AddinData[Constants.ExtendedParam_DGs] = tabControl.GetDistributionGroupsString();
};
}
See Also
AddinPageContent Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel.Adorners Namespace
Return to top