LinearGradientBrush on a Border.Background

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
eblodgett
Posts: 2
Joined: Mon Feb 04, 2019 12:38 pm

LinearGradientBrush on a Border.Background

Postby eblodgett » Tue Feb 05, 2019 7:32 am

First I am using the latest Beta as of 2/5/2019 - 1.2 Beta 11

I have this XAML trying to get a certain look on the TextBlock actually:

<Border Grid.Row="2" Grid.Column="1" BorderBrush="Black" BorderThickness="1" Padding="4" Margin="3,5,0,0" HorizontalAlignment="Left">
<Border.Background>
<LinearGradientBrush StartPoint="0.5,2.16" EndPoint="0.5,-1.16">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#FF000000" Offset="0"/>
<GradientStop Color="#FFFFFFFF" Offset="0.5"/>
<GradientStop Color="#FF000000" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<TextBlock TextAlignment="Right" Text="125.36"
FontSize="16"
FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Right" MinWidth="65" Name="Average1Min">
</TextBlock>
</Border>


In designtime it looks great (see attachment)
GoodShot.png
This is design-time - looks great
GoodShot.png (5.57 KiB) Viewed 597 times


But in the simulator it goes all black (see attachment)
SimulatorBlack.png
Simulator - all black
SimulatorBlack.png (3.59 KiB) Viewed 597 times


I run in browser using localhost - still black
localhostBad.png
localhost - all black
localhostBad.png (3.47 KiB) Viewed 597 times


Any help would be great.

Thanks

EB

eblodgett
Posts: 2
Joined: Mon Feb 04, 2019 12:38 pm

Re: LinearGradientBrush on a Border.Background

Postby eblodgett » Tue Feb 05, 2019 7:40 am

Interestingly Enough, this gradient seems to work:

<LinearGradientBrush StartPoint="0.359627,1.00198" EndPoint="0.359627,0.011521">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#FF9A9A9A" Offset="0"/>
<GradientStop Color="#FFFFFFFF" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>

Here is DesignTime:
NewGradientDesignTime.png
NewGradientDesignTime
NewGradientDesignTime.png (5.53 KiB) Viewed 596 times


Here is Simulator:
NewGradientSimulator.png
Simulator
NewGradientSimulator.png (5.1 KiB) Viewed 596 times


Here is localhost:
NewGradientLocalHost.png
Localhost
NewGradientLocalHost.png (4.87 KiB) Viewed 596 times


Hope this helps track down the problem.

Thanks

EB

JS-Support @Userware
Site Admin
Posts: 1071
Joined: Tue Apr 08, 2014 3:42 pm

Re: LinearGradientBrush on a Border.Background

Postby JS-Support @Userware » Tue Feb 05, 2019 9:00 am

Thanks. We are going to look into why the second gradient works while the first doesn't. I'll let you know.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron