Class VisualContainer
Represents a class that provides the common functionalities of Visual container in SfDataGrid.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class VisualContainer : Panel, IScrollableInfo, IScrollInfo, IDisposable
Constructors
VisualContainer()
Initializes a new instance of VisualContainer class.
Declaration
public VisualContainer()
Fields
WantsMouseInputProperty
Declaration
public static readonly DependencyProperty WantsMouseInputProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AllowFixedGroupCaptions
Gets or sets a value indicating whether fixed group captions are allowed or not.
Declaration
public bool AllowFixedGroupCaptions { get; set; }
Property Value
Type |
---|
System.Boolean |
CanHorizontallyScroll
Gets or sets a value indicating whether the scrollbar can be horizontally scrolled or not.
Declaration
public bool CanHorizontallyScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
CanVerticallyScroll
Gets or sets a value indicating whether the scrollbar can be vertically scrolled or not.
Declaration
public bool CanVerticallyScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
ColumnCount
Gets or sets the column count.
Declaration
public int ColumnCount { get; set; }
Property Value
Type |
---|
System.Int32 |
ColumnWidths
Gets the column widths.
Declaration
public IPaddedEditableLineSizeHost ColumnWidths { get; }
Property Value
Type |
---|
IPaddedEditableLineSizeHost |
ExtentHeight
Gets the extent height.
Declaration
public double ExtentHeight { get; }
Property Value
Type |
---|
System.Double |
ExtentWidth
Gets the extent width.
Declaration
public double ExtentWidth { get; }
Property Value
Type |
---|
System.Double |
FooterColumns
Gets or sets the footer columns count.
Declaration
public int FooterColumns { get; set; }
Property Value
Type |
---|
System.Int32 |
FooterRows
Gets or sets the footer rows count.
Declaration
public int FooterRows { get; set; }
Property Value
Type |
---|
System.Int32 |
FrozenColumns
Gets or sets the frozen columns count.
Declaration
public int FrozenColumns { get; set; }
Property Value
Type |
---|
System.Int32 |
FrozenRows
Gets or sets the frozen rows count.
Declaration
public int FrozenRows { get; set; }
Property Value
Type |
---|
System.Int32 |
HorizontalOffset
Gets the Horizontal offset.
Declaration
public double HorizontalOffset { get; }
Property Value
Type |
---|
System.Double |
HorizontalPadding
Gets or sets the value for Horizontal padding.
Declaration
public double HorizontalPadding { get; set; }
Property Value
Type |
---|
System.Double |
HorizontalPixelScroll
Gets or sets a value indiating whether the Horizontal pixel scrolling can be enabled or not.
Declaration
public bool HorizontalPixelScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
HScrollBar
Declaration
public ScrollInfo HScrollBar { get; }
Property Value
Type |
---|
ScrollInfo |
RowCount
Gets or sets the row count.
Declaration
public int RowCount { get; set; }
Property Value
Type |
---|
System.Int32 |
RowHeightManager
Gets or sets the Row Height Manager.
Declaration
public RowHeightManager RowHeightManager { get; set; }
Property Value
Type |
---|
RowHeightManager |
RowHeights
Gets the row heights.
Declaration
public IPaddedEditableLineSizeHost RowHeights { get; }
Property Value
Type |
---|
IPaddedEditableLineSizeHost |
RowsGenerator
Gets or sets the Row generator.
Declaration
public IRowGenerator RowsGenerator { get; set; }
Property Value
Type |
---|
IRowGenerator |
ScrollableOwner
Declaration
public ScrollableContentViewer ScrollableOwner { get; set; }
Property Value
Type |
---|
ScrollableContentViewer |
ScrollColumns
Gets the scroll columns.
Declaration
public ScrollAxisBase ScrollColumns { get; }
Property Value
Type |
---|
ScrollAxisBase |
ScrollOwner
Gets or sets the scroll viewer.
Declaration
public ScrollViewer ScrollOwner { get; set; }
Property Value
Type |
---|
System.Windows.Controls.ScrollViewer |
ScrollRows
Gets the scroll rows.
Declaration
public ScrollAxisBase ScrollRows { get; }
Property Value
Type |
---|
ScrollAxisBase |
VerticalOffset
Gets the vertical offset.
Declaration
public double VerticalOffset { get; }
Property Value
Type |
---|
System.Double |
VerticalPadding
Gets or sets the value of Vertical padding.
Declaration
public double VerticalPadding { get; set; }
Property Value
Type |
---|
System.Double |
VerticalPixelScroll
Gets or sets a value indicating whether the vertical pixel scrolling can be enabled or not.
Declaration
public bool VerticalPixelScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
ViewportHeight
Gets the height of view port.
Declaration
public double ViewportHeight { get; }
Property Value
Type |
---|
System.Double |
ViewportWidth
Gets the width of view port.
Declaration
public double ViewportWidth { get; }
Property Value
Type |
---|
System.Double |
VScrollBar
Declaration
public ScrollInfo VScrollBar { get; }
Property Value
Type |
---|
ScrollInfo |
Methods
ArrangeOverride(Size)
Provides the behaviour for the "Arrange" pass of layout.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | finalSize | The final area within the parent that this object should use to arrange itself and its children. |
Returns
Type | Description |
---|---|
System.Windows.Size | The actual size that is used after the element is arranged in layout. |
CreateScrollAxis(Orientation, Boolean, IScrollBar, ILineSizeHost)
Creates scroll axis.
Declaration
protected virtual ScrollAxisBase CreateScrollAxis(Orientation orientation, bool pixelScroll, IScrollBar scrollBar, ILineSizeHost lineSizes)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.Orientation | orientation | The corresponding orientation. |
System.Boolean | pixelScroll | Indicates whether the pixel scroll can be enabled or not. |
IScrollBar | scrollBar | The corresponding scroll bar. |
ILineSizeHost | lineSizes | The line sizes. |
Returns
Type | Description |
---|---|
ScrollAxisBase | The scroll axis. |
Dispose()
Disposes all the resources used by the VisualContainer class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the VisualContainer class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
GetClipRect(ScrollAxisRegion, ScrollAxisRegion)
Gets the clipping bounds for the specified row and column region.
Declaration
public Rect GetClipRect(ScrollAxisRegion rowRegion, ScrollAxisRegion columnRegion)
Parameters
Type | Name | Description |
---|---|---|
ScrollAxisRegion | rowRegion | The row region. |
ScrollAxisRegion | columnRegion | The column region. |
Returns
Type | Description |
---|---|
System.Windows.Rect | A System.Windows.Rect with clipping bounds. |
GetParent(DependencyObject)
Declaration
public static DependencyObject GetParent(DependencyObject current)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | current |
Returns
Type |
---|
System.Windows.DependencyObject |
GetWantsMouseInput(DependencyObject, UIElement)
Declaration
public static Nullable<bool> GetWantsMouseInput(DependencyObject dpo, UIElement falseIfParent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | dpo | |
System.Windows.UIElement | falseIfParent |
Returns
Type |
---|
System.Nullable<System.Boolean> |
InsertColumns(Int32, Int32)
Inserts the column at the specified index.
Declaration
public void InsertColumns(int insertAtColumnIndex, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | insertAtColumnIndex | The corresponing index. |
System.Int32 | count |
InsertRows(Int32, Int32)
Inserts the rows at the specified index.
Declaration
public void InsertRows(int insertAtRowIndex, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | insertAtRowIndex | The corresponding index. |
System.Int32 | count | The count. |
InvalidateMeasureInfo()
Invalidates the measurement.
Declaration
public void InvalidateMeasureInfo()
LineDown()
Scrolls the ScrollViewer content downward by one line.
Declaration
public void LineDown()
LineLeft()
Scrolls the ScrollViewer content to the left by a predetermined amount.
Declaration
public void LineLeft()
LineRight()
Scrolls the ScrollViewer content to the right by a predetermined amount.
Declaration
public void LineRight()
LineUp()
Scrolls the ScrollViewer content upward by one line.
Declaration
public void LineUp()
MakeVisible(Visual, Rect)
Declaration
public Rect MakeVisible(Visual visual, Rect rectangle)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual | visual | |
System.Windows.Rect | rectangle |
Returns
Type |
---|
System.Windows.Rect |
MakeVisible(UIElement, Rect)
Declaration
public Rect MakeVisible(UIElement visual, Rect rectangle)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.UIElement | visual | |
System.Windows.Rect | rectangle |
Returns
Type |
---|
System.Windows.Rect |
MeasureOverride(Size)
Provides the behaviour for the "Measure" pass of the layout cycle.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | The available size that this object can give to child objects.Infinity can be specified as a value to indicate that the object will to size whatever the content is available. |
Returns
Type | Description |
---|---|
System.Windows.Size | The Size that this object determines it needs during layout,based on its calculations of the allocated sizes for child objects or based on other considerations such as a fixed container size. |
MouseWheelDown()
Invoked to scroll downwards.
Declaration
public void MouseWheelDown()
MouseWheelLeft()
Invoked to scroll leftwards.
Declaration
public void MouseWheelLeft()
MouseWheelRight()
Invoked to scroll rightwards.
Declaration
public void MouseWheelRight()
MouseWheelUp()
Invoked to scroll upwards.
Declaration
public void MouseWheelUp()
OnCreateColumnWidths()
Invoked when the column widths created.
Declaration
protected virtual IPaddedEditableLineSizeHost OnCreateColumnWidths()
Returns
Type | Description |
---|---|
IPaddedEditableLineSizeHost | The line size collection. |
OnCreateRowHeights()
Invoked when the row heights created.
Declaration
protected virtual IPaddedEditableLineSizeHost OnCreateRowHeights()
Returns
Type | Description |
---|---|
IPaddedEditableLineSizeHost | The line size collection. |
OnManipulationBoundaryFeedback(ManipulationBoundaryFeedbackEventArgs)
Called when the System.Windows.UIElement.ManipulationBoundaryFeedback event occurs.
Declaration
protected override void OnManipulationBoundaryFeedback(ManipulationBoundaryFeedbackEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.ManipulationBoundaryFeedbackEventArgs | e | The data for the event. |
PageDown()
Scrolls the ScrollViewer content downward by one page.
Declaration
public void PageDown()
PageLeft()
Scrolls the ScrollViewer content to the left by one page.
Declaration
public void PageLeft()
PageRight()
Scrolls the ScrollViewer content to the right by one page.
Declaration
public void PageRight()
PageUp()
Scrolls the ScrollViewer content upward by one page.
Declaration
public void PageUp()
PointToCellRowColumnIndex(Point, Boolean)
Determines the cell under the mouse location.
Declaration
public RowColumnIndex PointToCellRowColumnIndex(Point p, bool allowOutSideLines = false)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Point | p | The point in client coordinates. |
System.Boolean | allowOutSideLines |
Returns
Type | Description |
---|---|
RowColumnIndex | The cells row and column index under the mouse location. |
RangeToRect(ScrollAxisRegion, ScrollAxisRegion, RowColumnIndex, Boolean, Boolean)
For internal use.
Declaration
public Rect RangeToRect(ScrollAxisRegion rowRegion, ScrollAxisRegion columnRegion, RowColumnIndex rowcolumn, bool allowEstimatesForOutOfViewRows, bool allowEstimatesForOutOfViewColumns)
Parameters
Type | Name | Description |
---|---|---|
ScrollAxisRegion | rowRegion | Scroll axis region for row. |
ScrollAxisRegion | columnRegion | Scroll axis region for column. |
RowColumnIndex | rowcolumn | RowColumn Index. |
System.Boolean | allowEstimatesForOutOfViewRows | If set to true, allows estimate for out of view rows. |
System.Boolean | allowEstimatesForOutOfViewColumns | If set to true, allows estimate for out of view columns. |
Returns
Type | Description |
---|---|
System.Windows.Rect | Visible rectangle for the given range. |
RemoveColumns(Int32, Int32)
Removes the columns at the specified index.
Declaration
public void RemoveColumns(int removeAtColumnIndex, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | removeAtColumnIndex | The corresponding index. |
System.Int32 | count | The count. |
RemoveRows(Int32, Int32)
Removes the rows at the specified index.
Declaration
public void RemoveRows(int removeAtRowIndex, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | removeAtRowIndex | The corresponding index. |
System.Int32 | count | The count. |
SetHorizontalOffset(Double)
Sets the Horizontal offset.
Declaration
public void SetHorizontalOffset(double offset)
Parameters
Type | Name | Description |
---|---|---|
System.Double | offset |
SetVerticalOffset(Double)
Sets the Vertical offset.
Declaration
public void SetVerticalOffset(double offset)
Parameters
Type | Name | Description |
---|---|---|
System.Double | offset | The corresponding offset. |
SetWantsMouseInput(DependencyObject, Nullable<Boolean>)
Declaration
public static void SetWantsMouseInput(DependencyObject dpo, Nullable<bool> value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | dpo | |
System.Nullable<System.Boolean> | value |
UpdateAxis(Size)
Updates available size to Renderer
Declaration
public void UpdateAxis(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | availableSize | The available size |