<Window x:Class="Printing.PrintOptionsDialog" Title="Print Options" Height="500" Width="300" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:c1time="http://schemas.componentone.com/winfx/2006/xaml" xmlns:printing="clr-namespace:Printing">
	<Window.Resources>
		<DataTemplate x:Key="PrintStyleItemTemplate" DataType="{x:Type printing:PrintStyle}">
			<StackPanel Orientation="Horizontal">
				<Image Source="{Binding PreviewImage}" Margin="2" />
				<TextBlock Text="{Binding Description}" Margin="2" VerticalAlignment="Center" />
			</StackPanel>
		</DataTemplate>
	</Window.Resources>
	<DockPanel>
		<Grid DockPanel.Dock="Bottom">
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
				<ColumnDefinition />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<Button Grid.Column="0" Margin="2" Name="btnOk" IsDefault="True" Click="btnOk_Click">_Ok</Button>
			<Button Grid.Column="1" Margin="2" Name="btnCancel" IsCancel="True" Click="btnCancel_Click">_Cancel</Button>
			<Button Grid.Column="2" Margin="2" Name="btnPreview" Click="btnPreview_Click">_Preview...</Button>
		</Grid>
		<GroupBox Header="Print Range" Name="grpPrintRange" DockPanel.Dock="Bottom">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="50" />
					<ColumnDefinition />
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Label Grid.Column="0" Grid.Row="0" Margin="2">S_tart:</Label>
				<Label Grid.Column="0" Grid.Row="1" Margin="2">_End:</Label>
                <c1time:C1DateTimePicker Grid.Column="1" Grid.Row="0" Margin="2" x:Name="dtpStart" VerticalAlignment="Top" EditMode="Date" />
                <c1time:C1DateTimePicker Grid.Column="1" Grid.Row="1" Margin="2" x:Name="dtpEnd" VerticalAlignment="Top" EditMode="Date" />
				<CheckBox Grid.Column="1" Grid.Row="2" x:Name="chkHidePrivate" VerticalAlignment="Top" Margin="12,2,2,2">
					_Hide details of private appointments</CheckBox>
			</Grid>
		</GroupBox>
		<GroupBox Header="Print Style" DockPanel.Dock="Top">
			<Grid>
				<ListBox x:Name="lstStyles" SelectionChanged="lstStyles_SelectionChanged" ItemTemplate="{StaticResource PrintStyleItemTemplate}" />
			</Grid>
		</GroupBox>
	</DockPanel>
</Window>