I think you should use something like this when targeting WP7 and WP8 with related files:
#if WP8 public class MyPerformanceProgressBar : ProgressBar { } #else public class MyPerformanceProgressBar : Microsoft.Phone.Controls.PerformanceProgressBar { } #endif
and use the MyPerformanceProgressBar class in the XAML code (which is MyPerformanceProgressBar in WP7 and WP8 projects).
Rico Suter
source share