# PropertiesView

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/view_models/struct-propertiesview/

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

```rust
struct PropertiesView
```

The properties of an object for the property grid: the counterpart of the
`DataGridCollectionView` of the managed original, with its group description (by
`Group`), its sort description (`PropertyComparer`) and its filter, presented as a
hierarchical TreeDataGrid source whose root rows are the groups.

Deviation (DEVIATIONS.md, Developer tools): the property grid is a TreeDataGrid, not a DataGrid.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1063)

## Members

- [`new`](#function-new)
- [`set_property_type_columns`](#function-set_property_type_columns)
- [`source`](#function-source)
- [`source_ref`](#function-source_ref)
- [`groups`](#function-groups)
- [`items`](#function-items)
- [`set_selection_changed`](#function-set_selection_changed)
- [`refresh`](#function-refresh)
- [`index_path_of`](#function-index_path_of)
- [`row_index_of`](#function-row_index_of)
- [`selected`](#function-selected)
- [`select`](#function-select)

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

### new

```rust
fn new(properties: Vec<PropertyViewModelRef>, filter: Rc<dyn Fn(&PropertyViewModelRef) -> bool>) -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1088)

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

### set_property_type_columns

```rust
fn set_property_type_columns(self: &Self, show_property_type: bool)
```

Shows the type of a property and of its value in one column, or (with `show_property_type`)
in two.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1233)

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

### source

```rust
fn source(self: &Self) -> Rc<HierarchicalTreeDataGridSource<PropertiesViewItem>>
```

The source of the grid.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1246)

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

### source_ref

```rust
fn source_ref(self: &Self) -> TreeDataGridSourceRef
```

The source of the grid, as the grid takes it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1251)

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

### groups

```rust
fn groups(self: &Self) -> Rc<Vec<Rc<PropertiesViewItem>>>
```

The rows of the groups.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1256)

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

### items

```rust
fn items(self: &Self) -> Vec<PropertyViewModelRef>
```

The properties the view shows, in the order it shows them (`foreach (object o in
PropertiesView)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1262)

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

### set_selection_changed

```rust
fn set_selection_changed(self: &Self, handler: Rc<dyn Fn(Option<PropertyViewModelRef>) -> ()>)
```

Sets the handler of a change of the selected row (the selected property, `None` for a
group or no row).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1268)

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

### refresh

```rust
fn refresh(self: &Self)
```

Groups, sorts and filters the properties again (`Refresh()`), keeping the selected
property selected while it is shown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1274)

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

### index_path_of

```rust
fn index_path_of(self: &Self, property: &PropertyViewModelRef) -> Option<IndexPath>
```

The index path of the row of a property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1316)

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

### row_index_of

```rust
fn row_index_of(self: &Self, property: &PropertyViewModelRef) -> i32
```

The index of the row of a property among the rows the grid shows; `-1` when it shows
none.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1329)

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

### selected

```rust
fn selected(self: &Self) -> Option<PropertyViewModelRef>
```

The selected property; `None` when no row or a group is selected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1337)

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

### select

```rust
fn select(self: &Self, property: Option<&PropertyViewModelRef>)
```

Selects the row of a property, or clears the selection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/control_details_view_model.rs#L1345)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `PartialEq`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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