private void BindToolbar() { IXPathNavigable navigable; Selector selector = new Selector(ClassName, ViewName, PlaceName); if (ToolbarMode == Mode.MetaView) { navigable = Mediachase.Ibn.XmlTools.XmlBuilder.GetXml(StructureType.MetaView, selector); } else { navigable = Mediachase.Ibn.XmlTools.XmlBuilder.GetXml(StructureType.ListViewUI, selector); } string path = String.Format(CultureInfo.InvariantCulture, "{0}/Toolbar", ToolbarMode.ToString()); XPathNavigator toolbar = navigable.CreateNavigator().SelectSingleNode(path); GetToolbarItemsFromXml(toolbar, MainToolbar.McToolbarItems); }