WPF 触摸屏多点触控图像的缩放旋转和移动
<dxc:DXWindow xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" x:Class="MESClient.Unit.BIL.ICMO.ImageChild"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys" Title="图片缩放" WindowState="Maximized" Closing="DXWindow_Closing" x:Name="wnd"> <Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<Canvas Width="{Binding Path=ActualWidth,ElementName=wnd}" Height="{Binding Path=ActualHeight,ElementName=wnd}">
<Canvas x:Name="picShow" ClipToBounds="True" Canvas.Left="0" Canvas.Top="0" Width="{Binding Path=ActualWidth,ElementName=wnd}" Height="{Binding Path=ActualHeight,ElementName=wnd}">
<i:Interaction.Behaviors>
<ei:TranslateZoomRotateBehavior x:Name="eiPic" TranslateFriction="0.1" RotationalFriction="0.1"/>
</i:Interaction.Behaviors>
<Image x:Name="image1" Source="{Binding ImagePath}" Width="{Binding Path=ActualWidth,ElementName=wnd}" Height="{Binding Path=ActualHeight,ElementName=wnd}"/>
</Canvas> </Canvas>
<Button Grid.Row="1" HorizontalAlignment="Right" Margin="5,10" Content="关闭" Click="Button_Click" TouchDown="Button_TouchDown"/>
</Grid> </dxc:DXWindow>
效果蛮好的
WPF 触摸屏多点触控图像的缩放旋转和移动的更多相关文章
- (干货) Android实现ImageVIew多点触控及双击缩放
支持多点触控,放大自由移动,双击可以放大缩小.直接上代码: package com.cbt.view; import android.content.Context; import android.g ...
- (一)自定义ImageView,初步实现多点触控、自由缩放
真心佩服那些一直专注于技术共享的大神们,正是因为他们无私的分享精神,我才能每天都有进步.近日又算是仔细学了android的自定义控件技术,跟着大神的脚步实现了一个自定义的ImageView.里面涉及到 ...
- 【WPF学习】第十八章 多点触控输入
多点触控(multi-touch)是通过触摸屏幕与应用程序进行交互的一种方式.多点触控输入和更传统的基于笔(pen-based)的输入的区别是多点触控识别手势(gesture)——用户可移动多根手指以 ...
- MSDN 杂志:UI 前沿技术 - WPF 中的多点触控操作事件
原文 MSDN 杂志:UI 前沿技术 - WPF 中的多点触控操作事件 UI 前沿技术 WPF 中的多点触控操作事件 Charles Petzold 下载代码示例 就在过去几年,多点触控还只是科幻电 ...
- Android多点触控技术实战,自由地对图片进行缩放和移动
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/11100327 在上一篇文章中我带着大家一起实现了Android瀑布流照片墙的效果, ...
- windows8 开发教程 教你制作 多点触控Helper可将任意容器内任意对象进行多点缩放
http://blog.csdn.net/wangrenzhu2011/article/details/7732907 (转) 实现方法: 对Manipulation进行抽象化 使不同容器可共用多点缩 ...
- Android多点触控(图片的缩放Demo)
本文主要介绍Android的多点触控,使用了一个图片缩放的实例,来更好的说明其原理.须要实现OnTouchListener接口,重写当中的onTouch方法. 实现效果图: 源码: 布局文 ...
- unity3d 触屏多点触控(旋转与缩放)
unity3d 触屏多点触控(旋转与缩放) /*Touch OrbitProgrammed by: Randal J. Phillips (Caliber Mengsk)Original Creati ...
- Android 多点触控与简单手势(一)
现在一般的Android手机都会使用电容触摸屏最少可以支持两点触摸,多的可能是七八个,所以基本上都会支持多点触控, android系统中应用程序可以使用多点触控的事件来完成各种手势和场景需求. And ...
随机推荐
- canvas设置repeat
canvas设置repeat 方法 ctx.createPattern(img, 'repeat'); repeat repeat-x repeat-y no-repeat 重复图片 const ca ...
- 前端基础——AJAX
一 简介 AJAX(Asynchronous Javascript And XML),即AJAX = 异步JavaScript + XML.AJAX是一种用于创建快速动态网页的技术. AJAX两大特 ...
- SpringBoot Session 管理及集群管理
1.配置session的超时时间 : 在application.prooperties中 server.session.timeout = 600 //以秒为单位,默认最少一分钟 2.配置 ...
- leetcode507
public class Solution { public bool CheckPerfectNumber(int num) { ) { return false; } ; ; i <= nu ...
- django一对一数据库建立和进行数据传输的3种方式all()(对象) values()(字典) values_list()(元组)
class Business(models.Model): caption = models.CharField(max_length=32) code = models.CharField(max_ ...
- Nginx 图片服务器搭建
安装Nginx >yum install -y nginx 安装vsftpd http://www.cnblogs.com/eason-d/p/9057389.html 2: 创建目录 /us ...
- MVC-READ1
将具有不同稳定性的元素融为一体,具有最差稳定性的元素决定了整体的稳定性,这是“短板理论”在软件设计中的体现. MVC的创建者是Trygve M. H. Reenskau,他是挪威的计算机专家,同时也是 ...
- Redis 与 Lua Script
[Redis Script] 1.EVAL script numkeys key [key ...] arg [arg ...] 从 Redis 2.6.0 版本开始,通过内置的 Lua 解释器,可以 ...
- Python3 sorted() 函数
Python3 sorted() 函数 Python3 内置函数 描述 sorted() 函数对所有可迭代的对象进行排序操作. sort 与 sorted 区别: sort 是应用在 list 上的 ...
- Visual Studio 2013 boost
E:\Visual Studio 2013\install\VC\bin\amd64>E:\IFC\boost_1_56_0_vs2013'E:\IFC\boost_1_56_0_vs2013' ...