Blend Grid行列拖拽控制宽高
看效果

-
<Grid>
-
<Grid.ColumnDefinitions>
-
<ColumnDefinition Width="212*"/>
-
<ColumnDefinition Width="9*"/>
-
<ColumnDefinition Width="296*"/>
-
</Grid.ColumnDefinitions>
-
<Grid.RowDefinitions>
-
<RowDefinition Height="161*"/>
-
<RowDefinition Height="6*"/>
-
<RowDefinition Height="153*"/>
-
</Grid.RowDefinitions>
-
<Button Content="Button" Margin="0"/>
-
<Button Content="Button" Margin="0,0,0,1" Grid.Row="2"/>
-
<Button Content="Button" Grid.Column="2"/>
-
<Button Content="Button" Grid.Column="2" Grid.Row="2"/>
-
<GridSplitter HorizontalAlignment="Center" Margin="2,0" Grid.RowSpan="3" Width="5" Grid.Column="1" RenderTransformOrigin="0.5,0.5">
-
<GridSplitter.RenderTransform>
-
<TransformGroup>
-
<ScaleTransform/>
-
<SkewTransform/>
-
<RotateTransform Angle="0.349"/>
-
<TranslateTransform/>
-
</TransformGroup>
-
</GridSplitter.RenderTransform>
-
</GridSplitter>
-
<GridSplitter Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0,3" Grid.Row="1" VerticalAlignment="Center" Height="5"/>
-
-
</Grid>
效果2

主要设置俩个地方 注意设置列 auto
1)最外层gridGrid.IsSharedSizeScope="True"
2)设置GridSplitter 所在列或行 SharedSizeGroup
-
<Grid Grid.IsSharedSizeScope="True" >
-
<Grid Margin="19,182,60,48" Background="White">
-
<Grid.ColumnDefinitions>
-
<ColumnDefinition Width="377*"/>
-
<ColumnDefinition Width="16*" />
-
<ColumnDefinition Width="Auto" SharedSizeGroup="aaa"/>
-
</Grid.ColumnDefinitions>
-
<Grid.RowDefinitions>
-
<RowDefinition Height="9*"/>
-
<RowDefinition/>
-
<RowDefinition Height="8*"/>
-
</Grid.RowDefinitions>
-
<Button Content="Button" Margin="0"/>
-
<Button Content="Button" Margin="0,0,0,1" Grid.Row="2"/>
-
<Button Content="Button" Grid.Column="2"/>
-
<Button Content="Button" Grid.Column="2" Grid.Row="2"/>
-
<GridSplitter HorizontalAlignment="Center" Margin="1.313,0,1.312,0" Grid.RowSpan="3" Width="5" Grid.Column="1" RenderTransformOrigin="0.5,0.5">
-
<GridSplitter.RenderTransform>
-
<TransformGroup>
-
<ScaleTransform/>
-
<SkewTransform/>
-
<RotateTransform Angle="0.349"/>
-
<TranslateTransform/>
-
</TransformGroup>
-
</GridSplitter.RenderTransform>
-
</GridSplitter>
-
<GridSplitter Grid.ColumnSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="5" Grid.Row="1"/>
-
-
</Grid>
-
<Grid Margin="19,61,60,169" Background="White">
-
<Grid.ColumnDefinitions>
-
<ColumnDefinition Width="377*" />
-
<ColumnDefinition Width="16*" />
-
<ColumnDefinition Width="Auto" SharedSizeGroup="aaa"/>
-
</Grid.ColumnDefinitions>
-
<Grid.RowDefinitions>
-
<RowDefinition Height="15*" />
-
<RowDefinition Height="2*"/>
-
<RowDefinition Height="13*"/>
-
</Grid.RowDefinitions>
-
<Button Content="Button" Margin="0"/>
-
<Button Content="Button" Margin="0,0,0,1" Grid.Row="2"/>
-
<Button Content="Button" Grid.Column="2"/>
-
<Button Content="Button" Grid.Column="2" Grid.Row="2"/>
-
<GridSplitter HorizontalAlignment="Center" Margin="1.313,0,1.312,0" Grid.RowSpan="3" Width="5" Grid.Column="1" RenderTransformOrigin="0.5,0.5">
-
<GridSplitter.RenderTransform>
-
<TransformGroup>
-
<ScaleTransform/>
-
<SkewTransform/>
-
<RotateTransform Angle="0.349"/>
-
<TranslateTransform/>
-
</TransformGroup>
-
</GridSplitter.RenderTransform>
-
</GridSplitter>
-
<GridSplitter Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0,1,0,0" VerticalAlignment="Center" Height="5" Grid.Row="1"/>
-
-
</Grid>
-
</Grid>
Blend Grid行列拖拽控制宽高的更多相关文章
- FMX ScrollBox 拖拽控制
Firemonkey下的ScrollBox 拖拽控制,滚动控制,拖拽,滚动条 AniCalculations 仅允许纵向拖拽,拖拽 scrlbx.AniCalculations.TouchTracki ...
- 案例(拖拽对话框、高清放大镜、自制滚动条、元素的隐藏方式、表格隔行变色、tab切换效果、字符串拼接、刷新评论)
一.拖拽对话框 <style> .of{ width: 500px; } #link,#close{ text-decoration: none; margin: 0 10px; font ...
- textarea拖拽控制
一.用处 textarea默认时允许用户以拖拽形式来改变textarea大小,但textarea的大小变化会撑大其父节点,有时会破坏整体布局,有时我们并不希望textarea随意拖拽. forklif ...
- el-table实现行列拖拽
element ui 表格没有自带的拖拽排序的功能,只能借助第三方插件Sortablejs来实现. 实现步骤: 安装Sortable.js npm install sortablejs --save ...
- element ui + sortablejs实现表格的行列拖拽
<template> <div class="container"> <el-table :data="tableData" bo ...
- div拖拽的问题
今天看到一篇写的很好的文章,摘抄如下: 思路 父盒子相对定位,子元素,也就是被拖拽的元素绝对定位 当鼠标在子元素中按下时,绑定鼠标移动事件,根据鼠标位置改变元素位置 设置鼠标当前位置(offsetX, ...
- JQUERY 拖拽 draggable droppable resizable selectable sortable
今天用了jq ui的拖动碰撞功能,好不容易看到有详细的API解说,记录如下: <script language="JavaScript" type="text/ ...
- html5 Sortable.js 拖拽排序源码分析
最近公司项目经常用到一个拖拽 Sortable.js插件,所以有空的时候看了 Sortable.js 源码,总共1300多行这样,写的挺完美的. 本帖属于原创,转载请出名出处. 官网http:// ...
- CSS 奇思妙想 | 使用 resize 实现强大的图片拖拽切换预览功能
本文将介绍一个非常有意思的功能,使用纯 CSS 利用 resize 实现强大的图片切换预览功能.类似于这样: 思路 首先,要实现这样一个效果如果不要求可以拖拽,其实有非常多的办法. 将两张图片叠加在一 ...
随机推荐
- youtube视频在线下载
youtube视频在线下载网站: https://www.clipconverter.cc/ youtube视频样例: https://www.youtube.com/watch?v=NMkgz0AR ...
- afnet缓存
http://www.open-open.com/code/view/1432299750333
- 智能家居-2.基于esp8266的语音控制系统(硬件篇)
智能家居-1.基于esp8266的语音控制系统(开篇) 智能家居-2.基于esp8266的语音控制系统(硬件篇) 智能家居-3.基于esp8266的语音控制系统(软件篇) 赞赏支持 QQ:505645 ...
- svn导一份历史版本出来
然后: 点击最上面的Show log ; 选择你要的版本: 右键, export, 然后就可以选择需要导出的文件夹 主要有时候开发新功能然后覆盖到项目里面去了,但是产品可能需要在旧版本上面修改其他东西 ...
- 服务器Oracle数据库配置与客户端访问数据库的一系列必要设置
tips:所有路径请对应好自己电脑的具体文件路径. 一.服务器及Oracle数据库设置 1.刚装完的Oracle数据库中只有一个dba账户,首先需要创建一个用户. 2.配置监听,C:\app\Admi ...
- [Go] golang的MPG调度模型
MPG模式运行状态11)当前程序有三个M,如果三个M都在一个cpu运行,就是并发,如果在不同的cpu运行就是并行2)M1,M2,M3正在执行一个G,M1的协程队列有三个,M2的协程队列有三个,M3的协 ...
- Windows Server 2016-Hyper-V Replica副本功能介绍
Hyper-V副本是一种可用于复制虚拟机的功能,作为业务连续性解决方案的一部分.从Windows Server 2012中,Hyper-V角色引入了Hyper-V Replica作为虚拟机的内置复制机 ...
- 链接(url)中不能有汉字,遇到汉字,需要使用quote转换之后使用
from urllib.parse import quotename=quote("翻译")print(name)
- JWT 学习资料
学习资料 网址 官方网站 https://jwt.io/ debugger https://jwt.io/#debugger 相关的类库 https://jwt.io/#libraries (java ...
- python27期尚哥讲并发编程:
python27day23并发编程----------------------------------------------------------------------------------- ...