<localView:BeWoView x:Class="BeWo.Scheduler.View.SchedulerView"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:localView="clr-namespace:BeWo.View"
                    xmlns:localSchConv="clr-namespace:BeWo.Scheduler.Converter"
                    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                    xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
                    xmlns:dxschint="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
                    xmlns:dxschcore="clr-namespace:DevExpress.XtraScheduler;assembly=DevExpress.XtraScheduler.v13.1.Core"
                    xmlns:dxschui="clr-namespace:DevExpress.Xpf.Scheduler.Drawing;assembly=DevExpress.Xpf.Scheduler.v13.1"
					xmlns:dxscht="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/themekeys"
                    xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
                    xmlns:search="clr-namespace:BeWo.View.Search"
                    Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
	<localView:BeWoView.Resources>
		<ResourceDictionary>
			<dxschint:ToolTipVisibilityToVisibilityConverter x:Key="ToolTipVisibilityConverter" />
			<dx:BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" />
			<dxschint:BrushResourcesConverter x:Key="brushResourcesConverter" />
			<localSchConv:TimeScale2TextConverter x:Key="TimeScale2TextConverter" />
			<localSchConv:DynamicForegroundConverter x:Key="DynamicForegroundConverter" />
			<localSchConv:DynamicForegroundConverter2 x:Key="DynamicForegroundConverter2" />
			<Style x:Key="VerticalEmployeeResourceHeaderStyle" TargetType="{x:Type dxschint:VisualResourceHeader}">
				<Style.Resources>
				</Style.Resources>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type dxschint:VisualResourceHeader}">
							<Grid>
								<Border SnapsToDevicePixels="True" BorderThickness="1" BorderBrush="Transparent" Background="#FF6E6E6E">
									<ContentControl Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
								</Border>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="ContentTemplate">
					<Setter.Value>
						<DataTemplate>
							<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
								<TextBlock VerticalAlignment="Center" HorizontalAlignment="Right" SnapsToDevicePixels="True" Margin="3"
								           Width="150" ToolTip="{Binding ResourceCaption}" TextAlignment="Right"
								           FontSize="12" Foreground="#FFD7D7D7" Text="{Binding ResourceCaption}"
								           TextTrimming="CharacterEllipsis" />
							</StackPanel>
						</DataTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="DateHeaderStyle" TargetType="{x:Type dxschui:VisualTimeScaleHeader}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type dxschui:VisualTimeScaleHeader}">
							<Border x:Name="border1" Background="#FF6E6E6E" BorderThickness="1,0" BorderBrush="#FFA1A1A1" Padding="3,0"
							        MinHeight="20">
								<ContentControl TextElement.Foreground="#FFD7D7D7" Content="{TemplateBinding Content}"
								                ContentTemplate="{TemplateBinding ContentTemplate}" />
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="ContentTemplate">
					<Setter.Value>
						<DataTemplate>
							<Grid>
								<TextBlock x:Name="text" TextAlignment="Center" FontSize="12" FontFamily="Segoe UI" VerticalAlignment="Center">
									<TextBlock.Text>
										<MultiBinding Converter="{StaticResource TimeScale2TextConverter}">
											<MultiBinding.Bindings>
												<Binding Path="." />
												<Binding Path="IntervalStart" />
												<Binding Path="IntervalEnd" />
											</MultiBinding.Bindings>
										</MultiBinding>
									</TextBlock.Text>
								</TextBlock>
							</Grid>
						</DataTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			
			<!-- Region Neue Templates -->
			
			<!-- Region VerticalAppointmentTemplate-->
			<ControlTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=VerticalAppointmentTemplate, IsThemeIndependent=true}" TargetType="{x:Type dxschint:VisualVerticalAppointmentControl}">
				<dxschint:AppointmentColorConvertControl x:Name="clrConvCtrl" ControlColor="{Binding ViewInfo.LabelColor, RelativeSource={RelativeSource TemplatedParent} }" SnapsToDevicePixels="True">
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="DraggedStates">
							<VisualState x:Name="NotDragged">
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="back" To="1" Duration="0:0:0.15" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentContainer" To="1" Duration="0:0:0.15" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Selection" To="1" Duration="0:0:0.15" />
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Dragged">
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="back" To="0.2" Duration="0:0:0.15" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentContainer" To="0.2" Duration="0:0:0.15" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Selection" To="0.2" Duration="0:0:0.15" />
								</Storyboard>
							</VisualState>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<dxschint:AppointmentColorConvertControl.BaseColors>
						<dxschint:ColorCollection>
							<dxschint:ColorDefinition Value="#FFE4E4E4" Name="ColorDefinition_MiddleBorderGradient" />
						</dxschint:ColorCollection>
					</dxschint:AppointmentColorConvertControl.BaseColors>
					<dxschint:AppointmentColorConvertControl.BaseBrushColors>
						<dxschint:ColorCollection>
							<dxschint:ColorDefinition Value="#FFBABABA" Name="ColorDefinition_BackBorder" />
							<dxschint:ColorDefinition Value="#FF7A7A7A" Name="ColorDefinition_AppointmentSelection" />
						</dxschint:ColorCollection>
					</dxschint:AppointmentColorConvertControl.BaseBrushColors>
					<Grid x:Name="PART_ToolTipContainer" dxsch:SchedulerControl.HitTestType="AppointmentContent"
								dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}">
						<!--AppointmentToolTip-->
						<ToolTipService.ToolTip>
							<ToolTip Content="{TemplateBinding ViewInfo}" ContentTemplate="{Binding ViewInfo.View.AppointmentToolTipContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
									Visibility="{Binding ViewInfo.View.AppointmentToolTipVisibility, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ToolTipVisibilityConverter}}">
							</ToolTip>
						</ToolTipService.ToolTip>
						<dxschint:AppointmentBorder x:Name="back" DefaultCornerRadius="4" Background="{Binding ElementName=clrConvCtrl, Path=Container, Converter={StaticResource brushResourcesConverter}, ConverterParameter=ColorDefinition_BackBorder}" Opacity="1" ViewInfo="{TemplateBinding ViewInfo}">
							<dxschint:AppointmentBorder DefaultCornerRadius="3" DefaultMargin="1" ViewInfo="{TemplateBinding ViewInfo}">
								<dxschint:AppointmentBorder.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="White" Offset="0" />
									</LinearGradientBrush>
								</dxschint:AppointmentBorder.Background>
								<dxschint:AppointmentBorder DefaultCornerRadius="2" DefaultMargin="1" ViewInfo="{TemplateBinding ViewInfo}">
									<dxschint:AppointmentBorder.Background>
										<SolidColorBrush Color="{Binding ViewInfo.LabelColor, RelativeSource={RelativeSource TemplatedParent}}"/>
									</dxschint:AppointmentBorder.Background>
								</dxschint:AppointmentBorder>
							</dxschint:AppointmentBorder>
						</dxschint:AppointmentBorder>
						<Grid x:Name="ContentContainer" Margin="3,0,3,0">
							<Grid.Resources>
								<dxschint:AppointmentStatusDisplayTypeToGridLengthConverter x:Key="StatusDisplayTypeToGridLengthConverter" DefaultValue="5" />
								<dxschint:AppointmentStatusDisplayTypeToVisibilityConverter x:Key="AppointmentStatusDisplayTypeToVisibilityConverter" />
							</Grid.Resources>
							<Grid.ColumnDefinitions>
								<ColumnDefinition x:Name="ContentContainerStatusColumn" Width="{Binding StatusDisplayType, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StatusDisplayTypeToGridLengthConverter}}" />
								<ColumnDefinition Width="*" />
							</Grid.ColumnDefinitions>
							<ContentPresenter x:Name="PART_Content" Grid.Column="1" Margin="10,6,10,0" Content="{TemplateBinding ViewInfo}" ContentTemplate="{TemplateBinding ContentTemplate}" />
						</Grid>
						<dxschint:AppointmentBorder x:Name="Selection" DefaultCornerRadius="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
												  DefaultBorderThickness="2" ViewInfo="{TemplateBinding ViewInfo}" BorderBrush="Black" 
												  Visibility="{Binding ViewInfo.Selected, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}" />
						<!--ResizingHitTest-->
						<Rectangle Fill="Transparent" Height="5" VerticalAlignment="Top" HorizontalAlignment="Stretch"
							Visibility="{Binding Path=ViewInfo.CanResizeStart, RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource boolToVisibilityConverter}}"
							IsHitTestVisible="True"
							dxsch:SchedulerControl.HitTestType="AppointmentResizingTopEdge"
							dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}"
							Cursor="SizeNS">
						</Rectangle>
						<Rectangle Fill="Transparent" Height="5" VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
							IsHitTestVisible="True"
							Visibility="{Binding Path=ViewInfo.CanResizeEnd, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"
							dxsch:SchedulerControl.HitTestType="AppointmentResizingBottomEdge"
							dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}"
							Cursor="SizeNS">
						</Rectangle>
					</Grid>
				</dxschint:AppointmentColorConvertControl>
			</ControlTemplate>
			<!--Endregion-->
		
			<!-- Region VerticalAppointmentContentTemplate-->
			<DataTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=VerticalAppointmentContentTemplate, IsThemeIndependent=true}">
				<Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" MinWidth="0" />
						<ColumnDefinition Width="*" />
					</Grid.ColumnDefinitions>
					<dxschint:AppointmentImagesControl Grid.Column="0" ViewInfo="{Binding}" Orientation="Vertical" SnapsToDevicePixels="True" />
					<dxschint:VerticalAppointmentContentPanel ClipToBounds="True" Grid.Column="1" Margin="0,0,0,5">
						<dxschint:VerticalAppointmentClockControl ViewInfo="{Binding}" Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}" />
						<TextBlock Text="{Binding Description}" dxschint:VerticalAppointmentContentPanel.AlwaysOnNewRow="True" TextWrapping="Wrap" Margin="0,6,0,0" Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}" />
					</dxschint:VerticalAppointmentContentPanel>
				</Grid>
			</DataTemplate>
			<!--Endregion-->
		
			<!-- Region Horizontal -->
			<!--HorizontalAppointmentTemplate-->
			<ControlTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=HorizontalAppointmentTemplate, IsThemeIndependent=true}" TargetType="{x:Type dxschint:VisualHorizontalAppointmentControl}">
				<dxschint:AppointmentColorConvertControl x:Name="clrConvCtrl" SnapsToDevicePixels="True" ControlColor="{Binding ViewInfo.LabelColor, RelativeSource={RelativeSource TemplatedParent} }">
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="DraggedStates">
							<VisualState x:Name="NotDragged">
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="back" To="1" Duration="0:0:0.25" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentContainer" To="1" Duration="0:0:0.25" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Selection" To="1" Duration="0:0:0.25" />
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Dragged">
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="back" To="0.2" Duration="0:0:0.25" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentContainer" To="0.2" Duration="0:0:0.25" />
									<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Selection" To="0.2" Duration="0:0:0.25" />
								</Storyboard>
							</VisualState>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<dxschint:AppointmentColorConvertControl.BaseColors>
						<dxschint:ColorCollection>
							<dxschint:ColorDefinition Value="#FFE4E4E4" Name="ColorDefinition_MiddleBorderGradient" />
						</dxschint:ColorCollection>
					</dxschint:AppointmentColorConvertControl.BaseColors>
					<dxschint:AppointmentColorConvertControl.BaseBrushColors>
						<dxschint:ColorCollection>
							<dxschint:ColorDefinition Value="#FFBABABA" Name="ColorDefinition_BackBorder" />
							<dxschint:ColorDefinition Value="#FF7A7A7A" Name="ColorDefinition_AppointmentSelection" />
						</dxschint:ColorCollection>
					</dxschint:AppointmentColorConvertControl.BaseBrushColors>
					<Grid x:Name="PART_ToolTipContainer" dxsch:SchedulerControl.HitTestType="AppointmentContent"
								dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}">
						<!--AppointmentToolTip-->
						<ToolTipService.ToolTip>
							<ToolTip Content="{TemplateBinding ViewInfo}"
							ContentTemplate="{Binding ViewInfo.View.AppointmentToolTipContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
							Visibility="{Binding ViewInfo.View.AppointmentToolTipVisibility, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ToolTipVisibilityConverter}}">
							</ToolTip>
						</ToolTipService.ToolTip>
						<dxschint:AppointmentBorder x:Name="back" DefaultCornerRadius="4" Background="{Binding ElementName=clrConvCtrl, Path=Container, Converter={StaticResource brushResourcesConverter}, ConverterParameter=ColorDefinition_BackBorder}" Opacity="1" ViewInfo="{TemplateBinding ViewInfo}">
							<dxschint:AppointmentBorder DefaultCornerRadius="3" DefaultMargin="1" ViewInfo="{TemplateBinding ViewInfo}">
								<dxschint:AppointmentBorder.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="White" Offset="0" />
									</LinearGradientBrush>
								</dxschint:AppointmentBorder.Background>
								<dxschint:AppointmentBorder DefaultCornerRadius="2" DefaultMargin="1" ViewInfo="{TemplateBinding ViewInfo}">
									<dxschint:AppointmentBorder.Background>
										<SolidColorBrush Color="{Binding ViewInfo.LabelColor, RelativeSource={RelativeSource TemplatedParent}}"/>
									</dxschint:AppointmentBorder.Background>
								</dxschint:AppointmentBorder>
							</dxschint:AppointmentBorder>
						</dxschint:AppointmentBorder>
						<Grid x:Name="ContentContainer" Margin="0,3,0,3">
							<Grid.Resources>
								<dxschint:AppointmentStatusDisplayTypeToDoubleConverter x:Key="StatusDisplayTypeToDoubleConverter" DefaultValue="5" />
								<dxschint:AppointmentStatusDisplayTypeToVisibilityConverter x:Key="AppointmentStatusDisplayTypeToVisibilityConverter" />
							</Grid.Resources>
							<Grid.RowDefinitions>
								<RowDefinition x:Name="ContentContainerStatusColumn" Height="Auto" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<dxsch:AppointmentStatusControl ViewInfo="{TemplateBinding ViewInfo}" Orientation="Horizontal"
													  Visibility="{Binding StatusDisplayType, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource AppointmentStatusDisplayTypeToVisibilityConverter}}"
													  Height="{Binding StatusDisplayType, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StatusDisplayTypeToDoubleConverter}}">
							<dxschint:AppointmentBorder x:Name="Status" DefaultCornerRadius="2" DefaultMargin="3,0,3,0" Background="{Binding ViewInfo.StatusBrush, RelativeSource={RelativeSource TemplatedParent}}"
													ViewInfo="{TemplateBinding ViewInfo}" />
							</dxsch:AppointmentStatusControl>
							<ContentPresenter x:Name="PART_Content" Grid.Row="1" Margin="6,0,6,0" Content="{TemplateBinding ViewInfo}" ContentTemplate="{TemplateBinding ContentTemplate}" />
						</Grid>
						<dxschint:AppointmentBorder x:Name="Selection" DefaultCornerRadius="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
							DefaultBorderThickness="2" ViewInfo="{TemplateBinding ViewInfo}"
							BorderBrush="Black"
							Visibility="{Binding ViewInfo.Selected, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}" />
						<!--ResizingHitTest-->
						<Rectangle Fill="Transparent" Width="5" HorizontalAlignment="Left"
							   Visibility="{Binding ViewInfo.CanResizeStart, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"
							   IsHitTestVisible="True"
							dxsch:SchedulerControl.HitTestType="AppointmentResizingLeftEdge"
							   dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}"
							Cursor="SizeWE">
						</Rectangle>
						<Rectangle Fill="Transparent" Width="5" HorizontalAlignment="Right"
							   IsHitTestVisible="True"
							Visibility="{Binding Path=ViewInfo.CanResizeEnd, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"
							dxsch:SchedulerControl.HitTestType="AppointmentResizingRightEdge"
							   dxsch:SchedulerControl.SelectableIntervalViewInfo="{TemplateBinding ViewInfo}"
							Cursor="SizeWE">
						</Rectangle>
					</Grid>
				</dxschint:AppointmentColorConvertControl>
			</ControlTemplate>
			
			<!--HorizontalAppointmentContentTemplate SameDay-->
			<DataTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=HorizontalAppointmentSameDayContentTemplate, IsThemeIndependent=true}">
				<dxschint:HorizontalAppointmentContentPanel ClipToBounds="True" HorizontalAlignment="Stretch" VerticalAlignment="Center">
					<dxschint:HorizontalAppointmentStartClockControl VerticalAlignment="Center" ViewInfo="{Binding}" Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}" />
					<dxschint:HorizontalAppointmentEndClockControl VerticalAlignment="Center" ViewInfo="{Binding}" Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}" />
					<dxschint:AppointmentImagesControl ViewInfo="{Binding}" Orientation="Horizontal" />
					<TextBlock Text="{Binding Description}"
						   Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}"
						   TextWrapping="NoWrap"
						   TextAlignment="Left"
						   VerticalAlignment="Center"
						   HorizontalAlignment="Stretch" />
				</dxschint:HorizontalAppointmentContentPanel>
			</DataTemplate>

			<!--HorizontalAppointmentContentTemplate wird auf ganztägige Termine angewandt-->
			<DataTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=HorizontalAppointmentLongerThanADayContentTemplate, IsThemeIndependent=true}">
				<Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch" VerticalAlignment="Center">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
					</Grid.ColumnDefinitions>
					<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
						<dxschint:AppointmentContinueStartDateControl ViewInfo="{Binding}" />
						<dxschint:HorizontalAppointmentStartClockControl ViewInfo="{Binding}" />
					</StackPanel>
					<dxschint:HorizontalAppointmentContentPanel Grid.Column="1" ClipToBounds="True" VerticalAlignment="Center" Margin="2,0,2,0">
						<dxschint:AppointmentImagesControl HorizontalAlignment="Center" ViewInfo="{Binding}" Orientation="Horizontal" />
						<!--<TextBlock Text="{Binding Description}" VerticalAlignment="Center" TextWrapping="NoWrap" Foreground="{Binding Converter={StaticResource DynamicForegroundConverter}}" />-->
						<TextBlock Text="{Binding Description}" VerticalAlignment="Center" TextWrapping="NoWrap">
							<TextBlock.Foreground>
								<MultiBinding Converter="{StaticResource DynamicForegroundConverter2}">
									<Binding />
									<Binding Path="DummyValue" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type localView:BeWoView}}" />
								</MultiBinding>
							</TextBlock.Foreground>
						</TextBlock>
					</dxschint:HorizontalAppointmentContentPanel>
					<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
						<dxschint:HorizontalAppointmentEndClockControl ViewInfo="{Binding}" />
						<dxschint:AppointmentContinueEndDateControl ViewInfo="{Binding}" />
					</StackPanel>
				</Grid>
			</DataTemplate>
			<!-- Endregion-->
		
			<!--AppointmentToolTipContentTemplate FUNKTIONIERT-->
			<DataTemplate x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}">
				<StackPanel>
					<TextBlock Text="{Binding Path=Description}" />
				</StackPanel>
			</DataTemplate>

			<!--DragDropHoverTimeCellsStyle-->
			<Style TargetType="{x:Type dxschint:VisualDraggedAppointmentControl}" x:Key="{dxscht:SchedulerViewThemeKey ResourceKey=DragDropHoverTimeCellsStyle, IsThemeIndependent=true}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate>
							<Border Background="Black" CornerRadius="5" Opacity="0.25" Margin="1,0,1,0">
								<Border Background="Black" Margin="2" CornerRadius="4" />
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			
			<!-- Endregion -->
		</ResourceDictionary>
	</localView:BeWoView.Resources>
	<Grid x:Name="GridRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Bottom">
			<Button Style="{x:Null}" Margin="0,1,1,1" Height="24" Width="24" ToolTip="Tagesansicht" Click="ButtonDayView_Click">
				<Image Source="/BeWoPlaner;component/Ressources/Icons/Calendar1Day24.png" />
			</Button>
			<Button Style="{x:Null}" Margin="1" Height="24" Width="24" ToolTip="Arbeitswoche anzeigen"
			        Click="ButtonWorkWeekView_Click">
				<Image Source="/BeWoPlaner;component/Ressources/Icons/Calendar5Day24.png" />
			</Button>
			<Button Style="{x:Null}" Margin="1" Height="24" Width="24" ToolTip="Volle Woche anzeigen"
			        Click="ButtonWeekView_Click">
				<Image Source="/BeWoPlaner;component/Ressources/Icons/Calendar7Day24.png" />
			</Button>
			<Button Style="{x:Null}" Margin="1" Height="24" Width="24" ToolTip="Monat anzeigen" Click="ButtonMonthView_Click">
				<Image Source="/BeWoPlaner;component/Ressources/Icons/Calendar31Day24.png" />
			</Button>
			<Button Style="{x:Null}" Margin="1" Height="24" Width="24" ToolTip="Zeitleiste anzeigen"
			        Click="ButtonTimelineView_Click">
				<Image Source="/BeWoPlaner;component/Ressources/Icons/History24.png" />
			</Button>
		</StackPanel>
		<StackPanel x:Name="DayViewOptions" Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
			<Label>anz Tage:</Label>
			<dxe:SpinEdit x:Name="SpinEditDayViewDayCount" MaxValue="100" AllowNullInput="False" Width="50" IsFloatValue="False"
			              EditValueChanged="SpinEditDayViewDayCount_EditValueChanged" />
		</StackPanel>
		<StackPanel x:Name="TimelineViewOptions" Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
			<Label VerticalAlignment="Bottom">anz Tage:</Label>
			<dxe:SpinEdit MaxValue="100" VerticalAlignment="Bottom" x:Name="SpinEditTimelineViewDayCount" AllowNullInput="False"
			              Height="23" Width="50" IsFloatValue="False"
			              EditValueChanged="SpinEditTimelineViewDayCount_EditValueChanged" />
		</StackPanel>
		<DockPanel Grid.Column="2" Grid.Row="0">
			<Grid HorizontalAlignment="Stretch">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition Width="*" />
				</Grid.ColumnDefinitions>
				<Label Grid.Column="0" x:Name="FilterLabel" Content="Filter:" Margin="1" VerticalAlignment="Bottom" />
				<dxe:ComboBoxEdit Grid.Column="1" x:Name="Filter1BoxEdit" Height="23" Width="200" Margin="1"
				                  EditValueChanged="Filter1BoxEdit_EditValueChanged" VerticalAlignment="Bottom" />
				<dxe:ComboBoxEdit SelectedIndexChanged="Filter2BoxEdit_OnSelectedIndexChanged" Grid.Column="2"
				                  x:Name="Filter2BoxEdit" Height="23" Width="150" Margin="1"
				                  EditValueChanged="Filter2BoxEdit_EditValueChanged" VerticalAlignment="Bottom"
				                  IsTextEditable="False" />
				<controls:PopUpEdit Height="23" VerticalAlignment="Bottom" Width="150" Margin="1" Grid.Column="2"
				                    DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch"
				                    IsReadOnly="True" Name="PopupeditEmployee" PopUpClick="popupedit_employee_PopUpClick" />
				<Popup Margin="10" Grid.Column="2" Name="PopupEmployee" StaysOpen="False" Placement="MousePoint" Width="370" Height="300">
					<search:EmployeeSearchView ItemSelected="EmployeeSearchView_EmployeeSelected" x:Name="EmployeeSearchView" />
				</Popup>
				<controls:PopUpEdit Height="23" VerticalAlignment="Bottom" IsReadOnly="True" Margin="1" Grid.Column="2"
				                    DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch" Name="PopupeditCustomer"
				                    PopUpClick="popupedit_customer_PopUpClick" />
				<Popup Margin="10" Grid.Column="2" Name="PopupCustomer" StaysOpen="False" Placement="MousePoint" Width="370" Height="300">
					<search:CustomerSearchView ItemSelected="CustomerSearchView_CustomerSelected" x:Name="CustomerSearchView" />
				</Popup>
				<ListBox Margin="1" Height="43" Grid.Column="3" Name="ListBoxResources"
				         SelectionChanged="ListBoxResources_OnSelectionChanged" HorizontalAlignment="Stretch"
				         VerticalContentAlignment="Stretch" HorizontalContentAlignment="Left"
				         ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Visible"
				         BorderThickness="1,1,1,1" Width="Auto">
					<ListBox.ItemsPanel>
						<ItemsPanelTemplate>
							<StackPanel Orientation="Horizontal" />
						</ItemsPanelTemplate>
					</ListBox.ItemsPanel>
					<ListBox.ItemTemplate>
						<DataTemplate>
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="*" />
								</Grid.ColumnDefinitions>
								<Border CornerRadius="2" BorderBrush="Black" BorderThickness="1" Width="16" Height="16"
								        Background="{Binding Path=Color, Converter={StaticResource StringBrushConverter}}" />
								<Label Grid.Column="1" Content="{Binding Name}" />
							</Grid>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
				<CheckBox Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Grid.Column="3" Margin="1"
				          Name="NachKlientenGruppieren" Content="Nach Klienten Gruppieren" />
			</Grid>
		</DockPanel>
		<dxsch:SchedulerControl x:Name="Scheduler" dx:ThemeManager.ThemeName="Office2010Black" Grid.Row="1"
		                        Grid.ColumnSpan="3"
		                        Grid.Column="0" Foreground="Black" ActiveViewType="Timeline" VerticalAlignment="Stretch"
		                        GroupType="None"
		                        EditAppointmentFormShowing="scheduler_EditAppointmentFormShowing"
		                        EditRecurrentAppointmentFormShowing="SchedulerControl_EditRecurrentAppointmentFormShowing"
		                        PopupMenuShowing="scheduler_PopupMenuShowing"
		                        InitNewAppointment="scheduler_InitNewAppointment"
		                        AppointmentViewInfoCustomizing="scheduler_AppointmentViewInfoCustomizing"
								AllowAppointmentDrag="AllowAppointmentDragEvent" 
								AllowAppointmentResize="AllowAppointmentResizeEvent"
								AllowAppointmentCreate="AllowAppointmentCreateEvent"
								AllowAppointmentDragBetweenResources="AllowAppointmentDragBetweenResourcesEvent"
								AllowAppointmentDelete="AllowAppointmentDeleteEvent" 
								SelectionChanged="Scheduler_OnSelectionlChanged" VisibleIntervalChanged="Scheduler_OnVisibleIntervalChanged">
			<dxsch:SchedulerControl.DayView>
				<dxsch:DayView AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}" />
			</dxsch:SchedulerControl.DayView>
			<dxsch:SchedulerControl.WorkWeekView>
				<dxsch:WorkWeekView ShowFullWeek="True"
				                    AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}" />
			</dxsch:SchedulerControl.WorkWeekView>
			<dxsch:SchedulerControl.WeekView>
				<dxsch:WeekView AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}" />
			</dxsch:SchedulerControl.WeekView>
			<dxsch:SchedulerControl.MonthView>
				<dxsch:MonthView AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}" />
			</dxsch:SchedulerControl.MonthView>
			<dxsch:SchedulerControl.TimelineView>
				<dxsch:TimelineView VerticalResourceHeaderStyle="{StaticResource ResourceKey=VerticalEmployeeResourceHeaderStyle}"
				                    DateHeaderStyle="{StaticResource ResourceKey=DateHeaderStyle}"
				                    IntervalCount="31"
				                    AppointmentToolTipContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=AppointmentToolTipContentTemplate}}"
				                    HorizontalAppointmentContentTemplate="{StaticResource {dxscht:SchedulerViewThemeKey ResourceKey=HorizontalAppointmentLongerThanADayContentTemplate}}">
					<dxsch:TimelineView.Scales>
						<dxschcore:TimeScaleYear Enabled="False" Visible="False" DisplayFormat="111" />
						<dxschcore:TimeScaleQuarter Enabled="False" Visible="False" DisplayFormat="222" />
						<dxschcore:TimeScaleMonth DisplayFormat="333" />
						<dxschcore:TimeScaleWeek DisplayFormat="444" />
						<dxschcore:TimeScaleDay DisplayFormat="555" />
						<dxschcore:TimeScaleHour Enabled="False" Visible="False" DisplayFormat="666" />
					</dxsch:TimelineView.Scales>
				</dxsch:TimelineView>
			</dxsch:SchedulerControl.TimelineView>
			<dxsch:SchedulerControl.Storage>
				<dxsch:SchedulerStorage AppointmentsChanged="SchedulerStorage_AppointmentsChanged"
				                        FilterAppointment="SchedulerControl_FilterAppointments"
				                        AppointmentDeleting="SchedulerStorage_AppointmentDeleting"
				                        AppointmentsInserted="SchedulerStorage_AppointmentsInserted">
					<dxsch:SchedulerStorage.AppointmentStorage>
						<dxsch:AppointmentStorage>
							<dxsch:AppointmentStorage.Mappings>
								<dxsch:AppointmentMapping Start="Start"
								                          End="End"
								                          Subject="Subject"
								                          Description="Description"
								                          Label="LabelId"
								                          AllDay="AllDay"
								                          ResourceId="ResourceId"
								                          RecurrenceInfo="RecurrenceInfo"
								                          ReminderInfo="ReminderInfo"
								                          Location="Location"
								                          Type="EventType"
								                          Status="Status" />
							</dxsch:AppointmentStorage.Mappings>
						</dxsch:AppointmentStorage>
					</dxsch:SchedulerStorage.AppointmentStorage>
					<dxsch:SchedulerStorage.ResourceStorage>
						<dxsch:ResourceStorage>
							<dxsch:ResourceStorage.Mappings>
								<dxsch:ResourceMapping Caption="Caption" Id="Id" />
							</dxsch:ResourceStorage.Mappings>
						</dxsch:ResourceStorage>
					</dxsch:SchedulerStorage.ResourceStorage>
				</dxsch:SchedulerStorage>
			</dxsch:SchedulerControl.Storage>
		</dxsch:SchedulerControl>
	</Grid>
</localView:BeWoView>