c# - 图像查看器的用户控件与自定义控件

标签 c# user-controls custom-controls

我想创建一个图像查看器。我不知道从哪里开始。能否请您给我一些开始的提示。

我有以下几点想法

  • 创建自定义控件,覆盖绘制事件。使用属性读取、翻转、旋转和缩放图像
  • 创建一个内部有面板的用户控件,将背景设置为图像,同时我将公共(public)属性设置为“读取”。实现旋转、翻转、缩放的属性

最佳答案

我建议你使用 WPF 而不是 winforms
使用 WPF 的缩放和平移示例:http://blogs.windowsclient.net/joeyw/archive/2009/06/02/pan-and-zoom-updated.aspx
This主题有旋转等示例代码:

This topic provides an introduction to the Microsoft Windows Presentation Foundation Imaging Component. WPF Imaging enables developers to display, transform, and format images.

This topic contains the following sections.

WPF Imaging Component
WPF Image Formats
Displaying Images in WPF
Image Metadata
Codec Extensibility
Related Topics

关于c# - 图像查看器的用户控件与自定义控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5949459/

相关文章:

c# - 从 .NET 验证 dll 具有有效签名并且未被修改

c# - 通过动画在 WPF ItemsControl 或 ScrollViewer 中循环项目?

asp.net - 如何从用户控件处理页面事件? (VB.net)

加载时改变颜色的ios栏

wpf - 创建自定义 FrameworkContentElement 以在 WPF 中的文本上添加对角线

iPhone - 在哪里可以找到自定义的类似日历的日期选择器?

c# - 禁止编辑 DataGridView 记录

c# - 如何在 Visual Studio 2015 RC 中启用 Intellitest?

c# - Fiddler 未从我的 C# 应用程序捕获流量

c# - 在 ASP.NET 中构建 SiteMap