Exemple #1
0
            public void With_Header(RibbonTitleBarSizeData testdata)
            {
                var titlebar = CreateNewTitlebar();

                using (new TestRibbonWindow(titlebar))
                {
                    titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight));

                    var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar);
                    Assert.That(resultData, Is.EqualTo(testdata));
                }
            }
Exemple #2
0
            public void With_Wide_Header(RibbonTitleBarSizeData testdata)
            {
                var titlebar = CreateNewTitlebar();

                titlebar.Header = "This is a really wide header which needs some more space";

                using (new TestRibbonWindow(titlebar))
                {
                    titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight));

                    var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar);
                    Assert.That(resultData, Is.EqualTo(testdata));
                }
            }
Exemple #3
0
            public void With_Header_And_QuickAccessItems(RibbonTitleBarSizeData testdata)
            {
                var titlebar           = CreateNewTitlebar();
                var quickAccessToolBar = (QuickAccessToolBar)(titlebar.QuickAccessToolBar = new QuickAccessToolBar());

                using (new TestRibbonWindow(titlebar))
                {
                    quickAccessToolBar.Items.Add(new TextBlock {
                        Text = "ABC"
                    });
                    quickAccessToolBar.Items.Add(new TextBlock {
                        Text = "ABC"
                    });
                    quickAccessToolBar.Items.Add(new TextBlock {
                        Text = "ABC"
                    });

                    titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight));

                    var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar);
                    Assert.That(resultData, Is.EqualTo(testdata));
                }
            }