Example #1
0
        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;
            });
        }
Example #2
0
		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);
		}
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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;
            }
        }
Example #6
0
		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);
		}
Example #7
0
		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;
			});
		}
Example #8
0
        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;
            }
        }