<UserControl x:Class="BeWo.MainControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:localView="clr-namespace:BeWo.View" 
             xmlns:r="clr-namespace:BeWo.Security"
             xmlns:BeWo="clr-namespace:BeWo"
             Background="{DynamicResource ApplicationBackground}"
             SnapsToDevicePixels="True" 
             RenderTransformOrigin="0.5,0.5"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Storyboard x:Key="OnLoadedStoryboard" Completed="OnLoadedStoryboard_Completed">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="toolbarRoot"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-5" KeySpline="0,1,1,1" />
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0.35,0.5,0.5,0.9" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" KeySpline="0,1,1,1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.RenderTransform>
        <TransformGroup>
            <ScaleTransform ScaleX="1" ScaleY="1" />
            <SkewTransform AngleX="0" AngleY="0" />
            <RotateTransform Angle="0" />
            <TranslateTransform X="0" Y="0" />
        </TransformGroup>
    </UserControl.RenderTransform>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource OnLoadedStoryboard}" x:Name="OnLoaded1_BeginStoryboard" />
        </EventTrigger>
    </UserControl.Triggers>
    <Grid x:Name="grid_main" Width="Auto" Height="Auto" Margin="0,0,0,0" HorizontalAlignment="Stretch"
            Grid.IsSharedSizeScope="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="150" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <!--<Frame x:Name="chatFrame" Grid.Column="2" Grid.Row="0" />-->
        <TextBlock HorizontalAlignment="Center" Width="Auto" Margin="5,2,0,0">
            <Hyperlink NavigateUri="http://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" RequestNavigate="Hyperlink_OnRequestNavigate">
                <InlineUIContainer>
                    <Image HorizontalAlignment="Left" Source="Ressources\Icons\bewoplaner_logo_small.png"
                            Style="{StaticResource toolbarImageStyle}" RenderTransformOrigin="0.5,0.5" x:Name="image">
                        <Image.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1" />
                                <SkewTransform AngleX="0" AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="-200" Y="0" />
                            </TransformGroup>
                        </Image.RenderTransform>
                    </Image>
                </InlineUIContainer>
            </Hyperlink>
        </TextBlock>
        <BeWo:BSLogoControl Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="2" Width="1000" Height="1000"
                VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,-300,-250" x:Name="bSLogoControl"
                RenderTransformOrigin="0.5,0.5">
            <BeWo:BSLogoControl.OpacityMask>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#29000000" Offset="0" />
                    <GradientStop Color="#29000000" Offset="1" />
                </LinearGradientBrush>
            </BeWo:BSLogoControl.OpacityMask>
        </BeWo:BSLogoControl>
        <Grid x:Name="DetailFrame" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="2"
                RenderTransformOrigin="0.5,0.5" Margin="140,35,140,85">
            <Grid.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1" />
                    <SkewTransform AngleX="0" AngleY="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform X="0" Y="0" />
                </TransformGroup>
            </Grid.RenderTransform>
            <Grid.OpacityMask>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF000000" Offset="0" />
                    <GradientStop Color="#D8FFFFFF" Offset="1" />
                </LinearGradientBrush>
            </Grid.OpacityMask>
            <!-- Border x:Name="detailPlaceHolder" Background="#FFB55252" CornerRadius="5,5,5,5"></Border-->
        </Grid>
        <Grid x:Name="toolbarRoot" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch"
                VerticalAlignment="Bottom" Width="Auto" RenderTransformOrigin="0.5,0.5" MouseEnter="toolbarRoot_MouseEnter"
                MouseLeave="toolbarRoot_MouseLeave">
            <Grid.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1" />
                    <SkewTransform AngleX="0" AngleY="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform X="0" Y="100" />
                </TransformGroup>
            </Grid.RenderTransform>
            <Border Name="toolbarBord" Height="80" RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="0" Y="20" />
                    </TransformGroup>
                </Border.RenderTransform>
                <Viewbox Stretch="Fill">
                    <Canvas Width="100" Height="100">
                        <Path Data="M0,100 L5,0 L95,0 L100,100 Z" StrokeThickness="1">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#66000000" Offset="0" />
                                    <GradientStop Color="#CC080808" Offset="1" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Rectangle Width="100" Height="132" Fill="#FF98C1FF" Canvas.Top="8">
                            <Rectangle.OpacityMask>
                                <RadialGradientBrush>
                                    <GradientStop Color="#3FFFFFFF" Offset="0.29" />
                                    <GradientStop Color="#00FFFFFF" Offset="0.875" />
                                </RadialGradientBrush>
                            </Rectangle.OpacityMask>
                        </Rectangle>
                    </Canvas>
                </Viewbox>
            </Border>
			<Grid x:Name="toolbarContent" RenderTransformOrigin="0.5,0.5" MouseEnter="UIElement_OnMouseEnter" Loaded="ToolbarContent_OnLoaded">
                <Grid.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="0" Y="0" />
                    </TransformGroup>
                </Grid.RenderTransform>
                <StackPanel x:Name="HomeButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left"
                        VerticalAlignment="Top" Margin="10,0,0,0">
                    <Button Margin="0,9,0,0" Name="btn_home" Click="btn_home_Click" Width="40" Height="40">
                        <Image Source="Ressources\Icons\Home.png" Stretch="Fill" StretchDirection="Both"></Image>
                    </Button>
                    <Label Content="Home" FontSize="12" Foreground="#FFDBDBDB"></Label>
                </StackPanel>
                <!--<StackPanel x:Name="HomeButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,0,0,0" >
	            <Button Margin="0,10,0,0"  Click="button_Home" Width="40" Height="40">
	                <Image Source="Ressources\Icons\HomeDisabled.png" Stretch="Fill"  StretchDirection="Both"></Image>
	            </Button>
	            <Label Content="Startseite" FontSize="12" Foreground="#FFDBDBDB"></Label>
	        </StackPanel>
			<StackPanel x:Name="LogoutButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="90,0,0,0" >
	            <Button Margin="0,10,0,0"  Click="button_Logout" Width="40" Height="40">
	                <Image Source="Ressources\Icons\LogoutDisabled.png" Stretch="Fill"  StretchDirection="Both"></Image>
	            </Button>
	            <Label Content="Abmelden" FontSize="12" Foreground="#FFDBDBDB"></Label>
	        </StackPanel>-->
                <ScrollViewer x:Name="toolbarScrollViewer" ScrollChanged="toolbarScrollViewer_ScrollChanged"
                        HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
                        HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="80,0,80,0" Height="80">
                    <ScrollViewer.Template>
                        <ControlTemplate TargetType="{x:Type ScrollViewer}">
                            <Grid Margin="3 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="17" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="17" />
                                </Grid.ColumnDefinitions>
                                <Button Content="3" FontFamily="Webdings" Command="ScrollBar.PageLeftCommand"
                                        Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
                                <ScrollContentPresenter VerticalAlignment="Bottom" Margin="20 0" Grid.Column="1"
                                        Content="{TemplateBinding Content}" />
                                <Button Content="4" FontFamily="Webdings" Grid.Column="2"
                                        Command="ScrollBar.PageRightCommand"
                                        Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
                            </Grid>
                        </ControlTemplate>
                    </ScrollViewer.Template>
                    <Grid Margin="0,0,0,0" VerticalAlignment="Stretch" Height="80">
                        <StackPanel x:Name="toolbarMainButtonPanel" VerticalAlignment="Center" HorizontalAlignment="Center"
                                Width="Auto" Margin="0,0,0,0" Orientation="Horizontal">
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, ServiceRecordView_View"
                                    ImageSource="Ressources\Icons\HistoryDisabled.png" x:Name="button_serviceRecord"
                                    Click="button_serviceRecord_Click" Style="{StaticResource NavBarButton}"
                                    Content="Zeiterfassung" Background="{StaticResource ServiceRecordContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    Tag="" Width="90" Height="Auto">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="AdditionalService_View"
                                    ImageSource="Ressources\Icons\HistoryDisabled.png" x:Name="button_additionalService"
                                    Click="button_additionalService_Click" Style="{StaticResource NavBarButton}"
                                    Content="Ergänzende Dienste" Background="{StaticResource AdditionalServiceContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    Tag="" Width="120" Height="Auto">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                           <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AccountingTransactionView_View"
                                    ImageSource="Ressources\Icons\CoinsDisabled.png" x:Name="button_AccountingTransacation"
                                    Click="button_AccountingTransacation_Click" Style="{StaticResource NavBarButton}"
                                    Content="Finanzen" Background="{StaticResource AccountingContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>

	                        <Grid>
		                        <localView:ImageButton r:DemandUserRight.VisibleDemands="KalenderAnsehen"
										ImageSource="Ressources\Icons\CalendarDisabled.png" x:Name="button_Scheduler"
										Click="button_Scheduler_Click" Style="{StaticResource NavBarButton}"
										Content="Kalender" Background="{StaticResource ResourceContentBrush}"
										RenderTransformOrigin="0.5,0.5"
										Width="90">
			                        <Button.RenderTransform>
				                        <TransformGroup>
					                        <ScaleTransform ScaleX="1" ScaleY="1" />
					                        <SkewTransform AngleX="0" AngleY="0" />
					                        <RotateTransform Angle="0" />
					                        <TranslateTransform X="0" Y="0" />
				                        </TransformGroup>
			                        </Button.RenderTransform>
		                        </localView:ImageButton>
								<BeWo:OutlinedTextBlock Visibility="Collapsed" x:Name="NewAppointmentsOutlinedTextBlock" Margin="25,0,0,0" FontFamily="Verdana" FontSize="25" FontWeight="ExtraBold" TextWrapping="Wrap" StrokeThickness="1" Stroke="White" Fill="OrangeRed" SnapsToDevicePixels="True" Text="!" HorizontalAlignment="Left" VerticalAlignment="Top">
									<BeWo:OutlinedTextBlock.Triggers>
										<EventTrigger RoutedEvent="BeWo:OutlinedTextBlock.Loaded">
											<BeginStoryboard>
												<Storyboard>
													<DoubleAnimation Storyboard.TargetName="NewAppointmentsOutlinedTextBlock" 
																	 Storyboard.TargetProperty="(BeWo:OutlinedTextBlock.FontSize)"
																	 To="30.0" Duration="0:0:0.3" 
																	 AutoReverse="True" RepeatBehavior="Forever" />
												</Storyboard>
											</BeginStoryboard>
										</EventTrigger>
									</BeWo:OutlinedTextBlock.Triggers>
								</BeWo:OutlinedTextBlock>
							</Grid>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, ResourceBookingView_View"
                                    ImageSource="Ressources\Icons\CalendarDisabled.png" x:Name="button_ResourceBooking"
                                    Click="button_ResourceBooking_Click" Style="{StaticResource NavBarButton}"
                                    Content="Ressourcen" Background="{StaticResource ResourceContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, QueryView_View"
                                    x:Name="button_Reports" Click="button_Reports_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Auswertungen"
                                    Background="{StaticResource ReportContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\ChartBarDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, SupportConceptView_View, SupportConcept_ViewAllSupportConcepts"
                                    x:Name="button_SupportConcept" Click="button_SupportConcept_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Hilfepläne"
                                    Background="{StaticResource SupportConceptContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\IDBadgeDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, CustomerView_View, Customer_ViewMyCustomers"
                                    x:Name="button_Customer" Click="button_Customer_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Klienten"
                                    Background="{StaticResource CustomerContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\UserHomeMaleDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, WohnheimView_View"
                                    x:Name="button_Wohnheim" Click="button_Wohnheim_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Wohnheime"
                                    Background="{StaticResource WohnheimContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\OfficeBulidingBlackDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                          
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, OrganisationView_View"
                                    x:Name="button_Organisation" Click="button_Organisation_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Organisationen"
                                    Background="{StaticResource OrganisationContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\OfficeBulidingBlackDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, PersonView_View"
                                    x:Name="button_Person" Click="button_Person_Click" Style="{StaticResource NavBarButton}"
                                    Content="Personen" Background="{StaticResource PersonContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\AnonymousUserDisabled.png"
                                    Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, EmployeeView_View"
                                    x:Name="button_Employee" Click="button_Employee_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Mitarbeiter"
                                    Background="{StaticResource EmployeeContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\UserBusinessMaleDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, TeamView_ViewAll, TeamView_ViewMyTeams"
                                    x:Name="button_Team" Click="button_Team_Click" Style="{StaticResource NavBarButton}"
                                    Content="Teams" Background="{StaticResource TeamContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\UserGroupBusinessDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, UserView_View"
                                    x:Name="button_User" Click="button_User_Click" Style="{StaticResource NavBarButton}"
                                    Content="Benutzer" Background="{StaticResource UserContentBrush}"
                                    RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\UserBusinessMaleDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, UserGroupView_View"
                                    x:Name="button_UserGroup" Click="button_UserGroup_Click"
                                    Style="{StaticResource NavBarButton}"
                                    Content="Benutzergruppen"
                                    Background="{StaticResource UserGroupContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\UserGroupBusinessDisabled.png" Width="Auto">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <!--<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AdministrationView_View"
                                    x:Name="button_Template" Click="button_Template_Click"
                                    HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
                                    Content="Vorlagen"
                                    Background="#FF0045e0" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\MenuDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>-->
							
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AdministrationView_View"
                                    x:Name="button_Administration" Click="button_Administration_Click"
                                    HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
                                    Content="Verwaltung"
                                    Background="{StaticResource AdministrationContentBrush}" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\ConfigurationDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                            <localView:ImageButton r:DemandUserRight.VisibleDemands="Support_View"
                                    x:Name="button_Support" Click="button_Support_Click"
                                    HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
                                    Content="Support"
                                    Background="#FFD4FFCF" RenderTransformOrigin="0.5,0.5"
                                    ImageSource="Ressources\Icons\TechSupportWhiteDisabled.png" Width="90">
                                <Button.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Button.RenderTransform>
                            </localView:ImageButton>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
                <StackPanel x:Name="LogoutButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Right"
                        VerticalAlignment="Top" Margin="0,0,0,0">
                    <Button Margin="0,9,0,0" Click="button_Logout" Width="40" Height="40">
                        <Image Source="Ressources\Icons\LogoutDisabled.png" Stretch="Fill" StretchDirection="Both"></Image>
                    </Button>
                    <Label Content="Abmelden" FontSize="12" Foreground="#FFDBDBDB"></Label>
                </StackPanel>
                <!--<Rectangle Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="1"  RenderTransformOrigin="0.5,0.5" Height="55" Width="1175" StrokeThickness="0" VerticalAlignment="Top">
                <Rectangle.OpacityMask>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#0C000000" Offset="0"/>
                        <GradientStop Color="#4CFFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.OpacityMask>
                <Rectangle.RenderTransform>
                	<TransformGroup>
                		<ScaleTransform ScaleX="1" ScaleY="-1"/>
                		<SkewTransform AngleX="0" AngleY="0"/>
                		<RotateTransform Angle="0"/>
                		<TranslateTransform X="-3" Y="49"/>
                	</TransformGroup>
                </Rectangle.RenderTransform>
                <Rectangle.Fill>
                    <VisualBrush Visual="{Binding ElementName=toolbar}"/>
                </Rectangle.Fill>
            </Rectangle>-->
            </Grid>
        </Grid>
        <!--<GroupBox Visibility="Hidden" Header="Home" Grid.Column="1" Grid.Row="1" Grid.RowSpan="1" Margin="10,0,10,10" Style="{DynamicResource MainContentGroupBoxStyle}" >
            <Border>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFFFFFFF" Offset="0"/>
                        <GradientStop Color="#FFFFF2CF" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>
        </GroupBox>-->
    </Grid>
</UserControl>
