Version

GetContainerForRecordPresenter Method (ViewBase)

Returns an element that will wrap a RecordPresenter inside it. If no wrapper is required, the method should return null.
Syntax
'Declaration
 
Protected Friend Overridable Function GetContainerForRecordPresenter( _
   ByVal panel As Panel, _
   ByVal record As Record _
) As DependencyObject
protected internal virtual DependencyObject GetContainerForRecordPresenter( 
   Panel panel,
   Record record
)

Parameters

panel
The System.Windows.Controls.Panel derived element that will contain the returned wrapper element.
record
The record that will be associated with the record presenter if recycling or null if not.

Return Value

The container object to use to wrap a RecordPresenter.
Remarks

This method, along with the PrepareContainerForRecordPresenter, only need to be overridden if the view requires a specialized wrapper element around each RecordPresenter element. You would create a wrapper element in this method and associate it with a record presenter in PrepareContainerForRecordPresenter method.

Note: the 'record' parameter will be null unless the RecordContainerGenerationMode is set to 'Recycle' (its default value).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also