Method GetSubViews
GetSubViews(bool, bool, bool)
Gets all SubViews of this View, optionally including SubViews of the View's Adornments (Margin, Border, and Padding).
public virtual IReadOnlyCollection<View> GetSubViews(bool includeMargin = false, bool includeBorder = false, bool includePadding = false)
Parameters
includeMarginboolIf true, includes SubViews from Margin. If false (default), returns only the direct SubViews of this View.
includeBorderboolIf true, includes SubViews from Border. If false (default), returns only the direct SubViews of this View.
includePaddingboolIf true, includes SubViews from Padding. If false (default), returns only the direct SubViews of this View.
Returns
- IReadOnlyCollection<View>
A read-only collection containing all SubViews. If
includeMarginis true, the collection includes SubViews from this View's direct SubViews as well as SubViews from the Margin, Border, and Padding adornments.
Remarks
This method returns a snapshot of the SubViews at the time of the call. The collection is safe to iterate even if SubViews are added or removed during iteration.
The order of SubViews in the returned collection is: