I have a stackpanel that contains an Image and a TextBlock. I\'m raising an event once double click is being performed by the user.(P.S - I\'m adding the St
A simple way of getting the first child element of a certain type (e.g. TextBlock) is this:
var textBlock = panel.Children.OfType().FirstOrDefault();
You either get the first TextBlock or null if there isn't any.
null