Gaia Ajax: AspectScrollable
Aspect class for tracking "scroll events" on widgets. Widgets you attach this aspect to
can raise the Scroll event when the user scrolls the widget. Either when scrolling to the bottom
or when scrolling at all.
This sample shows how you can attach events to the vertical
scrollbar of a Gaia Panel. By adding AspectScrollable you can
easily create a widget that is dynamically being fed with items
from the server as the user scrolls further down on. This sample
throws an event when you scroll to the bottom of the vertical
scrollbar.
Note when we are appending controls to the ControlsCollection
of the Panel, they are automatically sent to our page. Also note
that the image is clickable and opens a Gaia Window.
|
About Martin Luther King, Jr.
Martin Luther King, Jr. (January 15, 1929 – April 4, 1968)
was one of the main leaders of the American civil rights movement. He was a political
activist and Baptist minister and is regarded as one of America's greatest orators.
King's most influential and well-known public address is the 'I Have A Dream' speech,
delivered on the steps of the Lincoln Memorial in Washington, D.C. in 1963. In 1964,
King became the youngest man to be awarded the Nobel Peace Prize (for his work as a
peacemaker, promoting nonviolence and equal treatment for different races).
On April 4, 1968, King was assassinated in Memphis, Tennessee.
Source Wikipedia - about Martin Luther King, Jr. |
Features
- Low bandwidth usage - Easily load contents on demand
- Flexible - Inject any Gaia Ajax Control into the LiveScroll
- XHTML compliant - Of course
- Small footprint - Close to zero amount of JavaScript for the live scrolling feature
- "Just works" - Use keys, mouse or any other scrolling mechanism to initiate scrolling
- Easy to use - All coding is done server side in C# or VB.NET
Markup (ASPX/.aspx)
1:
2:
3: <gaia:ExtendedPanel
4: runat="server"
5: ID="container"
6: ScrollBars="None"
7: Caption="Live Ajax Scrolling"
8: Height="300px">
9:
10: <gaia:Panel
11: ID="panel"
12: Style="height:300px;position:relative;"
13: runat="server" />
14:
15: </gaia:ExtendedPanel>
16: <br /><br />
17:
18: <hr />
19: <div class="features">
20: <h2>Features</h2>
21: <ul>
22: <li><strong>Low bandwidth usage</strong> - Easily load contents on demand</li>
23: <li><strong>Flexible</strong> - Inject any Gaia Ajax Control into the LiveScroll</li>
24: <li><strong>XHTML compliant</strong> - Of course</li>
25: <li><strong>Small footprint</strong> - Close to zero amount of JavaScript for the live scrolling feature</li>
26: <li><strong>"Just works"</strong> - Use keys, mouse or any other scrolling mechanism to initiate scrolling</li>
27: <li><strong>Easy to use</strong> - All coding is done server side in C# or VB.NET</li>
28: </ul>
29: </div>
30:
31: <gaia:Window
32: ID="bioWindow"
33: runat="server"
34: Caption="Biography"
35: Draggable="true"
36: Resizable="true"
37: Minimizable="false"
38: Maximizable="false"
39: Closable="true"
40: Height="450px"
41: Width="500px"
42: Visible="false"
43: CssClass="gaiax">
44: <gaia:Label runat="server" ID="bioLbl" />
45: </gaia:Window>
46:
47: