问题
I have a question about window's 8 apps Webview Control , is there anyway to use css to manage the look of the webview , i'm using it here to view a returned contents of a feeded html data but as you can see it's striped from all the CSS , so is there anyway that I can manage the CSS for the Webview ?
UPATED : This is the code
void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// this code to populate the web view
// with the content of the selected blog post.
// I'm passing the selected item from the previous items' page
// and then pouplate the web view with the selected item Contents of the feed
if (this.UsingLogicalPageNavigation()) this.InvalidateVisualState();
Selector list = sender as Selector;
FeedItem selectedItem = list.SelectedItem as FeedItem;
if (selectedItem != null)
{
this.contentView.NavigateToString(selectedItem.Contents);
}
else
{
this.contentView.NavigateToString("");
}
}
回答1:
If you navigate with NavigateToString() - you can put your css inside of the html string that you navigate to. Otherwise - it should just work and we would need more details for what you are actually doing.
来源:https://stackoverflow.com/questions/14608767/how-to-use-css-with-windows-8-webview-control