How to use CSS with Windows 8 Webview Control?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 07:14:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!