[ Index ] |
|
Code source de PRADO 3.0.6 |
1 <com:TContent ID="body" > 2 3 <h1 id="3801">TMultiView</h1> 4 <com:DocLink ClassPath="System.Web.UI.WebControls.TMultiView" /> 5 6 <p> 7 <tt>TMultiView</tt> serves as a container for a group of <tt>TView</tt> controls, which can be retrieved by the <tt>Views</tt> property. Each view contains child controls. <tt>TMultiView</tt> determines which view and its child controls are visible. At any time, at most one view is visible (called <i>active</i>). To make a view active, set <tt>ActiveView</tt> or <tt>ActiveViewIndex</tt>. Note, by default there is no active view. 8 </p> 9 <p> 10 To add a view to <tt>TMultiView</tt>, manipulate the <tt>Views</tt> collection or add it in template as follows, 11 </p> 12 <com:TTextHighlighter Language="prado" CssClass="source"> 13 <com:TMultiView> 14 <com:TView> 15 view 1 content 16 </com:TView> 17 <com:TView> 18 view 2 content 19 </com:TView> 20 </com:TMultiView> 21 </com:TTextHighlighter> 22 23 <p> 24 <tt>TMultiView</tt> responds to the following command events to manage the visibility of its views. 25 </p> 26 <ul> 27 <li><tt>NextView</tt> : switch to the next view (with respect to the currently active view). 28 <li><tt>PreviousView</tt> : switch to the previous view (with respect to the currently active view). 29 <li><tt>SwitchViewID</tt> : switch to a view by its ID path. The ID path is fetched from the command parameter. 30 <li><tt>SwitchViewIndex</tt> : switch to a view by its zero-based index in the <tt>Views</tt> collection. The index is fetched from the command parameter. 31 </ul> 32 33 <p> 34 Upon postback, if the active view index is changed, <tt>TMultiView</tt> will raise an <tt>OnActiveViewChanged</tt> event. 35 </p> 36 37 <p> 38 The <a href="?page=Fundamentals.Samples.Hangman.Home">Hangman game</a> is a typical use of <tt>TMultiView</tt>. The following example demonstrates another usage of <tt>TMultiView</tt>. 39 </p> 40 41 <com:RunBar PagePath="Controls.Samples.TMultiView.Home" /> 42 43 </com:TContent>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |