Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avalonia Image Control Stretch #18339

Closed
Xiaobaicoder-pixel opened this issue Feb 28, 2025 · 1 comment
Closed

Avalonia Image Control Stretch #18339

Xiaobaicoder-pixel opened this issue Feb 28, 2025 · 1 comment
Labels

Comments

@Xiaobaicoder-pixel
Copy link

Xiaobaicoder-pixel commented Feb 28, 2025

Describe the bug

Image

Image

Here, an Image control is defined with a size set to 256 * 256 and Stretch set to Fill However, the actual size of the Image Control in the gui is not 256 * 256. and the image source is actually a 64 * 64 byte array.When I set Stretch to Uniform/UniformToFill, there won't be any changes.Is There any way to fill the entire image control with an image?

To Reproduce

<ToolTip.Tip> <Image Width="256" Height="256" Source="{Binding Images.ReferenceImage, Mode=OneWay}" Stretch="Fill" /> </ToolTip.Tip>
Image Source actually is 64*64 byte array

Expected behavior

No response

Avalonia version

11.2.1

OS

Windows

Additional context

No response

@Xiaobaicoder-pixel
Copy link
Author

I save this image to file , and reload it as bitmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant