W
WALDO
OK. here's what I want to do.
I have a text editor control that I created. I also have a seriedsof
palette controls that I have created for use with the text editor. The
Idea I want is that the page developer can slap any number of editors
on a webform and any number of palettes on the same webform and
associate an editor with a palette.
So all the editor really needs to know when rendering is the uniqueid
of the selected palette. What I have done is created a property of
type palette on the editor. I have created a typeconverter to grab all
the ids of the palettes on the webform. I have also set the
DesignerSerializationVisibility attribute to Visible and the
PersistenceMode to Attribute. Ultimately what I want to see is this:
<cc1:TextEditor runat="server" id="TextEditor1" Height="200px"
Width="500px" Palette="WebSafePalette1">This is my
InnerContent</cc1:TextEditor>
<cc1:WebSafePalette runat="server"
id="WebSafePalette1"></cc1:WebSafePalette>
<cc1:MSWordPalette runat="server"
id="MSWordPalette1"></cc1:MSWordPalette>
<cc1:StandardPalette runat="server"
id="StandardPalette1"></cc1:StandardPalette>
I want the Id of the selected palette to persist as an attribute
property in the HTML at design-time.
I see the list of palettes in the Palette property of the texteditor.
My problem is that when I set the DesignerSerializationVisibility
attribute to anything other than hidden, I get the error 'Invalid
property value (Object not set to an instance of an object)' whenever
I set the property at design time. When it is set to hidden, I don't
get the error. Unfortunately nothing persists to the texteditor or the
webform.
Any ideas as to how I may accomplish this? I thought maybe my
TypeEditor was wrong. Do I need a custom parser to fish out the
properties? Maybe a custom serializer to put the attribute property
where I want it. Maybe the serializer should put some code in the
InitializeComponent of the webform.
I have a text editor control that I created. I also have a seriedsof
palette controls that I have created for use with the text editor. The
Idea I want is that the page developer can slap any number of editors
on a webform and any number of palettes on the same webform and
associate an editor with a palette.
So all the editor really needs to know when rendering is the uniqueid
of the selected palette. What I have done is created a property of
type palette on the editor. I have created a typeconverter to grab all
the ids of the palettes on the webform. I have also set the
DesignerSerializationVisibility attribute to Visible and the
PersistenceMode to Attribute. Ultimately what I want to see is this:
<cc1:TextEditor runat="server" id="TextEditor1" Height="200px"
Width="500px" Palette="WebSafePalette1">This is my
InnerContent</cc1:TextEditor>
<cc1:WebSafePalette runat="server"
id="WebSafePalette1"></cc1:WebSafePalette>
<cc1:MSWordPalette runat="server"
id="MSWordPalette1"></cc1:MSWordPalette>
<cc1:StandardPalette runat="server"
id="StandardPalette1"></cc1:StandardPalette>
I want the Id of the selected palette to persist as an attribute
property in the HTML at design-time.
I see the list of palettes in the Palette property of the texteditor.
My problem is that when I set the DesignerSerializationVisibility
attribute to anything other than hidden, I get the error 'Invalid
property value (Object not set to an instance of an object)' whenever
I set the property at design time. When it is set to hidden, I don't
get the error. Unfortunately nothing persists to the texteditor or the
webform.
Any ideas as to how I may accomplish this? I thought maybe my
TypeEditor was wrong. Do I need a custom parser to fish out the
properties? Maybe a custom serializer to put the attribute property
where I want it. Maybe the serializer should put some code in the
InitializeComponent of the webform.