⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wroxstylerdesigner.cs

📁 ASP.NET服务器控件高级编程电子书
💻 CS
字号:
using System;
using System.IO;
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.ComponentModel.Design;
using WroxDesign;

namespace WroxDesign.Design
{
	public class WroxStylerDesigner : ControlDesigner
	{
		public WroxStylerDesigner() 
		{
		}

		public override string GetDesignTimeHtml()
		{
			WroxStyler st = (WroxStyler) base.Component;

			if (st.RelatedButtonID != string.Empty)
			{
				IReferenceService svc = 
					GetService(typeof(IReferenceService)) as IReferenceService;

				WroxButton button = svc.GetReference(st.RelatedButtonID) as WroxButton;
				//Was the button found?
				if (button != null)
				{
					st.CopyBaseAttributes(button);
					st.Font.CopyFrom(button.Font);
					st.BackColor = button.BackColor;
					st.BorderColor = button.BorderColor;
					st.BorderStyle = button.BorderStyle;
					st.BorderWidth = button.BorderWidth;
					st.ForeColor = button.ForeColor;
				}
			}
			return base.GetDesignTimeHtml();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -