Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,820 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
csharp
Domain
desktop

Research direction

Start at the ImageViewer control and compare the shown ImageSource assignment using BitmapFrame.Create with the working new ImageViewer(path1) path. Reproduce the issue with the provided ImageWatcher code and identify why the image does not render. Done means the ImageSource assignment displays the same image as the direct constructor path.

Written by the indexing model from the issue text.

Description

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

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HandyOrg/HandyControl

All issues in HandyOrg/HandyControl

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.