I have defined a boolean property as follows:
[Browsable(true), Category("Display"), DefaultValue(false),
WebPartStorage(Storage.Shared), FriendlyName("Obey Workflow"),
Description("")]
public bool ObeyWorkflow { get; set; }
I'm expecting it to render as a checkbox in the webpart's properties toolbox, however it doesn't show up. My web part is derived from the Sharepoint WebPart base class.
In the list of SharePoint templates, choose Web Part. In the Name box, specify a name for the web part, and then choose the Add button. The web part appears in Solution Explorer. For more information about the files that a web part includes, see Create web parts for SharePoint.
Available web parts on modern SharePoint Online site in category discovery. Discovery web parts allow you to present a summary of the information on SharePoint site landing pages or Hub Sites.
A custom web part in SharePoint is a personalized web part created by a user for his own use. A site holder or user who has necessary authorization can customize Web Parts page using internet browsers or Microsoft SharePoint Designer to insert, modify or delete a Web Part.
You are on the right track. You just need to use different attributes.
[Personalizable(PersonalizationScope.Shared)]
[WebBrowsable(true)]
[Category("Display")]
[WebDisplayName("Obey Workflow")]
[Description("")]
public bool ObeyWorkflow { get; set; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With