# TreeViewFilterBehavior

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

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

```rust
struct TreeViewFilterBehavior
```

Filters `TreeView` items based on the text of a search box.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L24)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`search_box_property`](#function-search_box_property)
- [`no_matches_control_property`](#function-no_matches_control_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`search_box`](#function-search_box)
- [`set_search_box`](#function-set_search_box)
- [`no_matches_control`](#function-no_matches_control)
- [`set_no_matches_control`](#function-set_no_matches_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.Custom/tree_view/tree_view_filter_behavior.rs#L29)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### search_box_property

```rust
fn search_box_property() -> &'static StyledProperty<Option<ElementRef<TextBox>>>
```

Identifies the `SearchBox` property.

Deviation (DEVIATIONS.md, Behaviors): the behavior does not own the search box, so the
value is an element reference.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L41)

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

### no_matches_control_property

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

Identifies the `NoMatchesControl` property.

Deviation (DEVIATIONS.md, Behaviors): the behavior 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/tree_view/tree_view_filter_behavior.rs#L41)

<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/tree_view/tree_view_filter_behavior.rs#L107)

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

### new

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

Creates a behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L115)

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

### search_box

```rust
fn search_box(self: &Self) -> Option<Ref<TextBox>>
```

Gets or sets the search box control. Markup resolves a name given for it to the named
element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L121)

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

### set_search_box

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L125)

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

### no_matches_control

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

Gets or sets the control displayed when no matches are found. Markup resolves a name given
for it to the named element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L131)

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

### set_no_matches_control

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/tree_view/tree_view_filter_behavior.rs#L135)

## 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`
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TreeViewFilterBehavior>`](/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/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)

## Availability

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