<RibbonWindow
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:y="clr-namespace:TextEditor"
        xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" 
        xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="TextEditor.MainWindow"
        Title="Texteditor" Height="350" Width="705" Icon="AppSymbol.ico">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>

        <Ribbon Name="Ribbon" Title="Menueband">
            <Ribbon.QuickAccessToolBar>
                <RibbonQuickAccessToolBar>
                    <RibbonButton Name="btnSave" ToolTip="Dokument speichern" KeyTip="1"
                                  SmallImageSource="Images\small\doc-save.ico"/>
                </RibbonQuickAccessToolBar>
            </Ribbon.QuickAccessToolBar>

            <Ribbon.ApplicationMenu>
                <RibbonApplicationMenu SmallImageSource="Images\small\filemanager.ico" KeyTip="D">
                    <RibbonApplicationMenuItem Header="_Neu" ImageSource="Images\large\doc-new.ico"
                                               Name="miFileNew" ToolTip="Neues Dokument" />
                    <RibbonApplicationMenuItem Header="Ö_ffnen" ImageSource="Images\large\doc-open.ico"
                                               Name="miFileOpen" ToolTip="Dokument öffnen" />
                    <RibbonApplicationMenuItem Header="_Speichern" ImageSource="Images\large\doc-save.ico"
                                               Name="miFileSave" ToolTip="Dokument speichern" />
                    <RibbonApplicationMenuItem Header="Speichern _unter" ImageSource="Images\large\doc-save-as.ico"
                                               Name="miFileSaveAs" ToolTip="Dokument speichern unter" />
                    <RibbonSeparator />
                    <RibbonApplicationMenuItem Header="_Drucken" ImageSource="Images\large\doc-print.ico"
                                               Name="miFilePrint" ToolTip="Dokument drucken"
                                               KeyTip="D" />
                    <RibbonApplicationMenu.FooterPaneContent>
                        <DockPanel LastChildFill="False">
                            <RibbonButton Label="Beenden" SmallImageSource="Images\small\app-exit.ico"
                                          Name="miFileQuit" ToolTipTitle="Beenden" 
                                          KeyTip="B"
                                          DockPanel.Dock="Right" Margin="2" BorderBrush="#B8114EAF" />
                        </DockPanel>
                    </RibbonApplicationMenu.FooterPaneContent>
                </RibbonApplicationMenu>
            </Ribbon.ApplicationMenu>

            <RibbonTab Name="StartTab" Header="Start" KeyTip="S"
                       GroupSizeReductionOrder="searchGroup, clipboardGroup, fontGroup">

                <RibbonGroup Name="clipboardGroup"
                             Header="Zwischenablage">
                    <RibbonButton Name="btnPaste" ToolTip="Einfügen"                                  
                                  LargeImageSource="Images\large\edit-paste.ico"
                                  Label="Einfügen" 
                                  KeyTip="E" />
                    <RibbonButton Name="btnCut" ToolTip="Ausschneiden"
                                  LargeImageSource="Images\large\edit-cut.ico"
                                  SmallImageSource="Images\small\edit-cut.ico"
                                  Label="Ausschneiden" 
                                  KeyTip="A" />
                    <RibbonButton Name="btnCopy" ToolTip="Kopieren"
                                  LargeImageSource="Images\large\edit-copy.ico"
                                  SmallImageSource="Images\small\edit-copy.ico"
                                  Label="Kopieren" 
                                  KeyTip="K" />

                    <RibbonGroup.GroupSizeDefinitions>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            <RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            <RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="False" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="False" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="False" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition IsCollapsed="True" />
                    </RibbonGroup.GroupSizeDefinitions>

                </RibbonGroup>


                <RibbonGroup Name="fontGroup" Header="Schrift">
                    <RibbonComboBox Label="Schriftart" SelectionBoxWidth="120" 
                                    KeyTip="F" ToolTip="Verwendete Schriftart" >
                        <RibbonGallery Name="cbFonts" MaxColumnCount="1"
                                       SelectionChanged="cbFonts_SelectionChanged">
                            <RibbonGalleryCategory Name="fontsMenu" />
                        </RibbonGallery>
                    </RibbonComboBox>

                    <RibbonGroup.GroupSizeDefinitions>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Collapsed" IsLabelVisible="True" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Collapsed" IsLabelVisible="False" />
                            <RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="False" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition IsCollapsed="True" />
                    </RibbonGroup.GroupSizeDefinitions>

                </RibbonGroup>


                <RibbonGroup Name="searchGroup" Header="Suchen">
                    <RibbonTextBox Name="tbSearch" Label="Suchen nach:" TextBoxWidth="150" 
                                   KeyTip="SU" ToolTip="Zu suchender Text" >
                    </RibbonTextBox>
                    <RibbonButton Name="btnSearch" Label="Weitersuchen" SmallImageSource="Images\small\search.ico"
                                  KeyTip="SU" Click="btnSearch_Click_1"/>
                        
                    <RibbonGroup.GroupSizeDefinitions>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Collapsed" IsLabelVisible="True" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition>
                            <RibbonControlSizeDefinition ImageSize="Collapsed" IsLabelVisible="False" />
                        </RibbonGroupSizeDefinition>
                        <RibbonGroupSizeDefinition IsCollapsed="True" />
                    </RibbonGroup.GroupSizeDefinitions>

                </RibbonGroup>

            </RibbonTab>
        </Ribbon>

        <RichTextBox Name="richTextBox" Grid.Row="1"
			     AllowDrop="True" AcceptsTab="True" AcceptsReturn="True"                 
			     PreviewDrop="richTextBox_PreviewDrop" PreviewDragOver="richTextBox_PreviewDragOver" 
                 VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" TextChanged="richTextBox_TextChanged" >

            <RichTextBox.ContextMenu>
                <ContextMenu>
                    <MenuItem Name="cmiEditCut" Header="Au_sschneiden"  />
                    <MenuItem Name="cmiEditCopy" Header="_Kopieren"  />
                    <MenuItem Name="cmiEditPaste" Header="_Einfügen" />
                </ContextMenu>
            </RichTextBox.ContextMenu>

            <FlowDocument>
                <Paragraph>Hier den Text eingeben</Paragraph>
            </FlowDocument>
        </RichTextBox>

        <StatusBar Grid.Row="2" Height="23" Name="statusBar1" DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
            <StatusBarItem Name="sbInfo"/>
        </StatusBar>

    </Grid>
</RibbonWindow>
