I created a webpart with custom properties but once the webpart is added and the settings changed, it doesn't take effect until a publish or check in share draft. Clicking in OK or Apply in the webpart settings doesn't save the properties.
private string _ListSite="/";
private string _ListName = "Quick Links";
[WebBrowsable(true)]
[WebDisplayName("List site")]
[SPWebCategoryName("Quick Links Settings")]
[WebPartStorage(Storage.Shared)]
[WebDescription("Name of the site where the links list is")]
[Personalizable(PersonalizationScope.Shared)]
public string ListSite
{
get { return _ListSite; }
set { _ListSite = value; }
}
[WebBrowsable(true)]
[WebDisplayName("List name")]
[SPWebCategoryName("Quick Links Settings")]
[WebPartStorage(Storage.Shared)]
[WebDescription("Name of the list to use")]
[Personalizable(PersonalizationScope.Shared)]
public string ListName
{
get { return _ListName; }
set { _ListName = value; }
}