Project: I had Accounting project made in MS Access ADP 2003 project that connects to SQL Server database , Because it is not possible to create a beautiful and modern user interface with animation in Access, I decided to rewrite my program, I want to Convert that project to a project to be able to have fast speed program and have beautiful UI with animation and feature that user be able to change theme of Whole application to Dark or Light so I stated C# WPF.
Project info: C# WPF with .NET Framework 4.7.2 , also I used Material Design for set Dark/Light Theme for WHOLE Application
OS: Windows 10 x64 with 8GB RAM
ScreenShot:
Codes: Invoice Window ↓
XAML: https://pastebin.com/zrdZxHfe
C# : https://pastebin.com/0iK8CbBs
My project has a very high RAM consumption, but now that my project is big,In my MainWindow when I want to load a window, I get the following error:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
new HEAD_LST_FROOSH22().Show();
}
Error:
System.OutOfMemoryException: 'Insufficient memory to continue the execution of the program.
What have I try:
The state before the execution of that window : 
Performance Profiler : 
I tried to provide all the data needed to check this error, this is a general error and no one can comment with the summary code. I don't expect anyone to read the entire code, but someone can give an opinion or a clue with a glance.
thanks all
Update :
I create A small C# WPF to Test UI because I was suspected to "[Material Design]"
so here it is :
