你如何绑定到用户控件的属性?
不隶属于该控件的属性通知接收器。
您还可以定义该控件的属性和方法。
但是如果你想改变自定义控件的属性?
But what if you want to change the property of a custom control?
更新网格控件的属性值,如表格4所示。
Update the attribute values for the grid control as indicated in Table 4.
以灰色文本显示控件的属性。
And by displaying the properties of the control in gray text.
首先,它使获取控件的属性变得容易得多。
First, it makes getting the properties of the controls much easier.
下一步就是遍历控件并按照你的要求修改属性。
The next step is to select and TAB through each property, editing as you go.
设置属性是一个改变控件的简便方法。
现在,无论什么时候您想要执行一个特定的行为,就会知道如何告诉这个控件如何操作(同样是,调用哪种方法或者参考哪个属性)。
Now, whenever you need to perform a certain action, you know how to tell the control how to do it (again, which method to call or property to reference).
最简单的办法就是在控件元素中添加xsi:type属性。
The simplest is to add an xsi: type attribute to the control element. For example.
通过属性和事件模型实现的完整的地图控件。
Fully implemented map control with property and event model.
列表2:获取控件的所有属性。
设置了控件的标题或文本属性(如果有)的值。
Sets the value of the control's Caption or Text property (if any).
可以用过控件的Name属性给控件命名, 在Visual Studio的属性面板以及XAML视图中设置都可以。
You can change the name of a control by setting its Name property.
不像标准的属性页控件,堆栈窗口的布局是垂直的。
Unlike standard property sheet control layout of stack window is vertical.
对于每个控件,可以重写每个目标设备的属性。
For each control, you can override properties for each target device.
如果将控件设置为单选模式,则此属性将返回一个选定的项。
If the control is set to single-selection mode, this property returns the one selected item.
如果要绑定控件的其他属性,请重复步骤3到7。
If you want to bind additional properties of the control, repeat steps 3 through 7.
为其声明数据绑定的控件属性。
The control property for which this data binding is declared.
若要在运行时设置控件属性,请参见修改控件的运行时行为。
To set control properties at run time, see Modifying a control's Run-Time Behavior.
将指定对象转换为关联控件属性的类型。
Converts the specified object to the type of the associated control property.
设置属性时,资源编辑器用指定的值初始化控件。
When you set a property, the Resource editor initializes the control with the specified value.
此属性指定控件中显示的数据项的路径。
This property specifies the path of the data item that is displayed in the control.
添加align属性的继承,编译成控件时便于摆放。
Add Align property inheritance, when the control is compiled into easy to display.
此属性是用于自定义控件的窗口的UI自动化提供程序。
This property is the UI Automation provider for the window of a custom control.
此属性公开的值必须包括它所包含的所有控件。
The value exposed by this property must include all of the controls contained within it.
具体可以查看控件属性中的展现。
此向导页标识控件支持的常用属性。
This page of the wizard identifies the stock properties supported for the control.
此向导页标识控件支持的常用属性。
This page of the wizard identifies the stock properties supported for the control.
应用推荐