Button 類別

定義

按鈕 View,它會回應觸控事件。

[Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._ButtonRenderer))]
public class Button : Xamarin.Forms.View, Xamarin.Forms.IBorderElement, Xamarin.Forms.IButtonController, Xamarin.Forms.IElementConfiguration<Xamarin.Forms.Button>, Xamarin.Forms.IImageController, Xamarin.Forms.IImageElement, Xamarin.Forms.Internals.IFontElement
type Button = class
    inherit View
    interface IFontElement
    interface IBorderElement
    interface IButtonController
    interface IViewController
    interface IVisualElementController
    interface IElementController
    interface IElementConfiguration<Button>
    interface IImageController
    interface IImageElement
繼承
屬性
實作

備註

按鈕外觀

除了所有 View 物件通用的外觀屬性之外,Button 類別還提供 BorderColorBorderWidthBorderRadiusImage 屬性。

下列 XAML 程式碼片段示範如何使用這些屬性來建立包含文字 「Press me!」 的基本按鈕 按鈕顯示的影像會出現在版面配置的開頭端,這是由左至右語言的左側。

<Button Text="Press me!"
        Image="icon.png"
        BackgroundColor="White"
        BorderRadius="10"
        BorderWidth="2"
        BorderColor="Black"
        HorizontalOptions="Center"/>

若要使用上述 XAML 來顯示 icon.png 影像,開發人員必須將它放在適當的位置,以及每個平臺專案特定的適當建置動作。 影像主題說明這一點和其他有關在 Xamarin.Forms 中使用影像的重要詳細資料。

按鈕事件

按鈕會分別通知 Pressed 開發人員按下、放開和按一下具有 、 ReleasedClicked 事件的事件。

下列 XAML 會將處理常式指派給下列兩個按鈕事件:

<Button x:Name="PressMeButton"
        Text="Press Me!"
        Pressed="PressMeButton_Pressed"
        Clicked="PressMeButton_Clicked"/>

使用上述 XAML 時,程式碼後置檔案中的下列事件處理常式會在引發這些事件時變更按鈕的文字:

private void PressMeButton_Pressed(object sender, EventArgs e)
{
   (sender as Button).Text = "You pressed me!";
}

private void PressMeButton_Clicked(object sender, EventArgs e)
{
   (sender as Button).Text = "I was just clicked!";
}

命令

按鈕的命令 API 可讓開發人員執行命令,以回應 Clicked 事件的內容。

下列 XAML 會指定按一下按鈕時要執行的命令。 命令會更新名為 的 modelUpdateCount 檢視模型屬性,按鈕接著會使用此屬性來更新其文字。 (顯示文字系結是否完整。只有命令程式碼相關。) :

<Button Text="{Binding modelUpdateCount, StringFormat='Number of updates to the model: {0:D}'}"
        Command="{Binding IncrementLabelCommand}" />

使用上述 XAML 時,開發人員會先定義 IncrementLabelCommand 檢視模型上的 屬性,並實作方法,以便稍後具現化命令:

public ICommand IncrementLabelCommand { get; private set; }

void IncrementLabel()
{
   modelUpdateCount++;
}

其次,開發人員會使用 方法 (或動作來初始化 命令) :

public ViewModelDemo()
{
   IncrementLabelCommand = new Command(IncrementLabel);
}

最後,開發人員必須在主頁面的建構函式中,將系結內容設定為實作 屬性之檢視模型的系結內容:

public MainPage()
{
    InitializeComponent();
    BindingContext = new ViewModelDemo();
}

建構函式

Button()

初始化 Button 類別的新執行個體。

欄位

BorderColorProperty

BorderColor 可繫結屬性的備份存放區。

BorderRadiusProperty
已過時。

BorderRadius 可繫結屬性的備份存放區。

BorderWidthProperty

BorderWidth 可繫結屬性的備份存放區。

CharacterSpacingProperty

CharacterSpacing 可繫結屬性的備份存放區。

CommandParameterProperty

CommandParameter 可繫結屬性的備份存放區。

CommandProperty

Command 可繫結屬性的備份存放區。

ContentLayoutProperty

ContentLayout 可繫結屬性的備份存放區。

CornerRadiusProperty

CornerRadius 可繫結屬性的備份存放區。

FontAttributesProperty

FontAttributes 可繫結屬性的備份存放區。

FontFamilyProperty

FontFamily 可繫結屬性的備份存放區。

FontProperty

Font 可繫結屬性的備份存放區。

FontSizeProperty

FontSize 可繫結屬性的備份存放區。

ImageProperty
已過時。

Image 可繫結屬性的備份存放區。

ImageSourceProperty

ImageSource 可繫結屬性的備份存放區。

IsPressedProperty

IsPressed 可繫結屬性的備份存放區。

PaddingProperty

Padding 可繫結屬性的備份存放區。

TextColorProperty

TextColor 可繫結屬性的備份存放區。

TextProperty

Text 可繫結屬性的備份存放區。

TextTransformProperty

TextTransform 可繫結屬性的備份存放區。

屬性

AnchorX

取得或設定任何轉換內中心點的 X 元件 (相對於項目界限)。 這是可繫結屬性。

(繼承來源 VisualElement)
AnchorY

取得或設定任何轉換內中心點的 Y 元件 (相對於項目界限)。 這是可繫結屬性。

(繼承來源 VisualElement)
AutomationId

取得或設定值,允許自動化架構尋找此項目並與之互動。

(繼承來源 Element)
Background

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
BackgroundColor

取得或設定將會填滿 VisualElement 背景的色彩。 這是可繫結屬性。

(繼承來源 VisualElement)
Batched

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
Behaviors

取得與此元素關聯的行為清單。 這是可繫結屬性。

(繼承來源 VisualElement)
BindingContext

取得或設定物件,這個物件包含屬於此 BindableObject 屬性繫結屬性將設為目標的屬性。

(繼承來源 BindableObject)
BorderColor

取得或設定描述按鈕框線筆觸色彩的色彩。 這是可繫結屬性。

BorderRadius
已過時。

取得或設定框線的圓角半徑。 這是可繫結屬性。

BorderWidth

取得或設定框線的寬度。 這是可繫結屬性。

Bounds

取得項目的界限。

(繼承來源 VisualElement)
CharacterSpacing

按鈕 View,它會回應觸控事件。

class

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
ClassId

取得或設定值,用來識別語意類似項目的集合。

(繼承來源 Element)
Clip

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
Command

取得或設定啟動按鈕時要叫用的命令。 這是可繫結屬性。

CommandParameter

取得或設定要傳遞至 Command 屬性的參數。 這是可繫結屬性。

ContentLayout

取得或設定物件,控制按鈕影像位置和按鈕影像與按鈕文字之間的間距。

CornerRadius

取得或設定按鈕的圓角半徑,其單位與裝置無關。

DisableLayout

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
Dispatcher

按鈕 View,它會回應觸控事件。

(繼承來源 BindableObject)
EffectControlProvider

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
Effects

套用至此項目的效果清單。

(繼承來源 Element)
FlowDirection

取得或設定配置流程方向。

(繼承來源 VisualElement)
Font

取得或設定標籤文字的字型。 這是可繫結屬性。

FontAttributes

取得值,指出按鈕文字的字型為粗體、斜體,或兩者皆非。

FontFamily

取得按鈕文字所屬字型的字型家族。

FontSize

取得或設定按鈕文字的字型大小。

GestureController

取得檢視的軌跡控制器。

(繼承來源 View)
GestureRecognizers

與此檢視建立關聯的筆勢辨識器集合。

(繼承來源 View)
Height

取得此項目的目前呈現高度。 這是唯讀的可繫結屬性。

(繼承來源 VisualElement)
HeightRequest

取得或設定此項目所需的高度覆寫項。

(繼承來源 VisualElement)
HorizontalOptions

取得或設定 LayoutOptions,定義如何在配置循環配置項目。 這是可繫結屬性。

(繼承來源 View)
Id

取得值,可用來在應用程式執行期間唯一識別項目。

(繼承來源 Element)
Image
已過時。

取得或設定要顯示在按鈕文字旁邊的選擇性影像來源。 這是可繫結屬性。

ImageSource

允許您在按鈕上顯示點陣圖影像。

InputTransparent

取得或設定值,這個值指出是否應該在使用者互動週期中包含此項目。 這是可繫結屬性。

(繼承來源 VisualElement)
IsEnabled

取得或設定值,這個值指出使用者介面中是否已啟用此項目。 這是可繫結屬性。

(繼承來源 VisualElement)
IsFocused

取得值,這個值指出此項目目前是否為焦點。 這是可繫結屬性。

(繼承來源 VisualElement)
IsInNativeLayout

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
IsNativeStateConsistent

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
IsPlatformEnabled

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
IsPressed

供 Xamarin.Forms 平台內部使用。

IsTabStop

取得或設定值,這個值表示此元素是否包含於索引標籤巡覽。 這是可繫結屬性。

(繼承來源 VisualElement)
IsVisible

取得或設定值,這個值會決定此項目是否應成為視覺化樹狀結構的一部分。 這是可繫結屬性。

(繼承來源 VisualElement)
LogicalChildren

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
Margin

取得或設定檢視的邊界。

(繼承來源 View)
MinimumHeightRequest

取得或設定值,這個值會覆寫項目在配置期間要求的最小高度。

(繼承來源 VisualElement)
MinimumWidthRequest

取得或設定值,這個值會覆寫項目在配置期間要求的最小寬度。

(繼承來源 VisualElement)
Navigation

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
NavigationProxy

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
Opacity

取得或設定套用至項目 (呈現時) 的不透明度值。 這是可繫結屬性。

(繼承來源 VisualElement)
Padding

取得或設定按鈕的邊框間距。

Parent

取得或設定項目的父項目。

(繼承來源 Element)
ParentView
已過時。

取得即此項目最接近上階的項目,而此項目是 VisualElement

(繼承來源 Element)
Platform
已過時。

按鈕 View,它會回應觸控事件。

(繼承來源 Element)
RealParent

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
Resources

取得或設定本機資源字典。

(繼承來源 VisualElement)
Rotation

取得或設定呈現元素時繞著 Z 軸 (仿射旋轉) 的旋轉 (度)。

(繼承來源 VisualElement)
RotationX

取得或設定呈現元素時繞著 X 軸 (透視旋轉) 的旋轉 (度)。

(繼承來源 VisualElement)
RotationY

取得或設定呈現元素時繞著 Y 軸 (透視旋轉) 的旋轉 (度)。

(繼承來源 VisualElement)
Scale

取得或設定套用至項目的縮放比例。

(繼承來源 VisualElement)
ScaleX

取得或設定要套用至 X 方向的小數位數值。

(繼承來源 VisualElement)
ScaleY

取得或設定要套用至 Y 方向的小數位數值。

(繼承來源 VisualElement)
Style

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
StyleClass

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
StyleId

取得或設定使用者定義值來唯一識別項目。

(繼承來源 Element)
TabIndex

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
Text

取得或設定顯示為按鈕內容的文字。 這是可繫結屬性。

TextColor

取得或設定按鈕文字的 Color。 這是可繫結屬性。

TextTransform

按鈕 View,它會回應觸控事件。

TranslationX

取得或設定項目的 X 轉譯差異。

(繼承來源 VisualElement)
TranslationY

取得或設定項目的 Y 轉譯差異。

(繼承來源 VisualElement)
Triggers

取得與此項目建立關聯的觸發程序清單。 這是可繫結屬性。

(繼承來源 VisualElement)
VerticalOptions

取得或設定 LayoutOptions,定義如何在配置循環配置項目。 這是可繫結屬性。

(繼承來源 View)
Visual

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
Width

取得此項目的目前呈現寬度。 這是唯讀的可繫結屬性。

(繼承來源 VisualElement)
WidthRequest

取得或設定此項目所需的寬度覆寫項。

(繼承來源 VisualElement)
X

取得此項目的目前 X 位置。 這是唯讀的可繫結屬性。

(繼承來源 VisualElement)
Y

取得此項目的目前 Y 位置。 這是唯讀的可繫結屬性。

(繼承來源 VisualElement)

方法

ApplyBindings()

將繫結套用至 BindingContext

(繼承來源 BindableObject)
BatchBegin()

表示項目屬性變更批次的開始。

(繼承來源 VisualElement)
BatchCommit()

表示項目命令批次的結束,而且現在應該已認可這些命令。

(繼承來源 VisualElement)
ChangeVisualState()

供 Xamarin.Forms 平台內部使用。

ClearValue(BindableProperty)

清除 SetValue 針對 property 所設定的任何值。

(繼承來源 BindableObject)
ClearValue(BindablePropertyKey)

清除 SetValue 針對 propertyKey 所識別屬性設定的任何值。

(繼承來源 BindableObject)
CoerceValue(BindableProperty)

按鈕 View,它會回應觸控事件。

(繼承來源 BindableObject)
CoerceValue(BindablePropertyKey)

按鈕 View,它會回應觸控事件。

(繼承來源 BindableObject)
Descendants()

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
EffectIsAttached(String)

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
FindByName(String)

傳回具有指定名稱的元素。

(繼承來源 Element)
Focus()

嘗試將焦點設定至此項目。

(繼承來源 VisualElement)
GetChildElements(Point)

傳回顯示在所指定 point 下的子元素。

(繼承來源 View)
GetSizeRequest(Double, Double)
已過時。

傳回項目的 SizeRequest。 呼叫此方法會開始配置週期的測量傳遞。

(繼承來源 VisualElement)
GetValue(BindableProperty)

傳回 BindableProperty 中包含的值。

(繼承來源 BindableObject)
GetValues(BindableProperty, BindableProperty)
已過時。

供 Xamarin.Forms 平台內部使用。

(繼承來源 BindableObject)
GetValues(BindableProperty, BindableProperty, BindableProperty)
已過時。

供 Xamarin.Forms 平台內部使用。

(繼承來源 BindableObject)
InvalidateMeasure()

用來呼叫而使此 VisualElement 配置失效的方法。 引發 MeasureInvalidated 事件。

(繼承來源 VisualElement)
InvalidateMeasureNonVirtual(InvalidationTrigger)

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
IsSet(BindableProperty)

如果目標屬性存在且已設定,則傳回 true

(繼承來源 BindableObject)
Layout(Rectangle)

在配置週期期間更新項目的界限。

(繼承來源 VisualElement)
Measure(Double, Double, MeasureFlags)

傳回視覺項目為了在裝置上顯示時所需的最小大小。

(繼承來源 VisualElement)
NativeSizeChanged()

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
On<T>()

傳回此 Button 的平台特定執行個體,可在其上呼叫平台特定方法。

OnBindingContextChanged()

繫結內容變更時引發的方法。

OnChildAdded(Element)

應用程式開發人員可以覆寫此方法,以便在新增子系時加以回應。

(繼承來源 VisualElement)
OnChildRemoved(Element)
已過時。

應用程式開發人員可以覆寫此方法,以便在移除子系時加以回應。

(繼承來源 VisualElement)
OnChildRemoved(Element, Int32)

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
OnChildrenReordered()

每當即將發出 ChildrenReordered 事件時叫用。 實作這個方法可為此事件加入類別處理。

(繼承來源 VisualElement)
OnMeasure(Double, Double)

配置度量發生時所呼叫的方法。

(繼承來源 VisualElement)
OnParentSet()

按鈕 View,它會回應觸控事件。

(繼承來源 NavigableElement)
OnPropertyChanged(String)

繫結屬性變更時呼叫的方法。

(繼承來源 Element)
OnPropertyChanging(String)

從子類別呼叫這個方法,以通知屬性即將發生變更。

(繼承來源 BindableObject)
OnSizeAllocated(Double, Double)

在配置週期期間設定項目的大小時,會呼叫此方法。 在發出 SizeChanged 事件之前會直接呼叫此方法。 實作這個方法可為此事件加入類別處理。

(繼承來源 VisualElement)
OnSizeRequest(Double, Double)
已過時。

這個方法會在配置週期的測量傳遞期間呼叫,以取得項目的所需大小。

(繼承來源 VisualElement)
OnTabIndexPropertyChanged(Int32, Int32)

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
OnTabStopPropertyChanged(Boolean, Boolean)

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
RemoveBinding(BindableProperty)

移除先前設定的繫結。

(繼承來源 BindableObject)
RemoveDynamicResource(BindableProperty)

移除先前設定的動態資源

(繼承來源 Element)
SendClicked()

供 Xamarin.Forms 平台內部使用。

SendPressed()

供 Xamarin.Forms 平台內部使用。

SendReleased()

供 Xamarin.Forms 平台內部使用。

SetBinding(BindableProperty, BindingBase)

將繫結指派給屬性。

(繼承來源 BindableObject)
SetDynamicResource(BindableProperty, String)

透過具有所提供索引鍵的 DynamicResource,設定更新此項目的 BindableProperty 屬性。

(繼承來源 Element)
SetValue(BindableProperty, Object)

設定指定之屬性的值。

(繼承來源 BindableObject)
SetValue(BindablePropertyKey, Object)

設定 propertyKey 的值。

(繼承來源 BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags)

供 Xamarin.Forms 平台內部使用。

(繼承來源 BindableObject)
SetValueFromRenderer(BindableProperty, Object)

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
SetValueFromRenderer(BindablePropertyKey, Object)

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
SizeAllocated(Double, Double)

在配置週期期間呼叫 SizeAllocated 來表示子樹狀結構配置的開頭。

(繼承來源 VisualElement)
TabIndexDefaultValueCreator()

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
TabStopDefaultValueCreator()

按鈕 View,它會回應觸控事件。

(繼承來源 VisualElement)
UnapplyBindings()

取消套用所有先前設定的繫結。

(繼承來源 BindableObject)
Unfocus()

取消將焦點設定至此項目。

(繼承來源 VisualElement)
UpdateFormsText(String, TextTransform)

按鈕 View,它會回應觸控事件。

事件

BatchCommitted

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
BindingContextChanged

每當 BindingContext 屬性變更時引發。

(繼承來源 BindableObject)
ChildAdded

只要將子項目新增至項目時就發生。

(繼承來源 Element)
ChildRemoved

只要從項目移除子項目時就發生。

(繼承來源 Element)
ChildrenReordered

在 VisualElement 的子系已重新排序時發生。

(繼承來源 VisualElement)
Clicked

發生於按一下 Button 時。

DescendantAdded

只要將子項目新增至項目樹狀子目錄時即發生。

(繼承來源 Element)
DescendantRemoved

只要從項目樹狀子目錄移除子項目時即發生。

(繼承來源 Element)
FocusChangeRequested

供 Xamarin.Forms 平台內部使用。

(繼承來源 VisualElement)
Focused

在項目取得焦點時發生。

(繼承來源 VisualElement)
MeasureInvalidated

視覺項目配置失效時所引發的事件。

(繼承來源 VisualElement)
PlatformSet
已過時。

按鈕 View,它會回應觸控事件。

(繼承來源 Element)
Pressed

在按下按鈕時發生。

PropertyChanged

在屬性變更時引發。

(繼承來源 BindableObject)
PropertyChanging

在屬性即將變更時引發。

(繼承來源 BindableObject)
Released

在放開按鈕時發生。

SizeChanged

當這個項目的 Width 或 Height 屬性變更值時發生。

(繼承來源 VisualElement)
Unfocused

在項目失去焦點時發生。

(繼承來源 VisualElement)

明確介面實作

IBorderElement.BorderColorDefaultValue

供 Xamarin.Forms 平台內部使用。

IBorderElement.BorderWidthDefaultValue

供 Xamarin.Forms 平台內部使用。

IBorderElement.CornerRadiusDefaultValue

供 Xamarin.Forms 平台內部使用。

IBorderElement.IsBackgroundColorSet()

供 Xamarin.Forms 平台內部使用。

IBorderElement.IsBackgroundSet()

按鈕 View,它會回應觸控事件。

IBorderElement.IsBorderColorSet()

供 Xamarin.Forms 平台內部使用。

IBorderElement.IsBorderWidthSet()

供 Xamarin.Forms 平台內部使用。

IBorderElement.IsCornerRadiusSet()

供 Xamarin.Forms 平台內部使用。

IBorderElement.OnBorderColorPropertyChanged(Color, Color)

供 Xamarin.Forms 平台內部使用。

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

供 Xamarin.Forms 平台內部使用。

(繼承來源 BindableObject)
IElementController.SetValueFromRenderer(BindableProperty, Object)

供 Xamarin.Forms 平台內部使用。

(繼承來源 Element)
IFontElement.FontSizeDefaultValueCreator()

供 Xamarin.Forms 平台內部使用。

IFontElement.OnFontAttributesChanged(FontAttributes, FontAttributes)

供 Xamarin.Forms 平台內部使用。

IFontElement.OnFontChanged(Font, Font)

供 Xamarin.Forms 平台內部使用。

IFontElement.OnFontFamilyChanged(String, String)

供 Xamarin.Forms 平台內部使用。

IFontElement.OnFontSizeChanged(Double, Double)

供 Xamarin.Forms 平台內部使用。

IGestureController.CompositeGestureRecognizers

供 Xamarin.Forms 平台內部使用。

(繼承來源 View)
IImageController.GetLoadAsAnimation()

按鈕 View,它會回應觸控事件。

IImageController.SetIsLoading(Boolean)

供 Xamarin.Forms 平台內部使用。

IImageElement.Aspect

供 Xamarin.Forms 平台內部使用。

IImageElement.IsAnimationPlaying

按鈕 View,它會回應觸控事件。

IImageElement.IsLoading

按鈕 View,它會回應觸控事件。

IImageElement.IsOpaque

供 Xamarin.Forms 平台內部使用。

IImageElement.OnImageSourceSourceChanged(Object, EventArgs)

按鈕 View,它會回應觸控事件。

IImageElement.RaiseImageSourcePropertyChanged()

供 Xamarin.Forms 平台內部使用。

IImageElement.Source

供 Xamarin.Forms 平台內部使用。

INameScope.RegisterName(String, Object)

僅供內部使用。

(繼承來源 Element)
IVisualElementController.EffectiveFlowDirection

取得平台上項目的有效視覺流程方向,並將地區設定和邏輯流程設定納入考量。

(繼承來源 VisualElement)
IVisualElementController.InvalidateMeasure(InvalidationTrigger)

此方法供內部使用。

(繼承來源 VisualElement)

擴充方法

AbortAnimation(IAnimatable, String)

停止動畫。

Animate(IAnimatable, String, Action<Double>, Double, Double, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)

設定指定參數並開始動畫。

Animate(IAnimatable, String, Action<Double>, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)

設定指定參數並開始動畫。

Animate(IAnimatable, String, Animation, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)

設定指定參數並開始動畫。

Animate<T>(IAnimatable, String, Func<Double,T>, Action<T>, UInt32, UInt32, Easing, Action<T,Boolean>, Func<Boolean>)

設定指定參數並開始動畫。

AnimateKinetic(IAnimatable, String, Func<Double,Double,Boolean>, Double, Double, Action)

設定指定參數並開始動態動畫。

AnimationIsRunning(IAnimatable, String)

傳回布林值,指出由 handle 指定的動畫是否正在執行中。

Batch(IAnimatable)

按鈕 View,它會回應觸控事件。

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

按鈕 View,它會回應觸控事件。

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

按鈕 View,它會回應觸控事件。

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

建立並將繫結套用至屬性。

SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String)
已過時。

從運算式建立及套用繫結。

SetOnAppTheme<T>(BindableObject, BindableProperty, T, T)

按鈕 View,它會回應觸控事件。

FindByName<T>(Element, String)

傳回包含 element 的範圍中具有 name 名稱的 T 類型執行個體。

FindNextElement(ITabStopElement, Boolean, IDictionary<Int32,List<ITabStopElement>>, Int32)

按鈕 View,它會回應觸控事件。

GetSortedTabIndexesOnParentPage(VisualElement)

按鈕 View,它會回應觸控事件。

GetTabIndexesOnParentPage(ITabStopElement, Int32)

按鈕 View,它會回應觸控事件。

FadeTo(VisualElement, Double, UInt32, Easing)

傳回僅根據 opacitylengtheasing 參數描述的內容執行淡化的工作。

LayoutTo(VisualElement, Rectangle, UInt32, Easing)

傳回一個工作,其可將 view 所指定 VisualElement 的邊界,緩移為 bounds 參數所指定的矩形。

RelRotateTo(VisualElement, Double, UInt32, Easing)

view 所指定的 VisualElement,從其目前的旋轉,加以旋轉 drotation

RelScaleTo(VisualElement, Double, UInt32, Easing)

傳回將 view 所指定 VisualElement 從其目前大小縮放至 dscale 的工作。

RotateTo(VisualElement, Double, UInt32, Easing)

傳回執行由 rotationlengtheasing 參數所描述旋轉的工作。

RotateXTo(VisualElement, Double, UInt32, Easing)

傳回透過 opacity,耗費時間 length 及使用 easing 扭曲 Y 軸的工作。

RotateYTo(VisualElement, Double, UInt32, Easing)

傳回透過 opacity 耗費時間 length 及使用 easing 扭曲 X 軸的工作。

ScaleTo(VisualElement, Double, UInt32, Easing)

傳回將 view 所指定 VisualElement 縮放至絕對縮放比例 scale 的工作。

ScaleXTo(VisualElement, Double, UInt32, Easing)

按鈕 View,它會回應觸控事件。

ScaleYTo(VisualElement, Double, UInt32, Easing)

按鈕 View,它會回應觸控事件。

TranslateTo(VisualElement, Double, Double, UInt32, Easing)

將項目 TranslationX 和 TranslationY 屬性,從其目前的值動畫顯示為新值。 這可確保輸入配置在與視覺效果配置相同的位置。

HasVisualStateGroups(VisualElement)

如果 element 具有一或多個與其建立關聯的視覺狀態群組,則傳回 true。 否則傳回 false

適用於