# SetCursorFromProviderAction

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

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

```rust
struct SetCursorFromProviderAction
```

Sets the cursor on a target control using an [`ICursorProvider`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-icursorprovider/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L15)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`target_control_property`](#function-target_control_property)
- [`provider_property`](#function-provider_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`target_control`](#function-target_control)
- [`set_target_control`](#function-set_target_control)
- [`provider`](#function-provider)
- [`set_provider`](#function-set_provider)

<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/cursor/set_cursor_from_provider_action.rs#L19)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L19)

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

### target_control_property

```rust
fn target_control_property() -> &'static StyledProperty<Option<ElementRef<InputElement>>>
```

Identifies the `TargetControl` property.

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L30)

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

### provider_property

```rust
fn provider_property() -> &'static StyledProperty<Option<Rc<dyn ICursorProvider>>>
```

Identifies the `Provider` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L30)

<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/cursor/set_cursor_from_provider_action.rs#L67)

<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/cursor/set_cursor_from_provider_action.rs#L72)

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

### target_control

```rust
fn target_control(self: &Self) -> Option<Ref<InputElement>>
```

Gets or sets the target control. This is a property of the object model; markup resolves a
name given for it to the named control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L78)

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

### set_target_control

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L82)

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

### provider

```rust
fn provider(self: &Self) -> Option<Rc<dyn ICursorProvider>>
```

Gets or sets the `ICursorProvider`. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L87)

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

### set_provider

```rust
fn set_provider(self: &Self, value: Option<Rc<dyn ICursorProvider>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/cursor/set_cursor_from_provider_action.rs#L91)

## 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<SetCursorFromProviderAction>`](/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/).
