Exemple #1
0
        public void ReadXml(XmlNode node)
        {
            String name      = node.Attributes.GetNamedItem("Name").Value;
            String title     = node.Attributes.GetNamedItem("Header").Value;
            String id        = node.Attributes.GetNamedItem("Name").Value;
            String isEnabled = node.Attributes.GetNamedItem("IsEnabled").Value;

            //XmlNodeList Items = node.SelectNodes("Items");
            RibbonItem_ViewModel ribbonItems = new RibbonItem_ViewModel();

            ribbonItems.ReadXML(node.ChildNodes);
            ribbonPanelSource = new RibbonPanelSourceCustom()
            {
                Id                = id,
                Name              = name,
                Title             = title,
                RibbonItemsCustom = ribbonItems.RibbonItems
            };

            //String name = node.SelectSingleNode("Name").InnerText;
            //String title = node.SelectSingleNode("Title").InnerText;
            //String id = node.SelectSingleNode("Id").InnerText;
            //XmlNodeList Items = node.SelectNodes("Items/Item");
            //RibbonItem_ViewModel ribbonItems = new RibbonItem_ViewModel();
            //ribbonItems.ReadXML(Items);
            //ribbonPanelSource = new RibbonPanelSourceCustom()
            //{
            //    Id = id,
            //    Name = name,
            //    Title = title,
            //    RibbonItemsCustom = ribbonItems.RibbonItems
            //};
        }
Exemple #2
0
        public static ObservableCollection <RadRibbonGroup> ConverToTelerik(ObservableCollection <RibbonPanelCustom> panelCustoms)
        {
            ObservableCollection <RadRibbonGroup> temp = new ObservableCollection <RadRibbonGroup>();

            foreach (RibbonPanelCustom panelCustom in panelCustoms)
            {
                RibbonPanelSourceCustom source = panelCustom.RibbonPanelSourceCustom;
                RibbonItem_ViewModel.ConverToTelerik(source.RibbonItemsCustom);
                temp.Add(new RadRibbonGroup()
                {
                    Header = source.Title, ItemsSource = RibbonItem_ViewModel.RadControl
                });
            }
            return(temp);
        }