没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
<UserControl x:Class="Splash.FingerPictureBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" AllowDrop="False" Height="300" Width="300">
<Canvas Height="239" Name="canvas1" Width="240">
<Image Canvas.Left="40" Canvas.Top="37" Height="183" Name="image1" Stretch="Fill" Width="168" />
</Canvas>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Splash
{
/// <summary>
/// FingerPictureBox.xaml 的交互逻辑
/// </summary>
public partial class FingerPictureBox : UserControl
{
/// <summary>
/// MouseDown位置信息
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" AllowDrop="False" Height="300" Width="300">
<Canvas Height="239" Name="canvas1" Width="240">
<Image Canvas.Left="40" Canvas.Top="37" Height="183" Name="image1" Stretch="Fill" Width="168" />
</Canvas>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Splash
{
/// <summary>
/// FingerPictureBox.xaml 的交互逻辑
/// </summary>
public partial class FingerPictureBox : UserControl
{
/// <summary>
/// MouseDown位置信息
/// </summary>
private Point previousMousePoint;
/// <summary>
/// 初始图像
/// </summary>
private ImageSource _InitialImage = null;
public FingerPictureBox()
{
InitializeComponent();
// 设置装载事件处理器
this.Loaded += new RoutedEventHandler(FingerPictureBox_Loaded);
}
private void FingerPictureBox_Loaded(object sender, RoutedEventArgs e)
{
// 设置拖动属性
this.AllowDrop = true;
// 设置裁剪属性
this.ClipToBounds = true;
// 设置拖动事件处理器
this.DragEnter += new DragEventHandler(FingerPictureBox_DragEnter);
this.Drop += new DragEventHandler(FingerPictureBox_Drop);
// 设置各元素大小和位置
this.image1.Width = this.canvas1.Width = this.Width - this.BorderThickness.Left - this.BorderThickness.Right;
private Point previousMousePoint;
/// <summary>
/// 初始图像
/// </summary>
private ImageSource _InitialImage = null;
public FingerPictureBox()
{
InitializeComponent();
// 设置装载事件处理器
this.Loaded += new RoutedEventHandler(FingerPictureBox_Loaded);
}
private void FingerPictureBox_Loaded(object sender, RoutedEventArgs e)
{
// 设置拖动属性
this.AllowDrop = true;
// 设置裁剪属性
this.ClipToBounds = true;
// 设置拖动事件处理器
this.DragEnter += new DragEventHandler(FingerPictureBox_DragEnter);
this.Drop += new DragEventHandler(FingerPictureBox_Drop);
// 设置各元素大小和位置
this.image1.Width = this.canvas1.Width = this.Width - this.BorderThickness.Left - this.BorderThickness.Right;
剩余6页未读,继续阅读
资源评论
- kugougou04142014-06-25比较有用的东西,很有用
BoomHusky
- 粉丝: 46
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 3122080306 邹子轩 实验报告二.docx
- 基于STM32 NUCLEO板设计彩色LED照明灯(纯cubeMX开发)(大赛作品,文档完整,可直接运行)
- 发那科工业机器人保养大全
- Sphere.h
- REMD固有时间尺度分解信号分量可视化(Matlab完整源码和数据)
- 嵌入式系统双单片机STC89C52+STC15W104多功能学习板电路图可扩展 适用于单片机初学者和教学
- 基于STM32蓝牙控制小车系统设计(硬件+源代码+论文)大赛作品
- XILINXFPGA源码基于Spartan3火龙刀系列FPGA开发板VGA测试例程
- Java聊天室的设计与实现【尚学堂·百战程序员】
- python中matplotlib教程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功