public void ClassInitialize()
        {
            // Setup initial conditions.
            button = new ImageButton();
            ResetUrls();
            TestHarness.AddControl(button.CreateView() as IView);

            // Wire up events.
            ButtonTest.WireClickEvents(button);
        }
        public PinPanel(jQueryObject container) : base(container)
        {
            // Setup initial conditions.
            hideDelay = new DelayedAction(DefaultHideDelay, OnHideDelayElapsed);

            // Insert the pin button.
            pin = ImageButtonFactory.Create(ImageButtons.PushPin);
            IButtonView view = pin.CreateView();
            view.Container.AddClass(ButtonCssClass);
            Container.Append(view.Container);

            // Wire up events.
            pin.IsPressedChanged += delegate
                                        {
                                            IsPinned = pin.IsPressed;
                                        };
            Container.MouseEnter(delegate { hideDelay.Stop(); });
            Container.MouseLeave(delegate { hideDelay.Start(); });

            // Finish up.
            SyncButton();
        }