Increase in Memory allocation after Zoom-In and Zoom-Out operation on a Grid control

Anonymous
2023-05-22T13:46:31.1233333+00:00

I am having a GRID control which contains one ImageControl and corresponding Height/Intensity/Color image thumbnails. Now I am performing a simple operation of Zooming In and then again Zooming out my GRID. For this Zoom-In and Zoom-Out Operation I am using "ScaleTransform" property of Grid control.  

Now even after Zooming out the image to previous Zoom value, there is increase in Memory allocation in system.Thus performing this operation multiple times results in quite a good amount of increased memory. On checking with one of the Memory Profiler tool, it has been observed that this increase is related to few WPF controls (For eg: EffectiveValueEntry[], MenuItem, Border, TextBlock, Paths etc)  

Can someone provide any solution for this issue. 

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.