Friday, October 16, 2009

Using XAMOutlookBar control in WPF


The Infragistics NetAdvantage xamOutlookBar control emulates the navigation bar found in Microsoft Outlook. The XAMOutLookBar allows you to organize the application tasks into subsets of related task. In this post I’ll explain how to create and use a outlook bar into your application. Before starting you will require the NetAdvantage pack from Infragistics to be downloaded. You can download the trial version from the infragistics website.
You can add the XamOutlookBar control as any other control in your WPF application.
In my sample I have created a DocPanel and added the control inside it.
Follow the steps to create a sample application using the outlook bar.
1.       Create a WPF windows application.
2.       Add references to the Infragistics assemblies to your project
a.       Infragistics3.Wpf.v9.1.dll
b.      Infragistics3.Wpf.OutlookBar.v9.1.dll
3.       In the XAML add the XML namespace declaration as
xmlns:igOutlookBar="http://infragistics.com/OutlookBar"
4.       Create a DocPanel and paste the below given code inside it.
<igOutlookBar:XamOutlookBar Name="xamOutlookBar" DockPanel.Dock="Left" Width="150">
    <igOutlookBar:XamOutlookBar.Groups>
        <igOutlookBar:OutlookBarGroup
            Header="Clients"
            Key="Clients"
            SmallImage="/Infragistics.Samples.WPF;component/Images/Client-32.png"
            LargeImage="/Infragistics.Samples.WPF;component/Images/Client-32.png"
            IsSelected="True">
                <StackPanel>
                <TextBlock Text="Replace me with some content" />
StackPanel>
        igOutlookBar:OutlookBarGroup>       
    igOutlookBar:XamOutlookBar.Groups>           
igOutlookBar:XamOutlookBar>
5.       Compile and run solution.
6.       You can add more groups to the outlook bar by adding more Groups to the XamOutlookBar.Groups section.




No comments: