# ScrollToOffsetAction

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-scrolltooffsetaction/

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

```rust
struct ScrollToOffsetAction
```

Scrolls a `ScrollViewer` to the specified offsets when executed.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L14)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`scroll_viewer_property`](#function-scroll_viewer_property)
- [`horizontal_offset_property`](#function-horizontal_offset_property)
- [`vertical_offset_property`](#function-vertical_offset_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`scroll_viewer`](#function-scroll_viewer)
- [`set_scroll_viewer`](#function-set_scroll_viewer)
- [`horizontal_offset`](#function-horizontal_offset)
- [`set_horizontal_offset`](#function-set_horizontal_offset)
- [`vertical_offset`](#function-vertical_offset)
- [`set_vertical_offset`](#function-set_vertical_offset)

<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/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L18)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L18)

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

### scroll_viewer_property

```rust
fn scroll_viewer_property() -> &'static StyledProperty<Option<ElementRef<ScrollViewer>>>
```

Identifies the `ScrollViewer` property.

Deviation (DEVIATIONS.md, Behaviors): the action does not own the scroll viewer, so the
value is an element reference.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L29)

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

### horizontal_offset_property

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

Identifies the `HorizontalOffset` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L29)

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

### vertical_offset_property

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

Identifies the `VerticalOffset` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L29)

<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/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L79)

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

### new

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

Creates an action.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L84)

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

### scroll_viewer

```rust
fn scroll_viewer(self: &Self) -> Option<Ref<ScrollViewer>>
```

Gets or sets the `ScrollViewer` instance to scroll. This is a property of the object
model; markup resolves a name given for it to the named scroll viewer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L90)

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

### set_scroll_viewer

```rust
fn set_scroll_viewer(self: &Self, value: impl Into<Nullable<ScrollViewer>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L94)

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

### horizontal_offset

```rust
fn horizontal_offset(self: &Self) -> Option<f64>
```

Gets or sets the horizontal offset to scroll to. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L99)

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

### set_horizontal_offset

```rust
fn set_horizontal_offset(self: &Self, value: Option<f64>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L103)

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

### vertical_offset

```rust
fn vertical_offset(self: &Self) -> Option<f64>
```

Gets or sets the vertical offset to scroll to. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L108)

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

### set_vertical_offset

```rust
fn set_vertical_offset(self: &Self, value: Option<f64>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/scroll_viewer/scroll_to_offset_action.rs#L112)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- [`StyledElementActionImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ScrollToOffsetAction>`](/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/)
- [`StyledElementActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimpl/)

## Availability

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