The source code contains a mix of C++, C# but the editor is composed in completely

I thought the editor at least the UI Elements were made from WPF and mixed with C#. The main editor functions like rendering the scene and everything from the material editor are created in C++ using the Unreal Engine Editor? The UnrealEditor4.exe is not a .NET Application and interlopes back and forth C++ to C#? If this is so how does the UI looks so neat - are they rendered through DirectX? The UI i am meaning the toolbar - the scene outliner, the content browser, etc…

The ui is done completely in slate (C++), and if im not mistaken all of the c# code is related to project building (UBT? that thing still amazes me, at how it exactly works), but the editor/engine/ui is all c++ (except for some sections like android with a couple of java files and some super platform specific stuff, and a few libraries written in C and such)

you get a nice little break down of what the composition of UE4 is https://github.com/EpicGames/UnrealEngine/search?l=csharp

The C# is only used for a custom build tool, called UnrealBuildTool. You can find it in the Programs folder of your VS solution. Each module has a C# class that descends from ModuleRules, which defines the module dependecies and where include files can be found.

The UE4 editor uses Slate as it’s GUI library, which in turn is built on UE4 itself. That’s why it looks good, they’re rendering it through the engine itself. You can find the Slate modules in the solution folder UE4 > Source > Slate*