Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在Windows8WebView控件中使用CSS?_Html_C# 4.0_Windows 8_Windows Runtime_Winrt Xaml - Fatal编程技术网

Html 如何在Windows8WebView控件中使用CSS?

Html 如何在Windows8WebView控件中使用CSS?,html,c#-4.0,windows-8,windows-runtime,winrt-xaml,Html,C# 4.0,Windows 8,Windows Runtime,Winrt Xaml,我有一个关于window的8个应用程序Webview控件的问题,是否仍然可以使用css来管理Webview的外观,我在这里使用它来查看反馈的html数据的返回内容,但正如您所看到的,它已从所有css中剥离,所以是否仍然可以管理Webview的css 更新:这是代码 void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { // this code

我有一个关于window的8个应用程序Webview控件的问题,是否仍然可以使用css来管理Webview的外观,我在这里使用它来查看反馈的html数据的返回内容,但正如您所看到的,它已从所有css中剥离,所以是否仍然可以管理Webview的css

更新:这是代码

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字符串中。否则-它应该可以正常工作,我们需要您实际操作的更多细节。

您可以将样式嵌入html元素中,如。先生,我知道如何在html页面中嵌入css样式,我在问如何将它嵌入到Webview控件?嗯,你的selectedItem。内容是html字符串,对吗?如果你想使用css,你需要在html字符串中嵌入样式。我不相信有单独供应的方法。嗯,我想我明白你的意思了。让我试试,看看我能想出什么,非常感谢你的帮助。