Table of Contents

Class ViewModelMixins

Namespace
Bannerlord.UIExtenderEx.ViewModels
Assembly
Bannerlord.UIExtenderEx.dll

Provides lookup APIs for retrieving mixin instances attached to a ViewModel.

Emitted in compiled prefab C# to resolve mixin-bound properties and commands with direct, typed invocation speed.

public static class ViewModelMixins
Inheritance
ViewModelMixins
Inherited Members

Methods

Get<TMixin>(ViewModel?)

Retrieves the TMixin instance attached to viewModel, or null if no matching mixin is attached or viewModel is null. Attached mixin instances remain queryable even if disabled post-attachment.

public static TMixin? Get<TMixin>(ViewModel? viewModel) where TMixin : class, IViewModelMixin

Parameters

viewModel ViewModel

The host ViewModel instance.

Returns

TMixin

The attached mixin instance, or null.

Type Parameters

TMixin

The target mixin type.

Select<TMixin, TValue>(ViewModel?, Func<TMixin, TValue>)

Evaluates a member selector delegate against the TMixin instance attached to viewModel, returning default if the mixin is absent or viewModel is null.

public static TValue? Select<TMixin, TValue>(ViewModel? viewModel, Func<TMixin, TValue> selector) where TMixin : class, IViewModelMixin

Parameters

viewModel ViewModel

The host ViewModel instance.

selector Func<TMixin, TValue>

The delegate selecting a member value on the mixin.

Returns

TValue

The selected value, or default.

Type Parameters

TMixin

The target mixin type.

TValue

The selected return value type.


This page was last modified at 10/05/2026 13:34:58 +03:00 (UTC).

Commit Message
Author:    Vitalii Mikhailov
Commit:    f3b725a97c3f299c20e56b5f206e27142ec15edd
* Added C# Auto-Generated XML prefab compilation for patched and dynamic movies, matching vanilla UI performance

* Added name-based property binding fallback for ViewModel subtypes not declared on the parent
* Improved unparseable prefab error logging with name and file details
* Fixed game crash with 3-segment attribute paths
* Added Bannerlord.UIExtenderE...