Detecting if a string is a url
<p>I'm printing out a url from a data set within my xaml file. The issue is, is that I'm required to only create a hyperlink if the string is a valid URL. </p>

<p>I know how to do this in most languages, but not in WPF. I'm looking for something that works as;</p>

<pre><code>if(isurl)
    display hyperline gridrow
else 
    display string gridrow
</code></pre>

<p>My xaml at present is;</p>

<pre><code>&lt;u:GridViewColumnEx x:Uid="column_4" Width="225" &gt;
    &lt;GridViewColumn.CellTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;TextBlock&gt;
                &lt;Hyperlink&gt;
                    &lt;TextBlock Text="{Binding Data.path}"/&gt;
                &lt;/Hyperlink&gt;
            &lt;/TextBlock&gt;
        &lt;/DataTemplate&gt;
    &lt;/GridViewColumn.CellTemplate&gt;
&lt;/u:GridViewColumnEx&gt;
</code></pre>

<p>But this displays everything in the column as a hyperlink (obviously). I've read about triggers but am not sure if this is what I'm after. I've read quite a bit about triggers, but am unsure on how to alter the xaml based on the return value.</p>