I am quite a novice programmer, and I am going diligently through the text book, “Programming Windows Phone 7” by Charles Petzold. However, in the example on sharing data among pages in Silverlight, I cannot cast the Application class as App. If you have the free text book it is page 113.
The error is “The type or namespace name ‘App’ could not be found (are you missing a using directive or an assembly reference?)”
Could somebody please advise how to fix this? If it is a using directive, then is there some way that I can figure these out on my own without having to have super memory?
Thank you very much!
if (ContentPanel.Background is SolidColorBrush) {
(Application.Current as App).SharedColor = (ContentPanel.Background as SolidColorBrush).Color;
}
As mentioned in notes, I accidentally had incorrect namespaces as I copied the code from a previous example. Just cleaning up, very new to stackoverflow and like to leave things neat and tidy 🙂