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
  • PrintPrint

11.4. Adding Display Controls

The goal of most business applications is to present data to their users, allow them to update the data and save it back to a database. Some common controls used to facilitate this process are the Textbox, ListBox, ComboBox, Checkbox, DatePicker, and DataGrid. You have already seen the TextBox used on a window; the following code shows how to add a ListBox and ComboBox to a window. Figure 11-3 shows how the window is rendered.

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <ListBox Margin="20" Grid.Column="0">
        <ListBoxItem>Red</ListBoxItem>
        <ListBoxItem>Blue</ListBoxItem>


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint