日期:2014-05-17 浏览次数:21065 次
using System;
using System.Windows.Forms;
using System.Drawing;
namespace Demo
{
/// <summary>
/// 图片格子用户控件
/// </summary>
public partial class ImageCell : UserControl
{
public ImageCell()
{
InitializeComponent();
SetupControls();
}
private void SetupControls()
{
//图像按比例缩放
pbImage.SizeMode = PictureBoxSizeMode.StretchImage;
//设置标签居中显示
lblTitle.AutoSize = false;
lblTitle.TextAlign = ContentAlignment.TopCenter;
}
//复选框
public bool ImageCellCheck
{
get { return ckbCheck.Checked; }
set { ckbCheck.Checked = value; }
}