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>

WPF Demo13 GridSplitter的更多相关文章
- 【C#/WPF】GridSplitter 分割布局,拖拽控件分隔栏以改变控件尺寸
需求:界面由多部分控件组成,想要拖拽控件之间的分隔栏以改变尺寸. MainWindow.xaml: <Grid> <Grid.ColumnDefinitions> <Co ...
- WPF Demo13通知项属性+数据绑定(代码层)
<Window x:Class="BindingDemo1.MainWindow" xmlns="http://schemas.microsoft.com/winf ...
- [WPF] 使用Grid与GridSplitter排版布局
原文:[WPF] 使用Grid与GridSplitter排版布局 前言 在開發應用程式時,一個很重要的工作項目就是設計使用者介面的排版布局.WPF中所提供的Grid控制項,讓開發人員擁有將版面分割為欄 ...
- 【C#/WPF】限制GridSplitter分隔栏的滑动范围
GridSplitter可以自由滑动,例如一个水平方向的分隔栏,可以从屏幕顶端滑到屏幕底端. 现在的需求是:限制GridSplitter在一定范围内滑动. 例如,现在有如下的横竖两个GridSplit ...
- WPF GridSplitter最好设置HorizontalAlignment和VerticalAlignment,否则不可以左右移动
<Window x:Class="XamlTest.Window5" xmlns="http://schemas.microsoft.com/winf ...
- wpf GridSplitter左右托不了或者拖拽异常
对于水平分割线,需要将verticalAlignment属性设置为Center 对于垂直分割线,需要将horizontalAlignment属性设置为center 切记切记,不然很苦逼....
- WPF基础到企业应用系列6——布局全接触
本文转自:http://knightswarrior.blog.51cto.com/1792698/365351 一. 摘要 首先很高兴这个系列能得到大家的关注和支持,这段时间一直在研究Windows ...
- 【源码分享】WPF漂亮界面框架实现原理分析及源码分享
1 源码下载 2 OSGi.NET插件应用架构概述 3 漂亮界面框架原理概述 4 漂亮界面框架实现 4.1 主程序 4.2 主程序与插件的通讯 4.2.1 主程序获取插件注册的服务 4.2 ...
- 对比MFC资源文件谈谈WPF布局方式
对比MFC资源文件谈谈WPF布局方式 MFC方式 对于传统的MFC基于UI的应用程序设计通常分两步走,首先是设计UI,使用的是RC文件,然后是代码文件,对RC文件进行操作,如下面Figure 1 的基 ...
随机推荐
- Mac 终端添加代码到SVN
从SVN拉取代码步骤: 1.cd /Users/mark/zkh/Work/BC/(本地路径) 2.svn checkout https://192.168.2.99/svn/bc_android ...
- ubuntu上安装boost库
只需一条命令: sudo apt install libboost-dev
- dfs——皇后问题(回溯)
#include <iostream> using namespace std; ],b[],c[],d[]; ; dfs(int i) { if(i>n) { sum++; ) { ...
- 快速排序改进——3区快速排序(3-way quicksort)
1.快速排序缺陷 快速排序面对重复的元素时的处理方法是,把它放在了左部分数组或右部分数组,下次进行分区时,还需检测它.如果需要排序的数组含有大量重复元素,则这个问题会造成性能浪费. 解决方法:新增一个 ...
- 一天掌握python爬虫
一天掌握python爬虫日记: (小爬虫,NO 我们是大蜘蛛 ) 数据抓取: requests:requests 的底层实现其实就是 urllib开源地址:https://github.com/ken ...
- C++学习(十四)(C语言部分)之 数组
上期回顾:三大循环 for while do while (循环体至少会执行一次)四大跳转 goto continue(提前跳出当前循环 进入下一个循环) break(跳出本次循环) return(跳 ...
- 实验吧—Web——WP之 猫抓老鼠
打开解题链接后,发现他是让我们输入key提交查询就能进行下一步 题目中提示了:catch(抓的意思) 那么我们很容易就能想到是BP抓包,抓包后直接放到repeater中改包. 我们先GO一下看看有什么 ...
- 实验吧—密码学——WP之 困在栅栏里的凯撒
首先我们研究题目.栅栏:凯撒 还发现一个数字“6”,那么我们很容易就有一个解题思路 对这段字符进行栅栏解密再进行凯撒解密 我们都知道,栅栏解密的关键就是栏数,根据题目中我们发现的信息,这段字符串是12 ...
- hdu3746 Cyclic Nacklace KMP
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, ...
- 【Disruptor】之Ringbuffer
一.Ringbuffer的概念 =>是一个环形数据队列的数据结构 =>嗯,正如名字所说的一样,它是一个环(首尾相接的环),你可以把它用做在不同上下文(线程)间传递数据的buffer. =& ...