Delegate for the event handler is
26 07 2009File Form1. cs contains sample of code consuming the controls. Samlpe showing fragment of parents constructor code is listed below. Click on particular element leads to its transition from one state to another. It takes two integer parameters related to control dynamics. private int step 2 in pixels public void DynamicsRules Rules of dynamic changes if 0 TimerTicksCount step step Movements this. X step this. X step In this sample protected getonly property TimerTicksCount of DynamicHotSpotControl class is used to synchronize objects movement.
In this article, we present base hot spot control is implemented with three classes MultipictureState derived from State class, MultipictureVisualElement derived from VisualElement class and DynamicHotSpotControl derived from HotSpotControl. It be possible that no action has to be taken default implementation since parent of control is notified separately with eventdelegate mechanism see below. private int step 2 in pixels public void DynamicsRules Rules of dynamic changes if 0 TimerTicksCount step step Movements this. X step this.
File HotSpot. cs contains the HotSpotControl related classes HotSpotLib namespace and will be compiled to TestHotSpot. exe file. Add to IE Search Print Report Article Discuss Sendtoafriend votes for this Article. Timer ticks count is reset to zero after it exceeded the threshold. Left mouse button click on particular element leads to its transition from one state to another. Normally, it uses HitVisualElement property of HotSpotControl to determine visual element clicked by left mouse button. These hot spot controls also serve as base and departure point for development of other types of controls, like for instance, customizable toolbar control.
The CurrentState property of VisualElement class allows developer to create new State object and add it to alState list. HotSpotLib assembly contains these classes as well as other support classes and interfaces.
This modification is not caused by change in elements state. Static control is permanently docked to the bottom, whereas dynamic control allows docking again, according to rules defined in customized control. Each state of particular visual element is clicked, File Form1. cs contains sample of code consuming the controls. If method returns empty string then no tip is shown. In response to left mouse button is gone down on visual element. Rules for states transition and dynamics are easily customizable. HotSpotControl handles down, up and move mouse events.
Tags: hotspot
Categories : hotspot control





