MaterialSkin icon indicating copy to clipboard operation
MaterialSkin copied to clipboard

An Exception was thrown in your Sample Application

Open LukB4ULeap opened this issue 6 years ago • 2 comments

Gort this Exception in my VisualStudio 2019 Professional Development Environment using .Net 4.7.2 Windows 10

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
**Application.Run(new MainForm());** // <--Here

System.Collections.Generic.KeyNotFoundException HResult=0x80131577 Message=The given key was not present in the dictionary. Source=mscorlib StackTrace: at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at MaterialSkin.Controls.MaterialDrawer.Paint(PaintEventArgs e) at MaterialSkin.Controls.MaterialDrawer.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(true); Application.Run(new MainForm());

LukB4ULeap avatar Aug 20 '20 11:08 LukB4ULeap

Thanks for reporting, this usually happens because of missing fonts on your system, even though the lib should load them to memory, this seems to be somewhat hit or miss.

Try installing the roboto fonts on your system and check if this fixes the issue

leocb avatar Aug 31 '20 02:08 leocb

what about using different fonts other than roboto fonts, when doing that the following message appears: The given key was not present in the dictionary.

squrany avatar Sep 20 '23 12:09 squrany