示例#1
0
        public void When_Has_DataContext()
        {
            var dc     = "Starfish";
            var border = new Border();
            var dialog = new ContentDialog
            {
                DataContext = dc,
                Content     = border
            };

            dialog.ForceLoaded();

            Assert.AreEqual("Starfish", dialog.DataContext);
            var dummy = dialog.ShowAsync();

            Assert.AreEqual("Starfish", border.DataContext);
        }