# GridSplitter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-gridsplitter/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct GridSplitter
```

Represents the control that redistributes space between columns or rows
of a [`Grid`](/docs/0.5.0/api/ferroui-controls/struct-grid/) control.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L121)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`get_parent_grid`](#function-get_parent_grid)
- [`get_properties_value_source`](#function-get_properties_value_source)
- [`resize_direction_property`](#function-resize_direction_property)
- [`resize_behavior_property`](#function-resize_behavior_property)
- [`shows_preview_property`](#function-shows_preview_property)
- [`keyboard_increment_property`](#function-keyboard_increment_property)
- [`drag_increment_property`](#function-drag_increment_property)
- [`preview_content_property`](#function-preview_content_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`resize_direction`](#function-resize_direction)
- [`set_resize_direction`](#function-set_resize_direction)
- [`resize_behavior`](#function-resize_behavior)
- [`set_resize_behavior`](#function-set_resize_behavior)
- [`shows_preview`](#function-shows_preview)
- [`set_shows_preview`](#function-set_shows_preview)
- [`keyboard_increment`](#function-keyboard_increment)
- [`set_keyboard_increment`](#function-set_keyboard_increment)
- [`drag_increment`](#function-drag_increment)
- [`set_drag_increment`](#function-set_drag_increment)
- [`preview_content`](#function-preview_content)
- [`set_preview_content`](#function-set_preview_content)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L127)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<GridSplitter>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L127)

<a id="function-get_parent_grid"></a>

### get_parent_grid

```rust
fn get_parent_grid(self: &Self) -> Option<Ref<Grid>>
```

Retrieves the `Grid` that ultimately hosts this splitter in the
visual/logical tree.

A splitter can be placed directly inside a grid or indirectly
inside an items control that uses a grid as its items panel. In
the latter case the first logical parent is usually a content
presenter (or the items control itself), so the method walks
these intermediate containers to locate the underlying grid.

Returns the containing grid if one is found.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L127)

<a id="function-get_properties_value_source"></a>

### get_properties_value_source

```rust
fn get_properties_value_source(self: &Self) -> Ref<StyledElement>
```

Returns the element that carries the grid-attached properties
(`Grid.Row`, `Grid.Column`, etc.) relevant to this splitter.

When the splitter is generated as part of an items control
template, the attached properties are set on the surrounding
content presenter rather than on the splitter itself. This helper
selects that presenter when appropriate so subsequent property
look-ups read the correct values; otherwise it simply returns
the splitter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L127)

<a id="function-resize_direction_property"></a>

### resize_direction_property

```rust
fn resize_direction_property() -> &'static StyledProperty<GridResizeDirection>
```

Defines the `ResizeDirection` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-resize_behavior_property"></a>

### resize_behavior_property

```rust
fn resize_behavior_property() -> &'static StyledProperty<GridResizeBehavior>
```

Defines the `ResizeBehavior` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-shows_preview_property"></a>

### shows_preview_property

```rust
fn shows_preview_property() -> &'static StyledProperty<bool>
```

Defines the `ShowsPreview` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-keyboard_increment_property"></a>

### keyboard_increment_property

```rust
fn keyboard_increment_property() -> &'static StyledProperty<f64>
```

Defines the `KeyboardIncrement` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-drag_increment_property"></a>

### drag_increment_property

```rust
fn drag_increment_property() -> &'static StyledProperty<f64>
```

Defines the `DragIncrement` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-preview_content_property"></a>

### preview_content_property

```rust
fn preview_content_property() -> &'static StyledProperty<Option<Rc<dyn ITemplateOf<Ref<Control>>>>>
```

Defines the `PreviewContent` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L319)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L365)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L369)

<a id="function-resize_direction"></a>

### resize_direction

```rust
fn resize_direction(self: &Self) -> GridResizeDirection
```

Indicates whether the splitter resizes the columns, rows, or both.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L374)

<a id="function-set_resize_direction"></a>

### set_resize_direction

```rust
fn set_resize_direction(self: &Self, value: GridResizeDirection)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L378)

<a id="function-resize_behavior"></a>

### resize_behavior

```rust
fn resize_behavior(self: &Self) -> GridResizeBehavior
```

Indicates which columns or rows the splitter resizes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L383)

<a id="function-set_resize_behavior"></a>

### set_resize_behavior

```rust
fn set_resize_behavior(self: &Self, value: GridResizeBehavior)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L387)

<a id="function-shows_preview"></a>

### shows_preview

```rust
fn shows_preview(self: &Self) -> bool
```

Indicates whether to preview the column resizing without updating
layout.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L393)

<a id="function-set_shows_preview"></a>

### set_shows_preview

```rust
fn set_shows_preview(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L397)

<a id="function-keyboard_increment"></a>

### keyboard_increment

```rust
fn keyboard_increment(self: &Self) -> f64
```

The distance to move the splitter when pressing the keyboard arrow
keys.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L403)

<a id="function-set_keyboard_increment"></a>

### set_keyboard_increment

```rust
fn set_keyboard_increment(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L407)

<a id="function-drag_increment"></a>

### drag_increment

```rust
fn drag_increment(self: &Self) -> f64
```

Restricts the splitter to move a multiple of the specified units.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L412)

<a id="function-set_drag_increment"></a>

### set_drag_increment

```rust
fn set_drag_increment(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L416)

<a id="function-preview_content"></a>

### preview_content

```rust
fn preview_content(self: &Self) -> Option<Rc<dyn ITemplateOf<Ref<Control>>>>
```

The content that will be shown when `ShowsPreview` is enabled and the
user starts a resize operation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L422)

<a id="function-set_preview_content"></a>

### set_preview_content

```rust
fn set_preview_content(self: &Self, value: Option<Rc<dyn ITemplateOf<Ref<Control>>>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/grid_splitter.rs#L426)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ThumbImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-thumbimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`GridSplitterImplExt`](/docs/0.5.0/api/ferroui-controls/trait-gridsplitterimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<GridSplitter>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ThumbImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-thumbimpl/)
- [`GridSplitterImpl`](/docs/0.5.0/api/ferroui-controls/trait-gridsplitterimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
