Tag Archives: FrameworkElements

Use x:Shared to write your FrameworkElements directly as Resource

By | July 25, 2011

We all know that StaticResource works mainly with Freezables in WPF. You cannot define a resource like a Button or a TextBox as StaticResource because the runtime will count it to be shared and creating the resource more than once from Resources will leave you an exception.