none
WPF Ribbon + MDI RRS feed

  • Frage

  • Ist es möglich eine WPF-Ribbon-Application mit einem MDI zu erstellen? Ich habe nun Folgenden XAML-Code:
      
    <ribbon:RibbonWindow x:Class="Project.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
            Title="MainWindow"
    		x:Name="RibbonWindow"
    		Width="640" Height="480">
    
    	<Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
    
            <ribbon:Ribbon x:Name="Ribbon">
                <ribbon:Ribbon.ApplicationMenu>
                    <ribbon:RibbonApplicationMenu SmallImageSource="Images\SmallIcon.png">
                        <ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"
                                                          x:Name="MenuItem1"
                                                          ImageSource="Images\LargeIcon.png"/>
                    </ribbon:RibbonApplicationMenu>
                </ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonTab x:Name="NewTab" 
                                  Header="Neuer Tab">
                    <ribbon:RibbonGroup x:Name="NewGroup" 
                                        Header="Neue Gruppe">
                        <ribbon:RibbonButton x:Name="NewButton"
                                             LargeImageSource="Images\LargeIcon.png"
                    </ribbon:RibbonGroup>
                    
                </ribbon:RibbonTab>
            </ribbon:Ribbon>
            
            <Button Content="Button" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="105,96,0,0" Name="button1" VerticalAlignment="Top" Width="75" />
        
        </Grid>
    </ribbon:RibbonWindow>
    
    
    Wie muss ich den Code bearbeiten um MDI Fenster einzubauen? Ich verstehe es zwar bei einem Normalen Menü, aber nicht bei Ribbons.
    Koopakiller - http://koopakiller.ko.ohost.de/
    Sonntag, 18. Dezember 2011 20:06

Antworten

Alle Antworten