Site Logo

Pixel-in-Gene

Exploring Frontend Development with Design / Graphics / Technology

Generic.xaml must have a build action of Page

I was in a code review session and was getting a constant problem with the default (generic) theme for a control. The file generic.xaml was correctly located in the /Themes folder and the Assembly attribute ThemeInfo was also set. But still the control was notshowing up !

Problem: generic.xaml had a build action other than Page.

Solution: Make the build action of generic.xamlas Page

image

I am not sure how it got changed in the first place but if you ever run into a problem with blank custom controls, do check the build action of generic.xaml.

It must be Page.

Of course you also need to make sure you have a generic.xaml in /Themes and it has a Style for your custom control. Also your AssemblyInfo.cs file needs to have a ThemeInfo assembly attribute set.

Generic.xaml must have a build action of Page
Pavan Podila
Pavan Podila
October 8th, 2008