BoxView 类

定义

程序集:Xamarin.Forms.Core.dll

用于绘制纯色矩形的 View。A View used to draw a solid colored rectangle.

本文内容

[Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._BoxViewRenderer))]

public class BoxView : Xamarin.Forms.View, Xamarin.Forms.IElementConfiguration

type BoxView = class

inherit View

interface IElementConfiguration

注解

在执行初始原型时,BoxView 是图像或自定义元素的有用的。BoxView is a useful stand-in for images or custom elements when doing initial prototyping. BoxView 的默认大小请求为40x40。BoxView has a default size request of 40x40. If you need a different size, assign the WidthRequest and HeightRequest properties.

下面的示例创建一个红色 BoxView ,其默认宽度和高度为默认值。The example below creates a red BoxView with the default width and height.

下面的示例演示了一个基本用途:The following example shows a basic use:

using System;

using Xamarin.Forms;

namespace FormsGallery

{

class BoxViewDemoPage : ContentPage

{

public BoxViewDemoPage()

{

Label header = new Label

{

Text = "BoxView",

Font = Font.BoldSystemFontOfSize(50),

HorizontalOptions = LayoutOptions.Center

};

BoxView boxView = new BoxView

{

Color = Color.Accent,

WidthRequest = 150,

HeightRequest = 150,

HorizontalOptions = LayoutOptions.Center,

VerticalOptions = LayoutOptions.CenterAndExpand

};

// Accomodate iPhone status bar.

this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);

// Build the page.

this.Content = new StackLayout

{

Children =

{

header,

boxView

}

};

}

}

}

构造函数

初始化 BoxView 类的新实例。Initializes a new instance of the BoxView class.

字段

标识 Color 可绑定属性。Identifies the Color bindable property.

属性

获取或设置任何转换的中心点的 X 部分,相对于元素的边界。Gets or sets the X component of the center point for any transform, relative to the bounds of the element. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置任何转换的中心点的 Y 部分,相对于元素的边界。Gets or sets the Y component of the center point for any transform, relative to the bounds of the element. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置允许自动化框架查找此元素并与其交互的值。Gets or sets a value that allows the automation framework to find and interact with this element.

(继承自 Element)

获取或设置将填充 VisualElement 背景的颜色。Gets or sets the color which will fill the background of a VisualElement. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

获取与此元素关联的 Behavior 列表。Gets the list of Behaviors associated to this element. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置对象,该对象包含将被属于此 BindableObject 的绑定属性设定为目标的属性。Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.

(继承自 BindableObject)

获取元素的边界。Gets the bounds of the element.

(继承自 VisualElement)

获取或设置用于标识语义相似元素集合的值。Gets or sets a value used to identify a collection of semantically similar elements.

(继承自 Element)

获取或设置矩形的填充颜色。Gets or sets the color which will fill the rectangle. 这是一种可绑定属性。This is a bindable property.

获取或设置框视图的圆角半径。Gets or sets the corner radius for the box view.

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

应用于此项的效果列表。A list of the effects that are applied to this item.

(继承自 Element)

获取或设置布局流方向。Gets or sets the layout flow direction.

(继承自 VisualElement)

获取视图的手势控制器。Gets the gesture controller for the view.

(继承自 View)

与此视图关联的手势识别器的集合。The collection of gesture recognizers associated with this view.

(继承自 View)

获取此元素的当前呈现高度。Gets the current rendered height of this element. 这是一种只读可绑定属性。This is a read-only bindable property.

(继承自 VisualElement)

获取或设置此元素的所需高度替代。Gets or sets the desired height override of this element.

(继承自 VisualElement)

获取或设置 LayoutOptions,它定义元素在布局周期中的布局方式。Gets or sets the LayoutOptions that define how the element gets laid in a layout cycle. 这是一种可绑定属性。This is a bindable property.

(继承自 View)

获取可用于通过运行应用程序唯一地标识元素的值。Gets a value that can be used to uniquely identify an element through the run of an application.

(继承自 Element)

获取或设置一个值,该值指示此元素是否应涉及用户交互周期。Gets or sets a value indicating whether this element should be involved in the user interaction cycle. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置一个值,该值指示是否在用户界面中启用此元素。Gets or sets a value indicating whether this element is enabled in the user interface. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取一个值,该值指示当前是否聚焦此元素。Gets a value indicating whether this element is focused currently. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

获取或设置指明此元素是否包含在选项卡导航中的值。Gets or sets a value that indicates whether this element is included in tab navigation. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置一个值,该值确定此元素是否应属于可视化树的一部分。Gets or sets a value that determines whether this elements should be part of the visual tree or not. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

获取或设置视图的边距。Gets or sets the margin for the view.

(继承自 View)

获取或设置一个值,该值将替代元素在布局期间请求的最小高度。Gets or sets a value which overrides the minimum height the element will request during layout.

(继承自 VisualElement)

获取或设置一个值,该值将替代元素在布局期间请求的最小宽度。Gets or sets a value which overrides the minimum width the element will request during layout.

(继承自 VisualElement)

获取或设置呈现元素时应用于元素的不透明度值。Gets or sets the opacity value applied to the element when it is rendered. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置元素的父元素。Gets or sets the parent element of the element.

(继承自 Element)

已过时。

获取作为 VisualElement 的此元素的最近的上级元素。Gets the element which is the closest ancestor of this element that is a VisualElement.

(继承自 Element)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

获取或设置本地资源字典。Gets or sets the local resource dictionary.

(继承自 VisualElement)

获取或设置呈现元素时围绕 Z 轴的旋转(仿射旋转)。Gets or sets the rotation about the Z-axis (affine rotation) when the element is rendered.

(继承自 VisualElement)

获取或设置呈现元素时围绕 X 轴的旋转(透视旋转)。Gets or sets the rotation about the X-axis (perspective rotation) when the element is rendered.

(继承自 VisualElement)

获取或设置呈现元素时围绕 Y 轴的旋转(透视旋转)。Gets or sets the rotation about the Y-axis (perspective rotation) when the element is rendered.

(继承自 VisualElement)

获取或设置应用于元素的比例因子。Gets or sets the scale factor applied to the element.

(继承自 VisualElement)

获取或设置要应用于 X 方向的缩放值。Gets or sets a scale value to apply to the X direction.

(继承自 VisualElement)

获取或设置要应用于 Y 方向的缩放值。Gets or sets a scale value to apply to the Y direction.

(继承自 VisualElement)

获取或设置用于唯一地标识元素的用户定义的值。Gets or sets a user defined value to uniquely identify the element.

(继承自 Element)

获取或设置元素的 X 转换增量。Gets or sets the X translation delta of the element.

(继承自 VisualElement)

获取或设置元素的 Y 转换增量。Gets or sets the Y translation delta of the element.

(继承自 VisualElement)

获取与此元素关联的 Trigger 列表。Gets the list of Trigger associated to this element. 这是一种可绑定属性。This is a bindable property.

(继承自 VisualElement)

获取或设置 LayoutOptions,它定义元素在布局周期中的布局方式。Gets or sets the LayoutOptions that define how the element gets laid in a layout cycle. 这是一种可绑定属性。This is a bindable property.

(继承自 View)

获取此元素的当前呈现宽度。Gets the current rendered width of this element. 这是一种只读可绑定属性。This is a read-only bindable property.

(继承自 VisualElement)

获取或设置此元素的所需宽度替代。Gets or sets the desired width override of this element.

(继承自 VisualElement)

获取此元素的当前 X 位置。Gets the current X position of this element. 这是一种只读可绑定属性。This is a read-only bindable property.

(继承自 VisualElement)

获取此元素的当前 Y 位置。Gets the current Y position of this element. 这是一种只读可绑定属性。This is a read-only bindable property.

(继承自 VisualElement)

方法

表示开始对元素属性进行批更改。Signals the start of a batch of changes to the elements properties.

(继承自 VisualElement)

表示元素命令批处理结束,且现在应提交命令。Signals the end of a batch of commands to the element and that those commands should now be committed.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

清除由 SetValue 为 property 设置的任何值。Clears any value set by SetValue for property.

(继承自 BindableObject)

清除由 SetValue 为 propertyKey 标识的属性设置的任何值。Clears any value set by SetValue for the property that is identified by propertyKey.

(继承自 BindableObject)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

返回具有指定名称的元素。Returns the element that has the specified name.

(继承自 Element)

尝试将焦点设定到此元素上。Attemps to set focus to this element.

(继承自 VisualElement)

返回在指定的 point 下可见的子元素。Returns the child elements that are visually beneath the specified point.

(继承自 View)

已过时。

Returns the SizeRequest of the element. 调用此方法开始布局循环的测量过程。Calling this method begins the measure pass of a layout cycle.

(继承自 VisualElement)

返回 BindableProperty 中包含的值。Returns the value that is contained in the BindableProperty.

(继承自 BindableObject)

已过时。

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 BindableObject)

已过时。

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 BindableObject)

调用此方法以使此 VisualElement 的布局无效。Method that is called to invalidate the layout of this VisualElement.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

如果目标属性存在并且已设置,则返回 true。Returns true if the target property exists and has been set.

(继承自 BindableObject)

在布局循环中更新元素的边界。Updates the bounds of the element during the layout cycle.

(继承自 VisualElement)

返回在设备上显示可视元素所需的最小大小。Returns the minimum size that a visual element needs in order to be displayed on the device.

(继承自 VisualElement)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

返回此 BoxView 的特定于平台的实例,可对其调用特定于平台的方法。Returns the platform-specific instance of this BoxView, on which a platform-specific method may be called.

每当 View 的绑定上下文发生更改时就会调用。Invoked whenever the binding context of the View changes. 重写此方法可为此事件添加类处理。Override this method to add class handling for this event.

(继承自 View)

应用程序开发者可以重写此方法以在添加子级时进行响应。Application developers can override this method to respond when a child is added.

(继承自 VisualElement)

应用程序开发者可以重写此方法以在删除子级时进行响应。Application developers can override this method to respond when a child is removed.

(继承自 VisualElement)

Invoked whenever the ChildrenReordered event is about to be emitted. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

(继承自 VisualElement)

进行布局测量时调用的方法。Method that is called when a layout measurement happens.

(继承自 VisualElement)

更改绑定属性时调用的方法。Method that is called when a bound property is changed.

(继承自 Element)

从子类调用此方法以通知属性将要发生更改。Call this method from a child class to notify that a change is going to happen on a property.

(继承自 BindableObject)

在布局循环过程中设置元素的大小时调用此方法。This method is called when the size of the element is set during a layout cycle. 在发出 SizeChanged 事件之前直接调用此方法。This method is called directly before the SizeChanged event is emitted. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

(继承自 VisualElement)

已过时。

对盒视图提出大小请求时调用的方法。Method that is called when a size request is made to the box view.

删除先前设置的绑定。Removes a previously set binding.

(继承自 BindableObject)

移除先前设置的动态资源Removes a previously set dynamic resource

(继承自 Element)

将此元素的 BindableProperty 属性设置为通过 DynamicResource 使用提供的键来更新。Sets the BindableProperty property of this element to be updated via the DynamicResource with the provided key.

(继承自 Element)

设置指定属性的值。Sets the value of the specified property.

(继承自 BindableObject)

设置 propertyKey 的值。Sets the value of the propertyKey.

(继承自 BindableObject)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 BindableObject)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

在布局循环过程中调用 SizeAllocated 以指示子树布局的开始。SizeAllocated is called during a layout cycle to signal the start of a sub-tree layout.

(继承自 VisualElement)

不应用所有以前设置的绑定。Unapplies all previously set bindings.

(继承自 BindableObject)

取消设置此元素的焦点。Unsets focus to this element.

(继承自 VisualElement)

事件

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

每当将子元素添加到元素时就会发生。Occurs whenever a child element is added to the element.

(继承自 Element)

每当从元素中删除子元素时就会发生。Occurs whenever a child element is removed from the element.

(继承自 Element)

重新排序 VisualElement 的子级时发生。Occurs when the Children of a VisualElement have been re-ordered.

(继承自 VisualElement)

每当将子元素添加到元素子树时就会发生。Occurs whenever a child element is added to the elements subtree.

(继承自 Element)

每当从元素子树中删除子元素时就会发生。Occurs whenever a child element is removed from the elements subtree.

(继承自 Element)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 VisualElement)

元素接收焦点时发生。Occurs when the element receives focus.

(继承自 VisualElement)

可视元素的布局无效时引发的事件。Event that is raised when the layout of a visual element is invalidated.

(继承自 VisualElement)

在属性已更改时引发。Raised when a property has changed.

(继承自 BindableObject)

在属性将要更改时引发。Raised when a property is about to change.

(继承自 BindableObject)

当此元素上的 Width 或 Height 属性的值发生更改时发生。Occurs when either the Width or the Height properties change value on this element.

(继承自 VisualElement)

当元素丢失焦点时发生。Occurs when the element loses focus.

(继承自 VisualElement)

显式接口实现

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 Element)

供 Xamarin.Forms 平台内部使用。For internal use by the Xamarin.Forms platform.

(继承自 View)

获取平台上元素的有效可视流方向,考虑区域设置和逻辑流设置。Gets the effective visual flow direction for the element on the platform, taking into account the locale and logical flow settings.

(继承自 VisualElement)

扩展方法

返回一个布尔值,该值指示 handle 指定的动画是否正在运行。Returns a Boolean value that indicates whether or not the animation that is specified by handle is running.

返回包含 element 的作用域中名称为 name 的类型 T 的实例。Returns the instance of type T that has name name in the scope that includes element.

返回一个任务,它执行 opacity、length 和 easing 参数描述的淡化。Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

返回一个任务,它将 view 指定的 VisualElement 的边界简化为 bounds 参数指定的矩形。Returns a task that eases the bounds of the VisualElement that is specified by the view to the rectangle that is specified by the bounds parameter.

从当前旋转将 view 指定的 VisualElement 旋转为 drotation。Rotates the VisualElement that is specified by view from its current rotation by drotation.

返回一个任务,它将 view 指定的 VisualElement 从其当前比例缩放到 dscale。Returns a task that scales the VisualElement that is specified by view from its current scale to dscale.

返回一个任务,它执行 rotation、length 和 easing 参数描述的旋转。Returns a task that performs the rotation that is described by the rotation, length, and easing parameters.

返回将 Y 轴倾斜 opacity 的任务,花费时间 length 并使用 easing。Returns a task that skews the Y axis by opacity, taking time length and using easing.

返回将 X 轴倾斜 opacity 的任务,花费时间 length 并使用 easing。Returns a task that skews the X axis by opacity, taking time length and using easing.

返回一个任务,它将 view 指定的 VisualElement 缩放到绝对比例因子 scale。Returns a task that scales the VisualElement that is specified by view to the absolute scale factor scale.

将元素 TranslationX 和 TranslationY 属性从其当前值动画处理为新的值。Animates an elements TranslationX and TranslationY properties from their current values to the new values. 这可确保输入布局与视觉对象布局处于同一位置。This ensures that the input layout is in the same position as the visual layout.

如果 element 具有与之关联的一个或多个可视状态组,则返回 true。Returns true if element has one or more visual state groups associated with it. 否则返回 false。Otherwise, returns false.

适用于

xamarin可视 对讲_BoxView 类 (Xamarin.Forms) | Microsoft Docs相关推荐

  1. xamarin可视 对讲_c#语音对讲demo

    [实例简介] 开启前输入对方IP点击录音然后发送即可 [实例截图] [核心代码] using NAudio.CoreAudioApi; using NAudio.Wave; using Netfram ...

  2. 查看计算机上隐藏用户,隐藏或显示 InetOrgPerson 对象类 - Windows Server | Microsoft Docs...

    隐藏或显示 Active Directory 用户和计算机中的 InetOrgPerson 对象类 09/18/2020 本文内容 本文介绍如何隐藏或显示 Active Directory 用户和计算 ...

  3. Xamarin开发笔记—设备类amp;第三方弹窗的使用和注意事项

    一.设备类是Xamarin重要开发组成部分,下面介绍一下设备类的主要用法: //唤醒打电话 Device.OpenUri(new Uri("tel:180xxxxxxxx")); ...

  4. Xamarin开发笔记—设备类第三方弹窗的使用和注意事项

    一.设备类是Xamarin重要开发组成部分,下面介绍一下设备类的主要用法: //唤醒打电话 Device.OpenUri(new Uri("tel:180xxxxxxxx"));/ ...

  5. xamarin.android 控件,Android 库控件 - Xamarin | Microsoft Docs

    Xamarin Android 库控件Xamarin.Android Gallery control 03/15/2018 本文内容 Gallery是一种布局小组件,用于显示水平滚动列表中的项,并将当 ...

  6. xamarin.forms_重构:从Xamarin Native到Xamarin.Forms

    xamarin.forms 介绍 (Introduction) Before you actually start developing a mobile app, you have to make ...

  7. Xamarin XAML语言教程使用Xamarin Studio创建XAML(二)

    Xamarin XAML语言教程使用Xamarin Studio创建XAML(二) 使用Xamarin Studio创建XAML Xamarin Studio和Visual Studio创建XAML文 ...

  8. IP网络电话技术与IP可视对讲技术的比较

    IP网络电话技术与IP可视对讲技术的比较 2007/12/13 近几年,随着IP可视对讲技术的逐渐成熟,IP可视对讲产品也逐步得到了普及应用.然而,一些厂家为了节省庞大的研发费用,将IP网络电话技术直 ...

  9. android 电话回音消除,智能门铃中可视对讲的回音消除

    原标题:智能门铃中可视对讲的回音消除 智能家居市场火爆已久,无论是大厂家.还是小品牌都在其中奋战,比较常见的智能家居有插座.门锁.音箱等,这些产品的竞争早已白热化,而在硝烟四起的智能家居领域,智能门铃 ...

最新文章

  1. 数据分析模块pandas
  2. 【BZOJ】4873: [Shoi2017]寿司餐厅
  3. HTML去掉列表前面的符号!
  4. 考研数学三考摆线吗_考研数学,需要从课本开始吗?这样会不会比较慢?
  5. React Native之AppRegistry模块
  6. 简而言之,JUnit:另一个JUnit教程
  7. C语言 const 和 define 区别 - C语言零基础入门教程
  8. 【BZOJ2342】双倍回文,manacher+并查集优化
  9. Rust: 如何在Windows下Atom中配置Rust环境?
  10. 商城app源码_多商户商城源码系统有什么优势呢?
  11. sap服务器安全证书,SAP安全登录单
  12. Android 开 发 资 源 分 享
  13. windows操作系统未关闭默认共享
  14. 外贸开发信用什么邮箱好?这个邮箱靓号注册网站不要错过
  15. 职业生涯自我规划五步法
  16. 【Vue3】vue3的keepAlive保存滚动位置
  17. 记忆犹新的定时任务的bug
  18. 2021阳城一中高考成绩查询,山西高考分数线,晋城一中、阳城一中高考捷报这里都有...
  19. Map中可以作为Key的类型
  20. FPGA开发板XILINX-K7核心板Kintex7 XC7K325 410T工业级

热门文章

  1. 【Python-基础】第二章 七十二变(杨淑娟)
  2. 计算机专业复试面试英语口语问题,考研复试英语口语面试经典问题集锦.doc
  3. 程序员延寿指南、如何活得更长
  4. 通检检测技术有限公司-TCD-提供灯具CE检测认证
  5. rabbitmq安装、卸载重装及错误排查
  6. memset函数的使用原理
  7. SerialPort使用
  8. python 几行代码生成动态表情包(生成gif动图)
  9. 小程序容器解决OA系统数字化升级难题?
  10. dell optiplex 3050 aio 重装系统USB总线驱动安装不成功问题解决