2
Answers

Control persistence/ custom properties. Active-X functionality.

tormods

tormods

20y
2.2k
1
Hi, I am making some general .NET window controls. I wish to implement persistence so that it is used if the parent allows it, so the control can be used both in my application and outside it (but when outside it may not support persistence for the control). In ActiveX this was solved by retrieving property bag from the parent. What options are there to implement such persistence using dotnet in general window controls? Are there ways of querying the parent for known property names? Can the control send/receive properties for persistent storage with the parent in other ways without stopping being a general dotnet control? Also wonder if my application can implement general persistence/serialization for third party controls somehow. I'm currently thinking of using attributes to mark some properties for serialization and then serialize the controls using reflection. Sounds a bit tedious when it's just one or two strings which shall be preserved by the server. Thank you for your help.
Answers (2)