As good as C# is, it's not always the best language for simple tasks. Enter Ruby, an interpreted, dynamically typed language that enables simple tasks with simple code.
Although simple Sidebar gadgets are "DHTML applets" with limited functionality, you can enhance them using .NET components exposed as ActiveX controls through COM Interop.
You don't have to rely on libraries and frameworks to avoid writing repetitive code; instead, learn to generate such code automatically, using a custom input format to describe the code you want to generate.