Inline c# in XAML front-end: Why doesn't this work in XAML?
<p>Scenario:  Developing a "thick" client in UWP, using c# destined for the desktop of Windows 8.1/10 (a store app).</p>

<p>In my user interface, I tried to use the following inline</p>

<pre><code>    &lt;StackPanel Grid.Column="0"&gt;
    &lt;TextBlock  x:Name="Qty_Size_Crust" Margin="25,10,20,0" Padding="0,0,0,0" TextAlignment="Left" TextWrapping="Wrap" MaxHeight="25" Foreground="#ff230909" FontFamily="Segoe UI" FontSize="16" xml:space="preserve" HorizontalAlignment="Left"&gt;
if ({Binding WidgetName} == "Backend")
{             
        &lt;Run Text="{Binding ItemCode, Converter=ItemCodeToDescriptionConverter}"/&gt; 
}
else
{
       &lt;Run Text="See Administrator}"/&gt; 
}
    &lt;/TextBlock&gt;
</code></pre>

<p>The compiler would accept this, but during execution, I would neither see Item Description nor See Administrator.  Is there something else I should be doing in order for this work?  I was able to work around this by putting the code in the ViewModel, but wondered why this didn't work (or maybe it shouldn't).</p>