zoukankan      html  css  js  c++  java
  • WPF Demo13 GridSplitter

    <Window x:Class="Commands.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525" ResizeMode="CanResize" ShowInTaskbar="True">
        <Window.CommandBindings>
            <CommandBinding Command="Save" Executed="Save_Executed" CanExecute="Save_CanExecute"/>
            <CommandBinding Command="Close" Executed="Close_Executed" CanExecute="Close_CanExecute"/>
        </Window.CommandBindings>
        
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="2*"/>
            </Grid.ColumnDefinitions>
    
            <!--Background="#00000000" 透明色设置-->
            <Menu Grid.Row="0" Grid.ColumnSpan="3">
               
                <MenuItem Header="保存" Command="Save"/>
                <MenuItem Header="关闭" Command="Close"/>
            </Menu>
            
            <ToolBar Grid.Row="1" Grid.ColumnSpan="3">
                <Button>
                    <Image Source="image/Copy.png"/>
                </Button>
                <Button>
                    <Image Source="image/Paste.png"/>
                </Button>
                <Button>
                    <Image Source="image/Cut.png"/>
                </Button>
                <Button>
                    <Image Source="image/Delete.png"/>
                </Button>
            </ToolBar>
            <TextBox Grid.Row="2"   Name="txtLeft" TextChanged="txtLeft_TextChanged">
                <TextBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="复制" >
                            <MenuItem.Icon>
                                <Image Source="/Commands;component/image/Copy.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="粘贴">
                            <MenuItem.Icon>
                                <Image Source="/Commands;component/image/Paste.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="剪贴">
                            <MenuItem.Icon>
                                <Image Source="/Commands;component/image/Cut.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="删除">
                            <MenuItem.Icon>
                                <Image Source="/Commands;component/image/Delete.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                    </ContextMenu>
                </TextBox.ContextMenu>
            </TextBox>
            <GridSplitter Grid.Row="2"   Grid.Column="1" Width="5" Background="GhostWhite" HorizontalAlignment="Stretch" />
            <TextBlock Grid.Column="2" Grid.Row="2"  Name="txtRight" />
            <StatusBar Grid.Row="3"  Name="statusBar1"  Grid.ColumnSpan="3" >
                <StatusBarItem Content="当前状态为:" />
                <Label Content="default"/>
            </StatusBar>
        </Grid>
    </Window>

  • 相关阅读:
    myeclipse中代码不显示SVN版本号
    java HttpURLConnection 登录网站 完整代码
    新浪微博自动(模拟)登陆详解及实现
    java模拟Cookies登陆
    paper 53 :深度学习(转载)
    paper 52 :windows7环境下theano安装
    paper 51:图像复原
    paper 50 :人脸识别简史与近期进展
    paper 49:论文退稿?审稿人帮你总结了22个能避免的常见问题
    paper 48: Latex中如何制作参考文献
  • 原文地址:https://www.cnblogs.com/YYkun/p/6872022.html
Copyright © 2011-2022 走看看