I am new to the XAML world and I'm fumbling my way through a lot of tutorials. One thing i'm stuck on is calling the .tostring on an object.
Here is mysetup
I have a listbox that is bound to a list of objects I have a contentControl bound to the same list that displays the selected item from the listbox.
My ContentControl is as follows:
<ContentControl Grid.Row="1" Margin="0,3,5,204" Name="Detail"
Content="{Binding Source={StaticResource listingDataView}}"
ContentTemplate="{StaticResource myContentTemplate}"
HorizontalAlignment="Right" Width="231"/>
in myContentTemplate I have:
<DataTemplate x:Key="myContentTemplate">
<StackPanel>
<TextBlock Text="{Binding Path=Name}" />
<!-- want to call .tostring here-->
</StackPanel>
</DataTemplate>
In the template I'd like to call .tostring on the object that is currently selected but i cant figure out how to do that?
thanks Steph