dotnet / dotnet/wpf

Flowdocument's image memory usage exception

Open
#9,164 1 comment 0 reactions 0 assignees View on GitHub
Needs minimal repro project needs more information
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

In richtextbox, pasting a lot of images, or embedding custom controls can cause memory spikes. This can be solved if you set the cache mode for images to none. But you can't set it for pasted-in images.

BitmapImage img = new BitmapImage(new Uri());
img.CacheOption = BitmapCacheOption.None;

### Reproduction Steps

.

### Expected behavior

.

### Actual behavior

.

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.