Marcin Rzeznicki napisal(a):
Some afterthought:
> 1) How to ensure that variable named 'blend' has unique name? There is
> a possibility that user will create more than one object of MyComponent
[quoted text clipped - 3 lines]
> surface, how may Blend objects have been generated so far etc. What is
> the best way to set up and propagate that kind of information?
This problem I have managed to solve by using special object of type
VariableCounter which resposibility is to track how many times variable
was instantiated, that I pass through serialization process by using
CreateInstance method of IDesignerSerializationManager. Seems to be not
so bad design and works just fine so far.
Montezuma - 24 Nov 2005 15:57 GMT
But take a look at
System.ComponentModel.Design.Serialization.INameCreationService
On MSDN is the code of the implementation used by the default designer.
Bye,
Montezuma
> Marcin Rzeznicki napisal(a):
>
[quoted text clipped - 13 lines]
> CreateInstance method of IDesignerSerializationManager. Seems to be not
> so bad design and works just fine so far.