Ejemplo n.º 1
0
        public void IsRequiredForFormPropertyTest()
        {
            Assert.IsNotNull(AutomationProperties.IsRequiredForFormProperty, "#0");

            TextBlock block = new TextBlock();

            block.SetValue(AutomationProperties.IsRequiredForFormProperty, true);
            Assert.AreEqual(AutomationProperties.GetIsRequiredForForm(block),
                            block.GetValue(AutomationProperties.IsRequiredForFormProperty), "#1");

            Assert.IsTrue(AutomationProperties.GetIsRequiredForForm(block), "#2");
            Assert.IsTrue((bool)block.GetValue(AutomationProperties.IsRequiredForFormProperty), "#3");
        }
Ejemplo n.º 2
0
 ///
 override protected bool IsRequiredForFormCore()
 {
     return(AutomationProperties.GetIsRequiredForForm(_owner));
 }