View Issue Details

IDProjectCategoryView StatusLast Update
0001610NoesisGUIUnitypublic2019-12-28 14:58
ReporterGwynneth Assigned To 
PrioritynormalSeveritymajor 
Status newResolutionopen 
Product Version2.2.5 
Summary0001610: Type casting in a binding does not work
Description

When using type casting in a binding the binding fails which will get logged by Noesis as an error (with Log Verbosity set to Binding). Noesis will also warn about not being able to find the bound property on the cast object.

Steps To Reproduce

Create a binding in which an object is cast to a specific type to access its properties. Generically this is done as follows:
Path=Obj1.(ns1:TypeObj1.Obj2).(ns2:TypeObj2.Obj3)...(nsN:TypeObjN.BindedProp)

Specifically, I created a data template and used the binding below on a custom TextBlock. The binding will not work and Noesis will complain about OverviewViewModel not containing the property 'TextSettings'.
TextSettings="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ComboBox}}, Path=DataContext.(viewModels:OverviewViewModel.TextSettings).ActiveSettings}"

When exposing the viewmodel differently in a typed manner (in this case OverviewView.ViewModel is of type OverviewViewModel), the binding works:
TextSettings="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type OverviewView}}, Path=Viewmodel.TextSettings.ActiveSettings}"

PlatformWindows

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-12-28 14:58 Gwynneth New Issue
2025-10-10 13:29 jsantos Category Unity3D => Unity