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

TestProject.zip
다운로드

▶ MainWindow.xaml

<Window 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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    Width="800"
    Height="600"
    Title="바 아이템을 위한 명령과 키 제스처 지정하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Grid>
        <dxb:BarManager x:Name="barManager">
            <dxb:BarManager.Items>                
                <dxb:BarButtonItem x:Name="cutBarButtonItem"
                    Command="ApplicationCommands.Cut"
                    CommandTarget="{Binding ElementName=textEdit1}"
                    KeyGesture="CTRL+1"
                    Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" />
            </dxb:BarManager.Items>
            <dxb:BarManager.Bars>
                <dxb:Bar Caption="Main">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerType="Top" />
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="cutBarButtonItem" />
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
            </dxb:BarManager.Bars>
            <DockPanel x:Name="dockPanel" LastChildFill="False">
                <dxb:BarContainerControl x:Name="topBarContainerControl"
                    DockPanel.Dock="Top"
                    ContainerType="Top" />
                <dxe:TextEdit x:Name="textEdit1" DockPanel.Dock="Top"
                    Margin="10"
                    Width="300"
                    FontSize="16"
                    EditValue="Sample text" />
                <dxe:TextEdit x:Name="textEdit2" DockPanel.Dock="Top"
                    Margin="10"
                    Width="300"
                    FontSize="16"
                    EditValue="Sample text" />
            </DockPanel>
        </dxb:BarManager>
    </Grid>
</Window>

 

728x90

 

▶ MainWindow.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 메인 윈도우
    /// </summary>
    public partial class MainWindow : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// 생성자
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainWindow()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요