Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/CS/BarsDemo.Wpf/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/CS/BarsDemo.Wpf/Modules/Commands.xaml

<local:BarsDemoModule x:Class="BarsDemo.Commands"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:local="clr-namespace:BarsDemo"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
    xmlns:coll="clr-namespace:System.Collections;assembly=mscorlib"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    Height="300" Width="300">

    <dxdb:DemoModuleControl>
        <dxb:BarManager x:Name="barManager1" CreateStandardLayout="False" >
            <dxb:BarManager.Items>
                <dxb:BarButtonItem Name="bCut" Command="Cut" CommandTarget="{Binding ElementName=textBox}" Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/cut-16x16.png"/>
                <dxb:BarButtonItem Name="bCopy" Command="Copy" CommandTarget="{Binding ElementName=textBox}" Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/copy-16x16.png"/>
                <dxb:BarButtonItem Name="bPaste" Command="Paste" CommandTarget="{Binding ElementName=textBox}" Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/paste-16x16.png"/>
                <dxb:BarButtonItem Name="bSelectAll" Command="SelectAll" CommandTarget="{Binding ElementName=textBox}"  Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/SelectAll_16x16.png" BarItemDisplayMode="ContentAndGlyph"/>
                <dxb:BarButtonItem Name="bUndo" Command="Undo" CommandTarget="{Binding ElementName=textBox}"  Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/undo-16x16.png"/>
                <dxb:BarButtonItem Name="bRedo" Command="Redo" CommandTarget="{Binding ElementName=textBox}" Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" Glyph="/BarsDemo;component/Images/Icons/redo-16x16.png"/>

                <dxb:BarButtonItem Name="bMaximize" Command="{x:Static Slider.MaximizeValue}" CommandTarget="{Binding ElementName=slider}" Content="Maximize"/>
                <dxb:BarButtonItem Name="bMinimize" Command="{x:Static Slider.MinimizeValue}" CommandTarget="{Binding ElementName=slider}" Content="Minimize"/>
                <dxb:BarButtonItem Name="bIncreaseSmall" Command="{x:Static Slider.IncreaseSmall}" CommandTarget="{Binding ElementName=slider}" Content="Increase Small"/>
                <dxb:BarButtonItem Name="bDecreaseSmall" Command="{x:Static Slider.DecreaseSmall}" CommandTarget="{Binding ElementName=slider}" Content="Decrease Small"/>
                <dxb:BarButtonItem Name="bIncreaseLarge" Command="{x:Static Slider.IncreaseLarge}" CommandTarget="{Binding ElementName=slider}" Content="Increase Large"/>
                <dxb:BarButtonItem Name="bDecreaseLarge" Command="{x:Static Slider.DecreaseLarge}" CommandTarget="{Binding ElementName=slider}" Content="Decrease Large"/>
            </dxb:BarManager.Items>
            <dxb:BarManager.Bars>
                <dxb:Bar x:Name="bar1" GlyphSize="Small" UseWholeRow="True" Caption="Text Box Commands">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerName="TextBoxContainer"/>
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="bCut"/>
                        <dxb:BarButtonItemLink BarItemName="bCopy"/>
                        <dxb:BarButtonItemLink BarItemName="bPaste"/>
                        <dxb:BarItemLinkSeparator/>
                        <dxb:BarButtonItemLink BarItemName="bUndo"/>
                        <dxb:BarButtonItemLink BarItemName="bRedo"/>
                        <dxb:BarItemLinkSeparator/>
                        <dxb:BarButtonItemLink BarItemName="bSelectAll"/>
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
                <dxb:Bar x:Name="bar2" GlyphSize="Small" UseWholeRow="True" Caption="Slider Commands">
                    <dxb:Bar.DockInfo>
                        <dxb:BarDockInfo ContainerName="SliderContainer"/>
                    </dxb:Bar.DockInfo>
                    <dxb:Bar.ItemLinks>
                        <dxb:BarButtonItemLink BarItemName="bMinimize"/>
                        <dxb:BarButtonItemLink BarItemName="bDecreaseLarge"/>
                        <dxb:BarButtonItemLink BarItemName="bDecreaseSmall"/>
                        <dxb:BarButtonItemLink BarItemName="bIncreaseSmall"/>
                        <dxb:BarButtonItemLink BarItemName="bIncreaseLarge"/>
                        <dxb:BarButtonItemLink BarItemName="bMaximize"/>
                    </dxb:Bar.ItemLinks>
                </dxb:Bar>
            </dxb:BarManager.Bars>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <dxb:BarContainerControl Name="TextBoxContainer" Grid.Row="0"/>
                <dxe:TextEdit Name="textBox" Grid.Row="1" Width="300" Margin="8"
                          HorizontalAlignment="Left" VerticalAlignment="Top"
                          EditValue="Use bar items to manipulate its text."/>
                <dxb:BarContainerControl Name="SliderContainer" Grid.Row="2"/>
                <Slider Name="slider" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top"
                    Width="300" Margin="4" Minimum="0" Maximum="100" SmallChange="1" LargeChange="10" Value="50" />
            </Grid>
        </dxb:BarManager>
    </dxdb:DemoModuleControl>
</local:BarsDemoModule>