Skip to content

Bug title ImageViewer 控件 ImageSource =img 无法渲染出图片 #1820

Description

@ping9719

Describe the bug

public class ImageWatcher : ImageWatcher
{
    public void Abc(string path1)
    {
                            using (var stream = new FileStream(path1, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                            {
                                ImageSource = BitmapFrame.Create(stream, BitmapCreateOptions.IgnoreColorProfile, BitmapCacheOption.OnLoad);
                            }
    }

}

无法显示出图片,但是直接 new ImageViewer(path1); 是可以显示出图片的

Steps to reproduce the bug

1

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions