ShellContent 类

定义

对应 ShellSection 中包含的 ContentPage

[Xamarin.Forms.ContentProperty("Content")]
public class ShellContent : Xamarin.Forms.BaseShellItem, Xamarin.Forms.IShellContentController
type ShellContent = class
    inherit BaseShellItem
    interface IShellContentController
    interface IElementController
继承
属性
实现

构造函数

ShellContent()

对应 ShellSection 中包含的 ContentPage

字段

ContentProperty

Content 字段的后备存储。

ContentTemplateProperty

ContentTemplate 字段的后备存储。

MenuItemsProperty

MenuItems 字段的后备存储。

属性

AutomationId

获取或设置允许自动化框架查找此元素并与其交互的值。

(继承自 Element)
BindingContext

获取或设置对象,该对象包含将被属于此 BindableObject 的绑定属性设定为目标的属性。

(继承自 BindableObject)
class

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
ClassId

获取或设置用于标识语义相似元素集合的值。

(继承自 Element)
Content

获取或设置 Page

ContentTemplate

获取或设置 ShellContent 可用后要创建的数据模板。

Dispatcher

对应 ShellSection 中包含的 ContentPage

(继承自 BindableObject)
EffectControlProvider

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
Effects

应用于此项的效果列表。

(继承自 Element)
FlyoutIcon

用于项的图标。 如果未设置此属性,则会回退为使用 Icon 属性值。

(继承自 BaseShellItem)
Icon

定义要在不属于浮出控件的镶边部分中显示的图标。

(继承自 BaseShellItem)
Id

获取可用于通过运行应用程序唯一地标识元素的值。

(继承自 Element)
IsChecked

定义项当前是否在浮出控件中突出显示。

(继承自 BaseShellItem)
IsEnabled

定义项是否可在镶边中选择。

(继承自 BaseShellItem)
IsTabStop

指明 FlyoutItem 是否包含在 Tab 导航中。

(继承自 BaseShellItem)
IsVisible

对应 ShellSection 中包含的 ContentPage

(继承自 BaseShellItem)
LogicalChildren

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
MenuItems

MenuItem 实例添加到浮出控件。

Navigation

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
NavigationProxy

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
Parent

获取或设置元素的父元素。

(继承自 Element)
ParentView
已过时.

获取作为 VisualElement 的此元素的最近的上级元素。

(继承自 Element)
Platform
已过时.

对应 ShellSection 中包含的 ContentPage

(继承自 Element)
RealParent

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
Route

用于对项进行寻址的字符串。

(继承自 BaseShellItem)
Style

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
StyleClass

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
StyleId

获取或设置用于唯一地标识元素的用户定义的值。

(继承自 Element)
TabIndex

指明在用户按 Tab 键导航项时 FlyoutItem 对象接收焦点的顺序。

(继承自 BaseShellItem)
Title

要在 UI 中显示的标题。

(继承自 BaseShellItem)

方法

ApplyBindings()

将绑定应用到 BindingContext

(继承自 BindableObject)
ClearValue(BindableProperty)

清除由 SetValueproperty 设置的任何值。

(继承自 BindableObject)
ClearValue(BindablePropertyKey)

清除由 SetValuepropertyKey 标识的属性设置的任何值。

(继承自 BindableObject)
CoerceValue(BindableProperty)

对应 ShellSection 中包含的 ContentPage

(继承自 BindableObject)
CoerceValue(BindablePropertyKey)

对应 ShellSection 中包含的 ContentPage

(继承自 BindableObject)
Descendants()

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
EffectIsAttached(String)

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
FindByName(String)

返回具有指定名称的元素。

(继承自 Element)
GetValue(BindableProperty)

返回 BindableProperty 中包含的值。

(继承自 BindableObject)
GetValues(BindableProperty, BindableProperty)
已过时.

供 Xamarin.Forms 平台内部使用。

(继承自 BindableObject)
GetValues(BindableProperty, BindableProperty, BindableProperty)
已过时.

供 Xamarin.Forms 平台内部使用。

(继承自 BindableObject)
IsSet(BindableProperty)

如果目标属性存在并且已设置,则返回 true

(继承自 BindableObject)
OnAppearing()

对应 ShellSection 中包含的 ContentPage

(继承自 BaseShellItem)
OnBindingContextChanged()

每当元素的绑定上下文发生更改时就会调用。 实现此方法可为此事件添加类处理。

(继承自 Element)
OnChildAdded(Element)

对应 ShellSection 中包含的 ContentPage

OnChildRemoved(Element)
已过时.

对应 ShellSection 中包含的 ContentPage

OnChildRemoved(Element, Int32)

对应 ShellSection 中包含的 ContentPage

OnDisappearing()

对应 ShellSection 中包含的 ContentPage

(继承自 BaseShellItem)
OnParentSet()

对应 ShellSection 中包含的 ContentPage

(继承自 NavigableElement)
OnPropertyChanged(String)

只要属性发生更改,就会调用。

(继承自 BaseShellItem)
OnPropertyChanging(String)

从子类调用此方法以通知属性将要发生更改。

(继承自 BindableObject)
OnTabIndexPropertyChanged(Int32, Int32)

只要 TabIndex 属性发生更改,就会调用。

(继承自 BaseShellItem)
OnTabStopPropertyChanged(Boolean, Boolean)

只要 IsTabStop 属性发生更改,就会调用。

(继承自 BaseShellItem)
RemoveBinding(BindableProperty)

删除先前设置的绑定。

(继承自 BindableObject)
RemoveDynamicResource(BindableProperty)

移除先前设置的动态资源

(继承自 Element)
SetBinding(BindableProperty, BindingBase)

向属性分配绑定。

(继承自 BindableObject)
SetDynamicResource(BindableProperty, String)

将此元素的 BindableProperty 属性设置为通过 DynamicResource 使用提供的键来更新。

(继承自 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)
TabIndexDefaultValueCreator()

调用后可设置 TabIndex 属性的默认值。

(继承自 BaseShellItem)
TabStopDefaultValueCreator()

调用后可设置 TabStop 属性的默认值。

(继承自 BaseShellItem)
UnapplyBindings()

不应用所有以前设置的绑定。

(继承自 BindableObject)

运算符

Implicit(TemplatedPage to ShellContent)

主要供 XAML 使用 ShellContent 隐式打包页面。

事件

Appearing

对应 ShellSection 中包含的 ContentPage

(继承自 BaseShellItem)
BindingContextChanged

只要 BindingContext 属性更改就会引发。

(继承自 BindableObject)
ChildAdded

每当将子元素添加到元素时就会发生。

(继承自 Element)
ChildRemoved

每当从元素中删除子元素时就会发生。

(继承自 Element)
DescendantAdded

每当将子元素添加到元素子树时就会发生。

(继承自 Element)
DescendantRemoved

每当从元素子树中删除子元素时就会发生。

(继承自 Element)
Disappearing

对应 ShellSection 中包含的 ContentPage

(继承自 BaseShellItem)
PlatformSet
已过时.

对应 ShellSection 中包含的 ContentPage

(继承自 Element)
PropertyChanged

在属性已更改时引发。

(继承自 BindableObject)
PropertyChanging

在属性将要更改时引发。

(继承自 BindableObject)

显式接口实现

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

供 Xamarin.Forms 平台内部使用。

(继承自 BindableObject)
IElementController.SetValueFromRenderer(BindableProperty, Object)

供 Xamarin.Forms 平台内部使用。

(继承自 Element)
INameScope.RegisterName(String, Object)

仅限内部使用。

(继承自 Element)
IShellContentController.GetOrCreateContent()

供 Xamarin.Forms 平台内部使用。

IShellContentController.IsPageVisibleChanged

对应 ShellSection 中包含的 ContentPage

IShellContentController.Page

供 Xamarin.Forms 平台内部使用。

IShellContentController.RecyclePage(Page)

供 Xamarin.Forms 平台内部使用。

扩展方法

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

对应 ShellSection 中包含的 ContentPage

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

对应 ShellSection 中包含的 ContentPage

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

创建绑定并将其应用到属性。

SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String)
已过时.

通过表达式创建并应用绑定。

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

对应 ShellSection 中包含的 ContentPage

FindByName<T>(Element, String)

返回包含 element 的作用域中名称为 name 的类型 T 的实例。

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

对应 ShellSection 中包含的 ContentPage

GetTabIndexesOnParentPage(ITabStopElement, Int32)

对应 ShellSection 中包含的 ContentPage

适用于