<Grid
Height="{Binding ElementName=oldPrice, Path=Height}">
<TextBlock
VerticalAlignment="Bottom"
FontSize="{StaticResource TextStyleSmallFontSize}"
RequestedTheme="Light"
FontWeight="Bold"
Foreground="#B0B0B0"
Style="{StaticResource TitleTextBlockStyle}"
TextWrapping="NoWrap">
<Run
x:Name="oldPrice"
Text="{Binding oldPrice}" />
</TextBlock>
<Line
Stretch="Fill"
Stroke="#B0B0B0"
StrokeThickness="1"
X1="1"
Width="{Binding ElementName=oldPrice, Path=Width}"
Height="{Binding ElementName=oldPrice, Path=Height}"
Margin="0,6,0,0" />
</Grid>
<TextBlock
Text="   "
FontSize="{StaticResource TextStyleMediumFontSize}"
RequestedTheme="Light"
Style="{StaticResource TitleTextBlockStyle}"
TextWrapping="NoWrap" />
Hi all, i have a textblock and a line above it for oldPrice indication. And another textblock for spacing between next text. However when there is no dicount so no oldPrice value i am setting the oldPrice text to null.
So i want to hide that spacing textblock too. Is there any possible xaml way to bind the last TextBlock's visibility property to oldPrice's text. So it will be invisible if oldPrice text is null or empty string.
Thanks