Our SmartClient (developped in 2014) makes use of customized properties applied to each displayed view.
These settings are done in a custom SidePanelUserControl.
But a bug appears with xprotect 2023 and later.
The view parameters stay valid for the current session, but are not retrieved at statup.
I didn’t detect anything interresting in the logs.
Is there any change with ViewAndLayoutItem ::Save ?
function used : private ViewAndLayoutItem m_currentView;
restoring : m_currentView.Properties.TryGetValue("SomeStoredProperty", out value) ;
saving : m_currentView.Properties.Remove("SomeStoredProperty"); m_currentView.Properties.Add("SomeStoredProperty", sClassName); m_currentView.Save();
Thanks for the detailed description. What you’re seeing is expected with how Smart Client persists views.
ViewAndLayoutItem derives from Item, so it exposes a Properties collection like every other item. But Smart Client doesn’t treat that collection as general-purpose storage for plugin data. Views are stored on the XProtect Management Server in a dedicated structure (name, shortcut, layout and view items). Custom entries added to a view’s Properties are kept in memory and returned for the current session, which is why your values look fine until Smart Client is restarted. They aren’t guaranteed to be persisted on the server, so this was never a supported way to store plugin data, and we don’t plan to change it.
The supported option is the plugin options storage, which the Property sample in the mipsdk-samples-plugin repository demonstrates. It saves and reads values on the XProtect server with Configuration.Instance.SaveOptionsConfiguration and GetOptionsConfiguration, either globally or per user. The sample’s side panel plugin (PropertySidePanelPlugin.cs) is the closest match to your setup.
For per-view settings, key your stored data on the view’s id (FQID.ObjectId). That way it doesn’t depend on how Smart Client stores views internally.