# AspectRatioClassSetter

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

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

```rust
struct AspectRatioClassSetter
```

Conditional class setter based on aspect ratio used in
`AspectRatioBehavior`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`min_ratio_property`](#function-min_ratio_property)
- [`min_ratio_operator_property`](#function-min_ratio_operator_property)
- [`max_ratio_property`](#function-max_ratio_property)
- [`max_ratio_operator_property`](#function-max_ratio_operator_property)
- [`class_name_property`](#function-class_name_property)
- [`is_pseudo_class_property`](#function-is_pseudo_class_property)
- [`target_control_property`](#function-target_control_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`min_ratio`](#function-min_ratio)
- [`set_min_ratio`](#function-set_min_ratio)
- [`min_ratio_operator`](#function-min_ratio_operator)
- [`set_min_ratio_operator`](#function-set_min_ratio_operator)
- [`max_ratio`](#function-max_ratio)
- [`set_max_ratio`](#function-set_max_ratio)
- [`max_ratio_operator`](#function-max_ratio_operator)
- [`set_max_ratio_operator`](#function-set_max_ratio_operator)
- [`class_name`](#function-class_name)
- [`set_class_name`](#function-set_class_name)
- [`is_pseudo_class`](#function-is_pseudo_class)
- [`set_is_pseudo_class`](#function-set_is_pseudo_class)
- [`target_control`](#function-target_control)
- [`set_target_control`](#function-set_target_control)

<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.Responsive/aspect_ratio_class_setter.rs#L18)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### min_ratio_property

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

Identifies the `MinRatio` property.

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

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

### min_ratio_operator_property

```rust
fn min_ratio_operator_property() -> &'static StyledProperty<ComparisonConditionType>
```

Identifies the `MinRatioOperator` property.

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

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

### max_ratio_property

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

Identifies the `MaxRatio` property.

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

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

### max_ratio_operator_property

```rust
fn max_ratio_operator_property() -> &'static StyledProperty<ComparisonConditionType>
```

Identifies the `MaxRatioOperator` property.

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

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

### class_name_property

```rust
fn class_name_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `ClassName` property.

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

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

### is_pseudo_class_property

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

Identifies the `IsPseudoClass` property.

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

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

### target_control_property

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

Identifies the `TargetControl` property.

Deviation (DEVIATIONS.md, Behaviors): the setter does not own its target, so the value
is an element reference.

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

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

### construct

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

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

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

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

### new

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

Creates a setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L83)

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

### min_ratio

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

Gets or sets minimum aspect ratio used for comparison. This is a property of the object
model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L89)

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

### set_min_ratio

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L93)

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

### min_ratio_operator

```rust
fn min_ratio_operator(self: &Self) -> ComparisonConditionType
```

Gets or sets minimum aspect ratio comparison operator. This is a property of the object
model.

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

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

### set_min_ratio_operator

```rust
fn set_min_ratio_operator(self: &Self, value: ComparisonConditionType)
```



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

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

### max_ratio

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

Gets or sets maximum aspect ratio used for comparison. This is a property of the object
model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L109)

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

### set_max_ratio

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L113)

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

### max_ratio_operator

```rust
fn max_ratio_operator(self: &Self) -> ComparisonConditionType
```

Gets or sets maximum aspect ratio comparison operator. This is a property of the object
model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L119)

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

### set_max_ratio_operator

```rust
fn set_max_ratio_operator(self: &Self, value: ComparisonConditionType)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L123)

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

### class_name

```rust
fn class_name(self: &Self) -> Option<String>
```

Gets or sets the class name that should be added or removed. This is a property of the
object model, and the content of the setter in markup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L129)

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

### set_class_name

```rust
fn set_class_name(self: &Self, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L133)

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

### is_pseudo_class

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

Gets or sets the flag whether `class_name` is a pseudo class. This is
a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L139)

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

### set_is_pseudo_class

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L143)

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

### target_control

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

Gets or sets the target control that class name should be added or removed from when
triggered. 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.Responsive/aspect_ratio_class_setter.rs#L150)

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

### set_target_control

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Responsive/aspect_ratio_class_setter.rs#L154)

## 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/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<AspectRatioClassSetter>`](/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/)

## Availability

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