Creating a valid structure
You can right-click in the XML editor to add the nodes, and use
the Error List pane to analyze and
fix any syntax error.
Here is a brief description to the main XML nodes of a RibbonBar
control which can help you understand what a valid structure looks
like:
-
<RibbonBar> — This is the root node. It provides
property values for the RibbonBar controls.-
<RibbonItems> — This is the only-one second-level
node. Only one <RibbonItems> is allowed here.-
<ApplicationButton> — Only one
<ApplicationButton> is allowed here. It provides
property values for the application button.-
<ApplicationMenu> — Only one
<ApplicationMenu> is allowed here.
<ApplicationMenu> can contain only one
<Master> and only one <Recent>; and
<Master> and <Recent> can contain multiple
<Item>.
-
-
<Categories> — This is the only-one node for
all of the categories.-
<Category> — Multiple <Category>
are allowed.-
<Panel> — Multiple <Panel> are
allowed. <Panel> can contain multiple
<LargeButton>, <SmallButton>,
<CheckBox>, <ComboBox>, and
<Group>.-
<Group> — Multiple <Group> are
allowed. <Group> can contain multiple
<SmallButton>, <CheckBox>, and
<ComboBox>, but cannot contain any
<LargeButton>. -
<SmallButton> — Multiple
<SmallButton> are allowed. <SmallButton>
can contain only one <Menu>; <Menu> can
have multiple <Item>. -
<LargeButton> — Multiple
<LargeButton> are allowed. <LargeButton>
can contain only one <Menu>; <Menu> can
have multiple <Item>. -
<CheckBox> — Multiple <CheckBox>
are allowed. -
<ComboBox> — Multiple <ComboBox>
are allowed. <ComboBox> can contain multiple
<Item>.
-
-
-
-
<TabButtons> — This is the only-one node for
all of the tab buttons.-
<TabButton> — Multiple <TabButton>
are allowed. <TabButton> can contain only one
<Menu>; <Menu> can have multiple
<Item>.
-
-
-
After you finalize the design, you can save the XML scripts of
the RibbonBar control to an XML or JSON file or as a string, and then
load the file or string to create the RibbonBar in the
application.
-
To load the XML file to create the RibbonBar, call the
ImportFromXMLFilefunction1Lnv_RibbonBar1.ImportFromXMLFile ("D:RibbonBarXMLRibbonBar.xml") -
To load the JSON file to create the RibbonBar, call the
ImportFromJSONFilefunction1Lnv_RibbonBar1.ImportFromJSONFile ("D:RibbonBarXMLRibbonBar.json") -
To load the XML string to create the RibbonBar, call the
ImportXMLfunction1Lnv_RibbonBar1.ImportXML (XMLData) -
To load the JSON string to create the RibbonBar, call the
ImportJSONfunction1Lnv_RibbonBar1.ImportJSON (JSONData)