예제 #1
0
        public async Task DefaultButtonRespectsButtonHelperPreserveTextCase()
        {
            await TestHost.SwitchToAppThread();

            var window = await WindowHelpers.CreateInvisibleWindowAsync <ButtonWindow>();

            Button defaultButton = window.DefaultButton;

            ButtonHelper.SetPreserveTextCase(defaultButton, true);
            var presenter = defaultButton.FindChild <ContentPresenter>("PART_ContentPresenter");

            Assert.Equal("SomeText", presenter.Content);
        }