VisualElement 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。
public class VisualElement : Xamarin.Forms.NavigableElement, Xamarin.Forms.IAnimatable, Xamarin.Forms.ITabStopElement, Xamarin.Forms.IVisualElementController
type VisualElement = class
inherit NavigableElement
interface IAnimatable
interface IVisualElementController
interface IElementController
interface ITabStopElement
- 繼承
- 衍生
- 實作
備註
大部分 Xamarin 的基類。Forms 畫面上的元素。 提供大部分的屬性、事件和方法,以在畫面上呈現專案。
建構函式
| VisualElement() |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
欄位
| AnchorXProperty |
識別 AnchorX 可繫結屬性。 |
| AnchorYProperty |
識別 AnchorY 可繫結屬性。 |
| BackgroundColorProperty |
識別 BackgroundColor 可繫結屬性。 |
| BackgroundProperty |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| BehaviorsProperty |
識別 Behaviors 可繫結屬性。 |
| ClipProperty |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| FlowDirectionProperty |
FlowDirection 屬性的備份存放區。 |
| HeightProperty |
識別 Height 可繫結屬性。 |
| HeightRequestProperty |
HeightRequest 屬性的備份存放區。 |
| InputTransparentProperty |
識別 InputTransparent 可繫結屬性。 |
| IsEnabledProperty |
識別 IsEnabled 可繫結屬性。 |
| IsFocusedProperty |
識別 IsFocused 可繫結屬性。 |
| IsFocusedPropertyKey |
供 Xamarin.Forms 平台內部使用。 |
| IsTabStopProperty |
IsTabStop 欄位的備份存放區。 |
| IsVisibleProperty |
識別 IsVisible 可繫結屬性。 |
| MinimumHeightRequestProperty |
MinimumHeightRequest 屬性的備份存放區。 |
| MinimumWidthRequestProperty |
MinimumWidthRequest 屬性的備份存放區。 |
| NavigationProperty |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| OpacityProperty |
識別 Opacity 可繫結屬性。 |
| RotationProperty |
識別 Rotation 可繫結屬性。 |
| RotationXProperty |
識別 RotationX 可繫結屬性。 |
| RotationYProperty |
識別 RotationY 可繫結屬性。 |
| ScaleProperty |
識別 Scale 可繫結屬性。 |
| ScaleXProperty |
ScaleX 屬性的備份存放區。 |
| ScaleYProperty |
ScaleY 屬性的備份存放區。 |
| StyleProperty |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| TabIndexProperty |
TabIndex 欄位的備份存放區。 |
| TranslationXProperty |
識別 TranslationX 可繫結屬性。 |
| TranslationYProperty |
識別 TranslationY 可繫結屬性。 |
| TriggersProperty |
識別 Triggers 可繫結屬性。 |
| VisualProperty |
Visual 欄位的備份存放區。 |
| WidthProperty |
識別 Width 可繫結屬性。 |
| WidthRequestProperty |
WidthRequest 屬性的備份存放區。 |
| XProperty |
識別 X 可繫結屬性。 |
| YProperty |
識別 Y 可繫結屬性。 |
屬性
| AnchorX |
取得或設定任何轉換內中心點的 X 元件 (相對於項目界限)。 這是可繫結屬性。 |
| AnchorY |
取得或設定任何轉換內中心點的 Y 元件 (相對於項目界限)。 這是可繫結屬性。 |
| AutomationId |
取得或設定值,允許自動化架構尋找此項目並與之互動。 (繼承來源 Element) |
| Background |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| BackgroundColor |
取得或設定將會填滿 VisualElement 背景的色彩。 這是可繫結屬性。 |
| Batched |
供 Xamarin.Forms 平台內部使用。 |
| Behaviors |
取得與此元素關聯的行為清單。 這是可繫結屬性。 |
| BindingContext |
取得或設定物件,這個物件包含屬於此 BindableObject 屬性繫結屬性將設為目標的屬性。 (繼承來源 BindableObject) |
| Bounds |
取得項目的界限。 |
| class |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 NavigableElement) |
| ClassId |
取得或設定值,用來識別語意類似項目的集合。 (繼承來源 Element) |
| Clip |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| DisableLayout |
供 Xamarin.Forms 平台內部使用。 |
| Dispatcher |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 BindableObject) |
| EffectControlProvider |
供 Xamarin.Forms 平台內部使用。 (繼承來源 Element) |
| Effects |
套用至此項目的效果清單。 (繼承來源 Element) |
| FlowDirection |
取得或設定配置流程方向。 |
| Height |
取得此項目的目前呈現高度。 這是唯讀的可繫結屬性。 |
| HeightRequest |
取得或設定此項目所需的高度覆寫項。 |
| Id |
取得值,可用來在應用程式執行期間唯一識別項目。 (繼承來源 Element) |
| InputTransparent |
取得或設定值,這個值指出是否應該在使用者互動週期中包含此項目。 這是可繫結屬性。 |
| IsEnabled |
取得或設定值,這個值指出使用者介面中是否已啟用此項目。 這是可繫結屬性。 |
| IsFocused |
取得值,這個值指出此項目目前是否為焦點。 這是可繫結屬性。 |
| IsInNativeLayout |
供 Xamarin.Forms 平台內部使用。 |
| IsNativeStateConsistent |
供 Xamarin.Forms 平台內部使用。 |
| IsPlatformEnabled |
供 Xamarin.Forms 平台內部使用。 |
| IsTabStop |
取得或設定值,這個值表示此元素是否包含於索引標籤巡覽。 這是可繫結屬性。 |
| IsVisible |
取得或設定值,這個值會決定此項目是否應成為視覺化樹狀結構的一部分。 這是可繫結屬性。 |
| LogicalChildren |
供 Xamarin.Forms 平台內部使用。 (繼承來源 Element) |
| MinimumHeightRequest |
取得或設定值,這個值會覆寫項目在配置期間要求的最小高度。 |
| MinimumWidthRequest |
取得或設定值,這個值會覆寫項目在配置期間要求的最小寬度。 |
| Navigation |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 NavigableElement) |
| NavigationProxy |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 NavigableElement) |
| Opacity |
取得或設定套用至項目 (呈現時) 的不透明度值。 這是可繫結屬性。 |
| Parent |
取得或設定項目的父項目。 (繼承來源 Element) |
| ParentView |
已淘汰.
取得即此項目最接近上階的項目,而此項目是 VisualElement。 (繼承來源 Element) |
| Platform |
已淘汰.
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 Element) |
| RealParent |
供 Xamarin.Forms 平台內部使用。 (繼承來源 Element) |
| Resources |
取得或設定本機資源字典。 |
| Rotation |
取得或設定呈現元素時繞著 Z 軸 (仿射旋轉) 的旋轉 (度)。 |
| RotationX |
取得或設定呈現元素時繞著 X 軸 (透視旋轉) 的旋轉 (度)。 |
| RotationY |
取得或設定呈現元素時繞著 Y 軸 (透視旋轉) 的旋轉 (度)。 |
| Scale |
取得或設定套用至項目的縮放比例。 |
| ScaleX |
取得或設定要套用至 X 方向的小數位數值。 |
| ScaleY |
取得或設定要套用至 Y 方向的小數位數值。 |
| Style |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 NavigableElement) |
| StyleClass |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 NavigableElement) |
| StyleId |
取得或設定使用者定義值來唯一識別項目。 (繼承來源 Element) |
| TabIndex |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| TranslationX |
取得或設定項目的 X 轉譯差異。 |
| TranslationY |
取得或設定項目的 Y 轉譯差異。 |
| Triggers |
取得與此項目建立關聯的觸發程序清單。 這是可繫結屬性。 |
| Visual |
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 |
| Width |
取得此項目的目前呈現寬度。 這是唯讀的可繫結屬性。 |
| WidthRequest |
取得或設定此項目所需的寬度覆寫項。 |
| X |
取得此項目的目前 X 位置。 這是唯讀的可繫結屬性。 |
| Y |
取得此項目的目前 Y 位置。 這是唯讀的可繫結屬性。 |
方法
事件
| BatchCommitted |
供 Xamarin.Forms 平台內部使用。 |
| BindingContextChanged |
每當 BindingContext 屬性變更時引發。 (繼承來源 BindableObject) |
| ChildAdded |
只要將子項目新增至項目時就發生。 (繼承來源 Element) |
| ChildRemoved |
只要從項目移除子項目時就發生。 (繼承來源 Element) |
| ChildrenReordered |
在 VisualElement 的子系已重新排序時發生。 |
| DescendantAdded |
只要將子項目新增至項目樹狀子目錄時即發生。 (繼承來源 Element) |
| DescendantRemoved |
只要從項目樹狀子目錄移除子項目時即發生。 (繼承來源 Element) |
| FocusChangeRequested |
供 Xamarin.Forms 平台內部使用。 |
| Focused |
在項目取得焦點時發生。 |
| MeasureInvalidated |
視覺項目配置失效時所引發的事件。 |
| PlatformSet |
已淘汰.
佔用畫面區域的 Element 具有視覺外觀,而且可以取得觸控輸入。 (繼承來源 Element) |
| PropertyChanged |
在屬性變更時引發。 (繼承來源 BindableObject) |
| PropertyChanging |
在屬性即將變更時引發。 (繼承來源 BindableObject) |
| SizeChanged |
當這個項目的 Width 或 Height 屬性變更值時發生。 |
| Unfocused |
在項目失去焦點時發生。 |
明確介面實作
| IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) |
供 Xamarin.Forms 平台內部使用。 (繼承來源 BindableObject) |
| IElementController.SetValueFromRenderer(BindableProperty, Object) |
供 Xamarin.Forms 平台內部使用。 (繼承來源 Element) |
| INameScope.RegisterName(String, Object) |
僅供內部使用。 (繼承來源 Element) |
| IVisualElementController.EffectiveFlowDirection |
取得平台上項目的有效視覺流程方向,並將地區設定和邏輯流程設定納入考量。 |
| IVisualElementController.InvalidateMeasure(InvalidationTrigger) |
此方法供內部使用。 |