We are dynamically creating RadEditors from code. Currently, I have code like this:
RadEditor edt = new RadEditor ();
edt.ID = "someid";
edt.ToolbarMode = EditorToolbarMode.ShowOnFocus;
edt.BorderStyle = BorderStyle.None;
edt.ToolsFile = "Tools.xml";
Rather than hardcode these properties, I'd rather create new instances from file. My first thought was to use the XmlSerializer to load an instance from a persisted xml file - however, creating a new instance of XmlSerializer on RadEditor throws numerous exceptions.
Essentially, I want to do what .NET does when it encounters something like this in an ASPX page:
<telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Design" Skin="WebBlue" ToolsFile="Tools.xml" BorderStyle="None" ToolbarMode="ShowOnFocus">
that is, instantiate the control and set the properties based on markup.
Is there an easy way to do this?
RadEditor edt = new RadEditor ();
edt.ID = "someid";
edt.ToolbarMode = EditorToolbarMode.ShowOnFocus;
edt.BorderStyle = BorderStyle.None;
edt.ToolsFile = "Tools.xml";
Rather than hardcode these properties, I'd rather create new instances from file. My first thought was to use the XmlSerializer to load an instance from a persisted xml file - however, creating a new instance of XmlSerializer on RadEditor throws numerous exceptions.
Essentially, I want to do what .NET does when it encounters something like this in an ASPX page:
<telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Design" Skin="WebBlue" ToolsFile="Tools.xml" BorderStyle="None" ToolbarMode="ShowOnFocus">
that is, instantiate the control and set the properties based on markup.
Is there an easy way to do this?