public void GroupWithButtons()
        {
            // Prepare
            var expected = XDocument.Load("Sample/GroupWithButtons.xml").ToString();

            builder.CustomUi.Ribbon.Tabs(c =>
            {
                c.AddTab("test").SetId("tab1")
                .Groups(g =>
                {
                    g.AddGroup("reporting").SetId("reportingGroup")
                    .Items(i =>
                    {
                        i.AddButton("Allocation").SetId("portfolioAllocation").LargeSize().ImageMso("HappyFace");
                        i.AddButton("Contributor").SetId("Contributor").NormalSize()
                        .NoImage().ShowLabel().Supertip("Portfolio best contributor")
                        .Screentip("Display the top / bottom X contributor to the portfolio performance.");
                    });
                    g.AddGroup("Analytic").SetId("AnalyticGroup")
                    .Items(i => i.AddButton("Portfolio Analysis").SetId("portfolioAnalyser").NormalSize()
                           .NoImage().ShowLabel());
                });
            });

            // Act
            var str = builder.GetXmlString();

            // Assert
            Assert.AreEqual(expected, str);
        }
Пример #2
0
 public string GetRibbonXml()
 {
     CreateFluentRibbon(ribbonBuilder);
     CreateRibbonCommand(cmds);
     CommandNames = cmds.GetListCommandNames();
     return(ribbonBuilder.GetXmlString());
 }
Пример #3
0
        private void AssertXml(string expectedFile, IRibbonBuilder builder)
        {
            var expected = LoadXml(expectedFile);
            // Act
            var str = builder.GetXmlString();

            Console.WriteLine(str);

            Assert.True(ValidateHelper.Validate(str));
            // Assert
            //Assert.AreEqual(expected, str);
        }