|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Web.UI;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.Design;
using System.Drawing;
namespace DNA.UI.JQuery
{
public class ViewDesigner : ContainerControlDesigner
{
private View _view;
private Style _style = null;
public override void Initialize(IComponent component)
{
//判断父类控件component.Site.Container
_view = component as View;
if (_view == null)
throw new ArgumentException("Component must be an View Control", "component");
base.Initialize(component);
}
public override bool AllowResize
{
get
{
return false;
}
}
public override string FrameCaption
{
get
{
if (!string.IsNullOrEmpty(_view.Text))
return "View:" + _view.Text;
else
return "View:" + _view.ID;
}
}
public override Style FrameStyle
{
get
{
if (_style == null)
{
_style = new Style();
_style.Font.Name = "Verdana";
_style.Font.Size = new FontUnit("XSmall");
_style.ForeColor = Color.Black;
_style.BackColor = Color.LightGray;
_style.Width = Unit.Percentage(100);
}
return _style;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"
www.dotnetage.com