View Issue Details

IDProjectCategoryView StatusLast Update
0001610NoesisGUIUnity3Dpublic2019-12-28 14:58
ReporterGwynnethAssigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
Product Version2.2.5 
Target VersionFixed in Version 
Summary0001610: Type casting in a binding does not work
DescriptionWhen 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 ReproduceCreate 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}"
TagsNo tags attached.
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