Image.Width/Height property not works?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
takabo
Posts: 6
Joined: Sun May 10, 2020 5:34 pm

Image.Width/Height property not works?

Postby takabo » Tue May 12, 2020 2:41 am

Hi, I tried this code:

Code: Select all

<Page
    x:Class="ImageStretchTestPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
   
    <Grid>
        <Border BorderThickness="2" BorderBrush="red" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Image Source="http://www.cshtml5.com/samples/showcase/app-cshtml5/res/CSHTML5.Samples.Showcase/other/planets/earth.png"
                   Width="300"
                   Height="100"
                   Stretch="Fill"
                   />
        </Border>
    </Grid>
</Page>


The simulator is working as expected.
firefox does not change and there is a margin below.
chrome does not change.

Is there any good solution?
(Actually I wanted the image to be half the size, but it didn't work)

Edge3.png
Edge3.png (189.76 KiB) Viewed 1348 times

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

Re: Image.Width/Height property not works?

Postby JS-Support @Userware » Tue May 12, 2020 6:35 am

Hi,

Thanks for reporting this issue.

This is surprising. Which version of CSHTML5 are you using?

takabo
Posts: 6
Joined: Sun May 10, 2020 5:34 pm

Re: Image.Width/Height property not works?

Postby takabo » Tue May 12, 2020 3:54 pm

Hi, thank you for your reply.

Version is 2.0.0-alpha63-083.
It also happens in version 1.x.

IDE: Visual Studio 2015

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

Re: Image.Width/Height property not works?

Postby JS-Support @Userware » Thu May 14, 2020 5:55 am

Thanks. We have reproduced the issue. We are investigating it.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest

 

 

cron