<?xml version="1.0" encoding="utf-8"?>
<UI xmlns="System.Windows.Forms, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
xmlns:ka="OutlookBar, OutlookBarAssembly, Version=1.0.1.2, Culture=neutral, PublicKeyToken=null"
xmlns:def="Definition">
<Canvas Name='PropertyTest' FormBase='Form' Location='10, 10' Size='600, 330' Visible='false' BackColor='LightSteelBlue' Closing='OnCloseEvent' Load='PropertyTestLoaded' Text='Simple Test Form' AcceptButton='{OKButton}' CancelButton='{CancelButton}'>
<Menu>
<MenuItems>
<MenuItem Text='&File' Popup='OnPopup'>
<MenuItems>
<MenuItem Text='New'/>
<MenuItem Text='-'/>
<MenuItem Text='E&xit' Click='ExitApp'/>
</MenuItems>
</MenuItem>
<MenuItem Text='&Edit'/>
<MenuItem Text='&View'/>
</MenuItems>
</Menu>
<Controls>
<Button def:Name='OKButton' Location='225, 10' Size='80, 25' Visible='true' BackColor='Control' Click='OnOK' FlatStyle='System' Text='&OK'/>
<Button def:Name='CancelButton' Location='225, 35' Size='80, 25' Visible='true' BackColor='Control' Click='OnCancel' FlatStyle='System' Text='&Cancel'/>
<Button Location='225, 100' Size='80, 25' Visible='true' BackColor='Control' Click='OnMyEvent' FlatStyle='System'>Click Event!</Button>
<Label Location='225, 65' Size='120, 40' Visible='true' Font='French Script MT, 22pt, style=Bold'>Font Test!</Label>
<Label Location='10, 12' Size='50, 15' Visible='true'>Edit 1:</Label>
<Label Location='10, 37' Size='50, 15' Visible='true'>Edit 2:</Label>
<TextBox Location='60, 10' Size='100, 20' Visible='true'/>
<TextBox Location='60, 35' Size='100, 20' Visible='true' Enabled='false'>Disabled</TextBox>
<Panel BorderStyle='Fixed3D' Top='70' Left='20' Size='200, 178' Visible='true' BackgroundImage='jojo.jpg' Anchor='Bottom, Left'/>
<GroupBox Location='225, 130' Size='120, 60' Visible='true' Text='First Group Box' Font='MS Sans Serif, 8pt, style=Bold'>
<Controls>
<RadioButton Location='10, 15' Size='70, 15' Visible='true' Font='MS Sans Serif, 8pt' Load='InitialRadioButtonState'>Like</RadioButton>
<RadioButton Location='10, 30' Size='70, 15' Visible='true' Font='MS Sans Serif, 8pt'>Don't Like</RadioButton>
</Controls>
</GroupBox>
<GroupBox Canvas="GroupBox2"/>
<TabControl Location='350, 10' Size='240, 250' Visible='true'>
<TabPages Canvas='TabPage1'/>
<TabPages Canvas='TabPage2'/>
<TabPages Name='TabPage3' Text='ListView' Load='PopulateListView'>
<Controls>
<ListView Location='5, 10' Size='222, 210' HeaderStyle='Nonclickable' FullRowSelect='true' GridLines='true' View='Details'>
<Columns Width='150' TextAlign='Left'>State</Columns>
<Columns Width='50' TextAlign='Center'>Abbr.</Columns>
</ListView>
</Controls>
</TabPages>
<TabPages Canvas='TabPage4'/>
</TabControl>
</Controls>
</Canvas>
<Canvas Name='GroupBox2' FormBase='GroupBox' Location='225, 200' Size='120, 60' Visible='true' Text='Second Group Box' Font='MS Sans Serif, 8pt, style=Bold'>
<Controls>
<RadioButton Location='10, 15' Size='70, 15' Visible='true' Font='MS Sans Serif, 8pt' Load='InitialRadioButtonState'>To Click</RadioButton>
<RadioButton Location='10, 30' Size='100, 15' Visible='true' Font='MS Sans Serif, 8pt'>Or Not To Click</RadioButton>
</Controls>
</Canvas>
<Canvas Name='TabPage1' FormBase='TabPage' Text='Custom Control'>
<def:Code language='C#'>
<reference assembly="System.Drawing.dll"/>
<reference assembly="System.Windows.Forms.dll"/>
<reference assembly="OutlookBarAssembly.dll"/>
<![CDATA[
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using OutlookBar;
class MyForm
{
private OutlookBar.OutlookBar outlookBar;
// controls in the tab page do not exist yet when the code-behind is instantiated!
public MyForm() {}
public void OnLoad(object sender, EventArgs e)
{
outlookBar=(OutlookBar.OutlookBar)sender;
IconPanel iconPanel1=new IconPanel();
IconPanel iconPanel2=new IconPanel();
IconPanel iconPanel3=new IconPanel();
outlookBar.AddBand("Outlook Shortcuts", iconPanel1);
outlookBar.AddBand("My Shortcuts", iconPanel2);
outlookBar.AddBand("Other Shortcuts", iconPanel3);
iconPanel1.AddIcon("Outlook Today", Image.FromFile("img1.ico"), new EventHandler(PanelEvent));
iconPanel1.AddIcon("Calendar", Image.FromFile("img2.ico"), new EventHandler(PanelEvent));
iconPanel1.AddIcon("Contacts", Image.FromFile("img3.ico"), new EventHandler(PanelEvent));
iconPanel1.AddIcon("Tasks", Image.FromFile("img4.ico"), new EventHandler(PanelEvent));
outlookBar.SelectBand(0);
}
public void PanelEvent(object sender, EventArgs e)
{
Control ctrl=(Control)sender;
PanelIcon panelIcon=ctrl.Tag as PanelIcon;
MessageBox.Show("#"+panelIcon.Index.ToString(), "Panel Event");
}
}
]]>
</def:Code>
<Controls>
<ka:OutlookBar Location='10, 10' Size='150, 210' Visible='true' BorderStyle='FixedSingle' Load='MyForm.OnLoad'/>
</Controls>
</Canvas>
<Canvas Name='TabPage2' FormBase='TabPage' Text='ListBox'>
<def:CodeBehind Src="InitDataSource.cs">
<reference assembly="System.Windows.Forms.dll"/>
</def:CodeBehind>
<Controls>
<ListBox Name='States' Location='10, 10' Size='130, 210' DataSource='ListBoxDS.DataSource' DisplayMember='LongName' ValueMember='ShortName'
SelectedValueChanged='ListBoxDS.ShowValue'/>
<Label Location='150, 10' Size='60, 15' Visible='true'>By event:</Label>
<TextBox Name='ByEvent' Location='150, 25' Size='75, 20' Visible='true' ReadOnly='true'/>
<Label Location='150, 55' Size='60, 15' Visible='true'>By binding:</Label>
<TextBox Location='150, 70' Size='75, 20' Visible='true' ReadOnly='true'>
<DataBindings>Text, ListBoxDS.DataSource, ShortName</DataBindings>
</TextBox>
</Controls>
</Canvas>
<Canvas Name='TabPage4' FormBase='MyCodeBehindClass' Text='Inherit' Load='MyCodeBehindClass.OnLoad'>
<def:CodeBehind Src="MyCodeBehind.cs">
<reference assembly="System.Windows.Forms.dll"/>
</def:CodeBehind>
<Controls>
<Label Location='10, 10' Size='150, 15' Visible='true'>Test</Label>
<Label Location='10, 42' Size='50, 15' Visible='true'>Colors</Label>
<ComboBox Name='Colors' Location='60, 40' Size='100, 100' DisplayMember='text' ValueMember='value'>
<DataSource>
<item value='1' text='Red'/>
<item value='2' text='Green'/>
<item value='3' text='Blue'/>
</DataSource>
</ComboBox>
</Controls>
</Canvas>
</UI>