TableItemStyle.MergeWith(Style) 方法

定義

將指定的 Style 的樣式屬性與呼叫這個方法的 TableItemStyle 類別的執行個體組合在一起。Combines the style properties of the specified Style into the instance of the TableItemStyle class that this method is called from.

public:
 override void MergeWith(System::Web::UI::WebControls::Style ^ s);
public override void MergeWith (System.Web.UI.WebControls.Style s);
override this.MergeWith : System.Web.UI.WebControls.Style -> unit
Public Overrides Sub MergeWith (s As Style)

參數

s
Style

Style,表示要合併的樣式。A Style that represents the style to combine.

備註

您可以使用方法,將 MergeWith 指定之的樣式屬性合併為 Style TableItemStyle 呼叫這個方法的類別實例。Use the MergeWith method to combine the style properties of the specified Style into the instance of the TableItemStyle class that this method is called from.

這個方法會加入物件的屬性 Style 和類別的目前實例 TableItemStyleThis method joins the properties of the Style object and the current instance of the TableItemStyle class. 這是藉由設定未在目前類別實例中設定的每個屬性, TableItemStyle 以及參數之對應屬性中的值來完成 sThis is accomplished by setting each property that is not set in the current instance of the TableItemStyle class with the value in the corresponding property of the s parameter. 只會取代尚未設定的屬性。Only properties that have not been set are replaced. 如果 s 未設定參數中的屬性,則不會取代目前類別實例中的對應屬性 TableItemStyleIf a property in the s parameter is not set, it does not replace the corresponding property in the current instance of the TableItemStyle class.

適用於

另請參閱