Converter to get TYPE and compare with x:Type
Posted: 19 May 2022, 15:10
Hi,
I've successfully made this converter in WPF: ObjectToTypeConverter
Which basically returns this: value.GetType()
Which allows me to do this:
<DataTrigger Binding="{Binding, Converter={StaticResource ObjectToType}}" Value="{x:Type vm:SomeViewModel}">
However I am having trouble making this work in Noesis. I've tried returning value->GetClassType(), and a few other ideas, but none seem to work. How can I do the equivalent?
EDIT: I have got round this by making an ObjectIsTypeConverter, where I use the converter parameter to pass the type I want to check against, and that is working fine - however I would still like to get this working.
Many thanks,
Mark.
I've successfully made this converter in WPF: ObjectToTypeConverter
Which basically returns this: value.GetType()
Which allows me to do this:
<DataTrigger Binding="{Binding, Converter={StaticResource ObjectToType}}" Value="{x:Type vm:SomeViewModel}">
However I am having trouble making this work in Noesis. I've tried returning value->GetClassType(), and a few other ideas, but none seem to work. How can I do the equivalent?
EDIT: I have got round this by making an ObjectIsTypeConverter, where I use the converter parameter to pass the type I want to check against, and that is working fine - however I would still like to get this working.
Many thanks,
Mark.