첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
다운로드

▶ MainWindow.xaml

<dxr:DXRibbonWindow x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxr="clr-namespace:DevExpress.Xpf.Ribbon;assembly=DevExpress.Xpf.Ribbon.v16.1"
    dxc:ThemeManager.ThemeName="Azure"
    Width="800"
    Height="600"
    Title="RibbonControl 클래스 : 윈도우 통합하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <dxb:BarManager Name="barManager">
        <dxb:BarManager.Items>
            <dxb:BarButtonItem Name="newItem"
                Glyph="pack://application:,,,/Images/new-16x16.png"
                LargeGlyph="pack://application:,,,/Images/new-32x32.png"
                Content="New" />
            <dxb:BarButtonItem Name="openItem"
                Glyph="pack://application:,,,/Images/open-16x16.png"
                LargeGlyph="pack://application:,,,/Images/open-32x32.png"
                Content="Open" />
            <dxb:BarButtonItem Name="closeItem"
                Glyph="pack://application:,,,/Images/close-16x16.png"
                LargeGlyph="pack://application:,,,/Images/close-32x32.png"
                Content="Close" />
            <dxb:BarButtonItem Name="printItem"
                Glyph="pack://application:,,,/Images\print-16x16.png"
                LargeGlyph="pack://application:,,,/Images/print-32x32.png"
                Content="Print" />
            <dxb:BarButtonItem Name="saveItem"
                Glyph="pack://application:,,,/Images/save-16x16.png"
                LargeGlyph="pack://application:,,,/Images/save-32x32.png"
                Content="Save" />
            <dxb:BarButtonItem Name="saveAsItem"
                Glyph="pack://application:,,,/Images/save-as-16x16.png"
                Content="Save As..." />
        </dxb:BarManager.Items>
        <DockPanel>
            <dxr:RibbonControl Name="ribbonControl" DockPanel.Dock="Top">
                <dxr:RibbonControl.ApplicationMenu>
                    <dxr:ApplicationMenu RightPaneWidth="200">
                        <dxr:ApplicationMenu.ItemLinks>
                            <dxb:BarItemLink BarItemName="newItem"  />
                            <dxb:BarItemLink BarItemName="openItem" />
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="saveItem"   />
                            <dxb:BarItemLink BarItemName="saveAsItem" />
                        </dxr:ApplicationMenu.ItemLinks>
                    </dxr:ApplicationMenu>
                </dxr:RibbonControl.ApplicationMenu>
                <dxr:RibbonControl.ToolbarItemLinks>
                    <dxb:BarItemLink BarItemName="openItem" />
                    <dxb:BarItemLink BarItemName="saveItem" />
                </dxr:RibbonControl.ToolbarItemLinks>
                <dxr:RibbonDefaultPageCategory>
                    <dxr:RibbonPage Caption="Home">
                        <dxr:RibbonPageGroup Name="fileGroup" Caption="File">
                            <dxb:BarItemLink BarItemName="openItem"  RibbonStyle="SmallWithText" />
                            <dxb:BarItemLink BarItemName="closeItem" RibbonStyle="SmallWithText" />
                            <dxb:BarItemLink BarItemName="printItem" RibbonStyle="SmallWithText" />
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="saveItem" RibbonStyle="Large" />
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                </dxr:RibbonDefaultPageCategory>
            </dxr:RibbonControl>
            <RichTextBox DockPanel.Dock="Bottom" />
        </DockPanel>
    </dxb:BarManager>
</dxr:DXRibbonWindow>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요