I have an
ObservableCollection<object>
Let’s consider we have 2 items in it :
int a = 1;
string str = "hey!";
My xaml file acces to it via DataContext and I’d like to display the Type (System.Type) of the object with a Binding.
Here is the code I have
<TextBlock Text="{Binding}"/>
And I’d like to display in my TextBlocks is :
int
string
Thanks for any help !
You’ll need to use an
IValueConverterto do this.Then add it to your resources…
Then use it on your binding