如何使用CSS与Windows 8 Webview控件? [英] How to use CSS with Windows 8 Webview Control?

查看:194
本文介绍了如何使用CSS与Windows 8 Webview控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于窗口的8个应用程序的问题Webview控制,有无论如何使用CSS来管理webview的外观,我使用它来查看一个反馈的html数据的返回内容,但你可以看到它

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:这是代码

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("");
            }  

        }

推荐答案

如果您使用NavigateToString()导航 - 您可以将css放在您导航到的html字符串中。否则 - 它应该工作,我们将需要更多的细节,你实际上正在做什么。

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.

这篇关于如何使用CSS与Windows 8 Webview控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆