Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<Window x:Class="IndiraLibrary.ApplicationWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
    xmlns:local="clr-namespace:IndiraLibrary"
    Title="Indira Library I-Card System" Height="487" Width="765" WindowState="Maximized" WindowStartupLocation="CenterScreen" Name="MainWindow">
    <Window.CommandBindings>
        <CommandBinding x:Name="NewStudentCommand" Executed="NewStudentCommand_Executed" Command="{x:Static local:ApplicationWindow.CtrlNCommand}"/>
        <CommandBinding x:Name="GenerateCommand" Executed="GenerateCommand_Executed" Command="{x:Static local:ApplicationWindow.CtrlGCommand}"/>
        <CommandBinding x:Name="UpdateCommand" Executed="UpdateCommand_Executed" Command="{x:Static local:ApplicationWindow.CtrlUCommand}"/>
        <CommandBinding x:Name="PrintCommand" Executed="PrintCommand_Executed" Command="{x:Static local:ApplicationWindow.CtrlPCommand}"/>
        <CommandBinding x:Name="ImportCommand" Executed="ImportCommand_Executed" Command="{x:Static local:ApplicationWindow.CtrlICommand}"/>
    </Window.CommandBindings>
    <Grid Name="WindowContent" Height="auto">
            <Grid.RowDefinitions>
                <RowDefinition Height="1" MinHeight="5"></RowDefinition>
                <RowDefinition Height="auto" ></RowDefinition>
                <RowDefinition Height="auto" MinHeight="200"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid Name="ApplicationMenu" VerticalAlignment="Top" Height="auto" Grid.Row="1" removed="Transparent">

                <r:Ribbon Name="Menu" Height="auto" >
                    <r:RibbonTab  Header="Students" Name="Students" FlowDirection="LeftToRight" Width="auto">
                        <r:RibbonGroup Name="New_Student" Header="New Student" Width="auto">
                            <r:RibbonButton Height="auto" Width="auto" KeyTip="n" Name="btnNewStudent" Label="New Student" LargeImageSource="/images/new.png" Click="btnNewStudent_Click" ToolTipDescription="Ctrl+N"  ></r:RibbonButton>
                            <r:RibbonButton Height="auto" Width="auto" Name="btnSave" Label="Save" Command="{Binding Path=StudentDetails.SaveStudentCommand}" LargeImageSource="/images/save.png"></r:RibbonButton>
                        </r:RibbonGroup>                    
                    <r:RibbonGroup Name="UpdateStudents" Header="Update Student Details"  Width="auto">
                            <r:RibbonButton Height="auto" Width="auto" Name="btnUpdateStudents"  Label="Update Students" LargeImageSource="/images/Update.jpg" Click="btnUpdateStudents_Click" ToolTipDescription="Ctrl+U" ></r:RibbonButton>
                        </r:RibbonGroup>
                    </r:RibbonTab>
                <r:RibbonTab  Header="Import Student Details" Name="Import_Student_Details" FlowDirection="LeftToRight" Width="auto">
                    <r:RibbonGroup Name="ImportDetails" Header="Import Student Details" Width="auto">
                        <r:RibbonButton Height="auto" Width="auto" Name="btnImport" LargeImageSource="/images/find.png" Label="Import" Click="btnImport_Click" ToolTipDescription="Ctrl+I" ></r:RibbonButton>
                    </r:RibbonGroup>
                </r:RibbonTab>
                <r:RibbonTab  Header="Print I-Cards" Name="Print_ICards" FlowDirection="LeftToRight" Width="auto">                    
                    <r:RibbonGroup Name="Generate_ICards"  Header="Generate Regular ICards" Width="auto">
                        <r:RibbonButton Height="auto" Width="auto" Name="btnGenerateIcards" LargeImageSource="/images/find.png" Label="Print Regular ICards" Click="btnGenerateIcards_Click" ToolTipDescription="Ctrl+G" ></r:RibbonButton>
                        <r:RibbonButton Height="auto" Width="auto" Name="btnPrint" LargeImageSource="/images/print.png" Label="Print" Click="btnPrint_Click" ToolTipDescription="Ctrl+P" ></r:RibbonButton>
                    </r:RibbonGroup>                   
                </r:RibbonTab>
            </r:Ribbon>
                
            </Grid>
            <Grid Name="ParentWindows" removed="#FFFFFF"  Height="565" Grid.Row="2" VerticalAlignment="Bottom" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible"  >
                <Border >
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#A7D7F6" Offset="0" />
                            <GradientStop Color="#FFFFFF" Offset="0.8" />
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <ScrollViewer VerticalScrollBarVisibility="Auto" CanContentScroll="True"  VerticalAlignment="Top" Height="auto" >


                    <Grid Name="ChildWindows" Height="auto" Width="auto" removed="Transparent" >

                    </Grid>
                </ScrollViewer>
            </Grid>
        </Grid>
</Window>
Posted

1 solution

Open the ribbon control in blend and play around with the template.
Start with this[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900