Ejemplo n.º 1
0
        public async Task Check_Changing_Header_Affects_UI()
        {
            var pivotItem = new PivotItem {
                Header = "Initial text"
            };
            var SUT = new Pivot
            {
                Items = { pivotItem },
            };

            WindowHelper.WindowContent = SUT;
            await WindowHelper.WaitForIdle();

            var pivotHeaderPanel = (PivotHeaderPanel)SUT.GetTemplateChild("StaticHeader");
            var headerItem       = (PivotHeaderItem)pivotHeaderPanel.Children.Single();

            headerItem.Content.Should().Be("Initial text");
            pivotItem.Header = "New text";
            headerItem.Content.Should().Be("New text");
        }