Recommended

Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 1 result for Multiple Selection.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 1 comments  /  posted by  Nikolay Raychev  on  Apr 02, 2009 (more than a year ago)
    In Silverlight 3 you can make multiple selections in a ListBox. You just need to set the SelectionMode parameter:

    <ListBox Margin="5" x:Name="lbTasks"   
        ItemsSource="{Binding Tasks, ElementName=MainPageView}"   
        SelectionMode="Multiple">  
        <ListBox.ItemTemplate> 
            <DataTemplate> 
                <StackPanel Orientation="Horizontal" Margin="2">  
                    <TextBlock FontWeight="Bold" FontSize="13"   
                        Foreground="#ff006882" Text="{Binding Text}">  
                    </TextBlock> 
                </StackPanel> 
            </DataTemplate> 
        </ListBox.ItemTemplate> 
    </ListBox> 

    You have 3 options for the SelectionMode:
    • Single - you can select only one item.
    • Multiple - you can select multiple items by selecting one item, holding Ctrl or Shift key and pressing another item.
    • Extended - you can again select multiple items but the Shift key acts differently. With the help of the Shift key you can select items range by just pressing one item, holding Shift and pressing another one.



Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)