コード例 #1
0
        /// <summary>
        /// Adding items to chart dropdown button.
        /// </summary>
        /// <param name="customRibbonItem">Specifies the dropdown items.</param>
        private void PopulateChartDropDownItems(MenuMergingRibbonItem customRibbonItem)
        {
            MenuMergingDropDownItem firstItem = new MenuMergingDropDownItem()
            {
                Name = "Horizontal Bar", ImageTemplate = CommonResourceDictionary["HorizontalBar"] as DataTemplate
            };
            MenuMergingDropDownItem secondItem = new MenuMergingDropDownItem()
            {
                Name = "Vertical Bar", ImageTemplate = CommonResourceDictionary["VerticalBar"] as DataTemplate
            };
            MenuMergingDropDownItem thirdItem = new MenuMergingDropDownItem()
            {
                Name = "Pie", ImageTemplate = CommonResourceDictionary["Pie"] as DataTemplate
            };

            customRibbonItem.ModelTabDropDownItem.Add(firstItem);
            customRibbonItem.ModelTabDropDownItem.Add(secondItem);
            customRibbonItem.ModelTabDropDownItem.Add(thirdItem);
        }
コード例 #2
0
        /// <summary>
        /// Adding items to shape dropdown button
        /// </summary>
        /// <param name="customRibbonItem">Specifies the dropdown items.</param>
        private void PopulateShapeDropDownItems(MenuMergingRibbonItem customRibbonItem)
        {
            MenuMergingDropDownItem firstItem = new MenuMergingDropDownItem()
            {
                Name = "Square", ImageTemplate = CommonResourceDictionary["Square"] as DataTemplate
            };
            MenuMergingDropDownItem secondItem = new MenuMergingDropDownItem()
            {
                Name = "Circle", ImageTemplate = CommonResourceDictionary["Circle"] as DataTemplate
            };
            MenuMergingDropDownItem thirdItem = new MenuMergingDropDownItem()
            {
                Name = "Rhombus", ImageTemplate = CommonResourceDictionary["Rhombus"] as DataTemplate
            };

            customRibbonItem.ModelTabDropDownItem.Add(firstItem);
            customRibbonItem.ModelTabDropDownItem.Add(secondItem);
            customRibbonItem.ModelTabDropDownItem.Add(thirdItem);
        }
コード例 #3
0
        /// <summary>
        /// Adding items to attach file dropdown button
        /// </summary>
        /// <param name="customRibbonItem">Specifies the dropdown items.</param>
        private void PopulateAttachFileItems(MenuMergingRibbonItem customRibbonItem)
        {
            MenuMergingDropDownItem firstItem = new MenuMergingDropDownItem()
            {
                Name = "DOC", ImageTemplate = CommonResourceDictionary["DOC"] as DataTemplate
            };
            MenuMergingDropDownItem secondItem = new MenuMergingDropDownItem()
            {
                Name = "PDF", ImageTemplate = CommonResourceDictionary["PDF"] as DataTemplate
            };
            MenuMergingDropDownItem thirdItem = new MenuMergingDropDownItem()
            {
                Name = "ZIP", ImageTemplate = CommonResourceDictionary["ZIP"] as DataTemplate
            };
            MenuMergingDropDownItem fourthItem = new MenuMergingDropDownItem()
            {
                Name = "XLS", ImageTemplate = CommonResourceDictionary["XLS"] as DataTemplate
            };

            customRibbonItem.ModelTabDropDownItem.Add(firstItem);
            customRibbonItem.ModelTabDropDownItem.Add(secondItem);
            customRibbonItem.ModelTabDropDownItem.Add(thirdItem);
            customRibbonItem.ModelTabDropDownItem.Add(fourthItem);
        }