Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Basic Controls

A number of basic controls ship with Silverlight. The focus of this book involves more advanced scenarios, so I won’t be covering the controls in detail. Table 3.4 lists all of the basic controls that ship with Silverlight and what their primary purpose is. Use it as a reference to help determine what built-in controls make sense for your application.

Table 3.4. Basic Controls Shipped with Silverlight
ControlDescription
BorderPlaces a border around another element (may have a fill and a stroke or border, as well as rounded corners).
ButtonProvides a hit surface for the user to click to trigger an action. Supports binding to commands.
CheckBoxDefault implementation of a toggle button, or a hit surface that behaves like a switch and can have either an “on” or “off” state (or a “null” state if three-state mode is set).
ComboBoxPresents a list of options that can be expanded and scrolled to select a single item. When it does not have the focus, this control collapses to a single line and displays the selected item.
HyperlinkButtonSpecial type of button designed to direct the browser to navigate to a URL when clicked.
ImageBasic media element used to display static image data.
InkPresenterA special panel that allows strokes or “ink” to be displayed that supports Tablet PC features.
ListBoxPresents a list of selectable items. Multiple items may be selected.
MediaElementContainer for audio and/or video.
MultiScaleImageHost container for the DeepZoom technology that allows for large images to be encoded using tiles at various resolutions to facilitate rapid panning and zooming.
OpenFileDialogA special dialog that allows the user to navigate to a file on his system without violating the trust of the security sandbox that Silverlight runs in. The result is a file stream handed to the runtime.
PasswordBoxSpecial text box that masks the content.
PopupProvides an overlay that displays on top of existing content, used for displaying temporary information such as dialogs and notifications.
ProgressBarA container for showing progress that animates either continuously (for indeterminate “in progress” notification) or in specified increments (to show percentage-based progress).
RadioButtonProvides mutually exclusive selection of one item from a group.
RepeatButtonA button that continuously raises the click event at a predetermined interval when clicked.
RichTextBoxA container for rich text that allows embedded media, multiple fonts, sizes, and formatting.
RichTextBoxOverflowAn overflow container to allow automatic reformatting of content, including text, images, and other UI elements to span multiple containers. Common uses are to flow around images and provide multicolumn views.
SaveFileDialogPrompt that allows the user to indicate a file on his local file system that returns a stream you can then write to.
SliderA special graphical interface that allows the user to drag a “thumb” across a surface to indicate a value.
TextBlockContainer for read-only text.
TextBoxContainer that allows text entry.
ToolTipA special control that allows text to be shown to the user when the associated control is hovered over as a “tip” for how to use the control.
WebBrowserA container for browsing web pages and parsing HTML content within the Silverlight application.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial