Page 1 of 1

Image.Width/Height property not works?

Posted: Tue May 12, 2020 2:41 am
by takabo
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 12240 times

Re: Image.Width/Height property not works?

Posted: Tue May 12, 2020 6:35 am
by JS-Support @Userware
Hi,

Thanks for reporting this issue.

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

Re: Image.Width/Height property not works?

Posted: Tue May 12, 2020 3:54 pm
by takabo
Hi, thank you for your reply.

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

IDE: Visual Studio 2015

Re: Image.Width/Height property not works?

Posted: Thu May 14, 2020 5:55 am
by JS-Support @Userware
Thanks. We have reproduced the issue. We are investigating it.