亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

組件開發(fā)中常用的屬性

系統(tǒng) 2321 0

DefaultEvent( "ClickNext" ):指定組件的默認(rèn)事件
DefaultProperty( "NextText" ):指定組件的默認(rèn)屬性
Bindable(true or false):指定屬性是否通常用于綁定
Category( "Appearance" ):指定其屬性或事件將顯示在可視化設(shè)計(jì)器中的類別
DefaultValue( typeof( Color ) , "" ):指定屬性的默認(rèn)值
Description( "The background color"):指定屬性或事件的說(shuō)明
TypeConverter(typeof( WebColorConverter )):指定用作此特性所綁定到的對(duì)象的轉(zhuǎn)換器的類型
Browsable(true or false):指定一個(gè)屬性或事件是否應(yīng)顯示在“屬性”窗口中
DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden ):指定在設(shè)計(jì)時(shí)序列化組件上的屬性時(shí)所使用的持久性類型

==========================================================================

簡(jiǎn)單控件 事件

EventManager
<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;


namespace MyControls
{
/**/ /// <summary>
/// SummarydescriptionforMyEventManager.
/// </summary>

[DefaultEvent( " NextClick " ),DefaultProperty( " text " )]
public class MyEventManager:System.Web.UI.WebControls.WebControl,IPostBackEventHandler
{

public event EventHandlerNextClick;
public event EventHandlerPreClick;

[Bindable(
true ),Category( " Behavior " ),DefaultValue( "" ),Description( " text " )]
public string text
{
get
{
return (( string )ViewState[ " text " ] == null ) ? string .Empty:( string )ViewState[ " text " ];
}

set
{
ViewState[
" text " ] = value;
}

}


protected virtual void OnNextClick(EventArgse)
{
if (NextClick != null )
{
NextClick(
this ,EventArgs.Empty);
}


}


protected virtual void OnPreClick(EventArgse)
{
if (PreClick != null )
{
PreClick(
this ,EventArgs.Empty);
}


}


void IPostBackEventHandler.RaisePostBackEvent( string EventArguments)
{
if (EventArguments == " Pre " )
{
OnPreClick(EventArgs.Empty);
Page.Trace.Warn(
" PreButtonClick " );
}

else
{
OnNextClick(EventArgs.Empty);
Page.Trace.Warn(
" NextButtonClick " );
}

}


[Bindable(
true ),
Category(
" Appearance " ),
DefaultValue(
"" )]


protected override void Render(HtmlTextWriteroutput)
{
// output.Write(Text);
this .Attributes.AddAttributes(output);

output.AddAttribute(HtmlTextWriterAttribute.Onclick,Page.GetPostBackEventReference(
this , " Pre " ));
output.AddAttribute(
" language " , " javascript " );

output.RenderBeginTag(HtmlTextWriterTag.Button);
output.Write(
" Pre " );
output.RenderEndTag();

output.AddAttribute(HtmlTextWriterAttribute.Onclick,Page.GetPostBackEventReference(
this , " Next " ));
output.AddAttribute(
" language " , " javascript " );

output.RenderBeginTag(HtmlTextWriterTag.Button);
output.Write(
" Next " );
output.RenderEndTag();


base .Render(output);
}

}

}

組件開發(fā)中常用的屬性


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 日韩精品一区二区三区免费观看 | 中文字幕日韩哦哦哦 | 私人午夜影院 | 欧美丰满大乳大屁股毛片 | 免费一级欧美大片视频在线 | ww.久久| 欧美成人老熟妇暴潮毛片 | 99热久这里都是精品小草 | 欧美.成人.综合在线 | 国产夜夜操 | 亚洲成人第一页 | 国产综合久久久久影院 | 波多野结衣中文字幕久久 | 五月婷婷国产 | 久久精品人人做人人看最新章 | 亚洲精品国产成人99久久 | 国产精品亚洲国产 | jizz成熟丰满老女人 | 欧美日韩中文字幕 | 日色视频 | 久久大香伊蕉在人线国产昨爱 | 国产伦一区二区三区免费 | 午夜亚洲国产理论秋霞 | 国产精品亚洲欧美 | 天天操天天干天天插 | 97在线观看完整免费 | 手机看片日韩高清国产欧美 | 国产系列在线播放 | 一级特黄aa大片欧美小说 | 桃色视频在线观看 | 国产一级理论免费版 | 日本高清视频www夜色资源 | 911免费视频| 久久天天操 | 91久久老司机福利精品网 | 国产成人免费a在线视频色戒 | 一级女性全黄生活片免费 | 国产亚洲一区二区在线观看 | 精品久久久影院 | www.婷婷色| 嗯啊在线观看免费影院 |