Answered by:
WebView ignoring .css file on actual Surface tablet

Question
-
I am using a WebView to display html pages that are loaded from a sub folder of my Assets folder. When I run my app on a Windows 8 PC or on the tablet emulator everything works fine. However, when I am running on an actual Surface tablet, the pages do not seem to be loading the .css file and are, therefore, not formatted properly.
Is there something that I am missing here?
Thanks
As an update, I have found that if I embed the css file inside the HTML file everything works fine, even on a tablet. Needless to say this will be very inconvenient. Is there some permissions issue that is preventing the .css file from being loaded?- Edited by John Gaby Sunday, January 13, 2013 6:16 PM
Saturday, January 12, 2013 4:00 AM
Answers
-
I have found the problem. When I switched from building for Win32 to ARM, Visual Studio removed the css files from the list of included files. Oddly, it seems as if those were the ONLY files that were removed. Strange.
- Marked as answer by John Gaby Monday, January 14, 2013 2:57 AM
Monday, January 14, 2013 2:57 AM
All replies
-
I have found the problem. When I switched from building for Win32 to ARM, Visual Studio removed the css files from the list of included files. Oddly, it seems as if those were the ONLY files that were removed. Strange.
- Marked as answer by John Gaby Monday, January 14, 2013 2:57 AM
Monday, January 14, 2013 2:57 AM -
Hi,
Thanks for sharing the solution.
Did you check if in the project settings of ARM include the .css file.
Sometimes, we change the platform, the project files is different.
Best regards,
JesseJesse Jiang
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Monday, January 14, 2013 6:43 AM -
Make sure you set these file not only in project but also included as resource(settings somewhere) too.Tuesday, January 15, 2013 7:39 PM
-
Where do I find this setting? I keep getting a WebErrorStatus 18 when I try to navigate to a page that I've added to Assets.
Update: I think I found it. Right-click file -> properties, then for all builds/platforms set "Excluded From Build" to "No", "Content" to "Yes", and "Item Type" to "Text" (for my html file). Thanks!
Andrea Mantler
- Edited by Andrea Mantler Wednesday, March 27, 2013 4:54 PM answered my question
Wednesday, March 27, 2013 4:37 PM