OutlookBar for WPF and Silverlight
Selecting an Item in the C1OutlookBar

C1OutlookBar supports single item selection and allows you to programmatically select an item, giving you control over which item is selected when a user first views the C1Outlookbar.

Suppose you have a C1OutlookBar named C1OutlookBar1 which contains several C1OutlookItems, one of which is named selectedItem:

XAML
Copy Code
<c1:C1OutlookBar x:Name="C1OutlookBar1 ">
<c1:C1OutlookItem x:Name="selectedItem" Header="Tasks">
  1. Choose View | Code from the Visual Studio menu.
  2. Add the following code to your project:

     

    C#
    Copy Code
    using C1.Silverlight.OutlookBar;
     
    namespace C1OutlookBar
    {
        public partial class MainPage : UserControl
        {
            public MainPage()
            {
                InitializeComponent();
                C1OutlookBar1.SelectedItem = (C1OutlookItem)selectedItem;
            }
        }
    }
    
  3. Run the project and notice the C1OutlookItem named selectedItem, or in this example the Tasks item, is selected.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback