共用方式為


BCChatButton.AppearanceWhenContainedIn(Type[]) 方法

定義

當檢視裝載于指定的階層時,傳回這個類別實例的強型別 UIAppearance。

public static BusinessChat.BCChatButton.BCChatButtonAppearance AppearanceWhenContainedIn (params Type[] containers);
static member AppearanceWhenContainedIn : Type[] -> BusinessChat.BCChatButton.BCChatButtonAppearance

參數

containers
Type[]

開發人員想要以容器的形式套用此特定外觀的類型清單

傳回

當指定的容器階層為作用中時,開發人員可用來設定屬性的外觀 Proxy 物件

備註

傳回的物件代表 UIAppearance Proxy,當這些實例包含在 參數指定的 containers 階層中時,開發人員可以設定 BCChatButton 實例的外觀屬性。

如果開發人員想要控制 BCChatButton 子類別的外觀,他們應該使用 GetAppearance<T>(UITraitCollection, Type[]) 方法。

下列範例顯示 AppearanceWhenContainedIn 方法的運作方式

var mySliders = UISlider.AppearanceWhenContainedIn (typeof (UINavigationBar), typeof (UIPopoverController));
mySliders.TintColor = UIColor.Red;

如需詳細資訊,請參閱 類別 UIAppearance 的檔。

適用於