public void TestWithString() { HappyButton b = new HappyButton(); Style s = new Style(typeof(HappyButton)); s.Setters.Add(new Setter(HappyButton.HappyProperty, "just to invoke the type converter")); Assert.Throws <XamlParseException> (delegate { b.Style = s; }); }
public void TestWithValue () { HappyButton b = new HappyButton (); Style s = new Style (typeof (HappyButton)); s.Setters.Add (new Setter (HappyButton.HappyProperty, new HappyStruct (10, 10))); b.Style = s; Assert.AreEqual (new HappyStruct (10, 10), b.Happy); }
public void TestWithValue() { HappyButton b = new HappyButton(); Style s = new Style(typeof(HappyButton)); s.Setters.Add(new Setter(HappyButton.HappyProperty, new HappyStruct(10, 10))); b.Style = s; Assert.AreEqual(new HappyStruct(10, 10), b.Happy); }
public void TestWithString() { HappyButton b = new HappyButton(); Style s = new Style(typeof(HappyButton)); s.Setters.Add(new Setter(HappyButton.HappyProperty, "just to invoke the type converter")); b.Style = s; Assert.AreEqual(new HappyStruct(5, 5), b.Happy); }
void ReleaseDesignerOutlets() { if (AngryButton != null) { AngryButton.Dispose(); AngryButton = null; } if (BackgroundImageView != null) { BackgroundImageView.Dispose(); BackgroundImageView = null; } if (CoolButton != null) { CoolButton.Dispose(); CoolButton = null; } if (ExitButton != null) { ExitButton.Dispose(); ExitButton = null; } if (HappyButton != null) { HappyButton.Dispose(); HappyButton = null; } if (LoveButton != null) { LoveButton.Dispose(); LoveButton = null; } if (SadButton != null) { SadButton.Dispose(); SadButton = null; } }
public void TestWithString () { HappyButton b = new HappyButton (); Style s = new Style (typeof (HappyButton)); s.Setters.Add (new Setter (HappyButton.HappyProperty, "just to invoke the type converter")); b.Style = s; Assert.AreEqual (new HappyStruct (5, 5), b.Happy); }
public void TestWithString () { HappyButton b = new HappyButton (); Style s = new Style (typeof (HappyButton)); s.Setters.Add (new Setter (HappyButton.HappyProperty, "just to invoke the type converter")); Assert.Throws<XamlParseException> (delegate { b.Style = s; }); }
void ReleaseDesignerOutlets() { if (AngryButton != null) { AngryButton.Dispose(); AngryButton = null; } if (AngryIcon != null) { AngryIcon.Dispose(); AngryIcon = null; } if (CalmButton != null) { CalmButton.Dispose(); CalmButton = null; } if (CalmIcon != null) { CalmIcon.Dispose(); CalmIcon = null; } if (DisgustButton != null) { DisgustButton.Dispose(); DisgustButton = null; } if (DisgustIcon != null) { DisgustIcon.Dispose(); DisgustIcon = null; } if (FearButton != null) { FearButton.Dispose(); FearButton = null; } if (FearIcon != null) { FearIcon.Dispose(); FearIcon = null; } if (HappyButton != null) { HappyButton.Dispose(); HappyButton = null; } if (HappyIcon != null) { HappyIcon.Dispose(); HappyIcon = null; } if (SadButton != null) { SadButton.Dispose(); SadButton = null; } if (SadIcon != null) { SadIcon.Dispose(); SadIcon = null; } }