C# 希望在WPF中以3d对象上的纹理显示实时网页
我将(1.7RC2)用于webview和3d对象 XAML:C# 希望在WPF中以3d对象上的纹理显示实时网页,c#,wpf,binding,awesomium,imagebrush,C#,Wpf,Binding,Awesomium,Imagebrush,我将(1.7RC2)用于webview和3d对象 XAML: 出于某种原因,WebTexture的get访问器甚至没有被调用,所以我猜我在这里遗漏了什么(2小时的google/bing/duckduckgo也没有带来任何结果)。当你说get请求甚至没有被调用时,你是说你调用了\u webView.LoadURL()?通过调试代理查看流量,可以显示正在发送的请求。你看到什么让你觉得没有人打电话给你?谢谢你的回复。_webView.LoadURL很好,但是没有调用WebTexture的GET访问器。
出于某种原因,WebTexture的get访问器甚至没有被调用,所以我猜我在这里遗漏了什么(2小时的google/bing/duckduckgo也没有带来任何结果)。当你说get请求甚至没有被调用时,你是说你调用了
\u webView.LoadURL()
?通过调试代理查看流量,可以显示正在发送的请求。你看到什么让你觉得没有人打电话给你?谢谢你的回复。_webView.LoadURL很好,但是没有调用WebTexture的GET访问器。
<p:Workshop3D>
<p:Spherical3D ParallelCount="30" DefaultTextureMapping="True">
<p:Spherical3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<ImageBrush TileMode="None" Stretch="Fill"
ImageSource="{Binding Path=WebTexture, ElementName=MyWpfWindow}" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</p:Spherical3D.Material>
</p:Spherical3D>
</p:Workshop3D>
public MainWindow()
{
_webView = WebCore.CreateWebView(800, 600);
_webView.LoadURL(new Uri(@"http://www.youtube.com"));
while (_webView.IsLoading)
WebCore.Update();
var buffer = (BitmapSurface)_webView.Surface;
var bitmap = new WriteableBitmap(800, 600, 96, 96, PixelFormats.Bgra32, null);
buffer.CopyTo(bitmap.BackBuffer, 800, 4, false, false);
WebTexture = bitmap;
InitializeComponent();
}
private ImageSource _webTexture;
public ImageSource WebTexture
{
get
{
return _webTexture;
}
set { _webTexture = value; RaisePropertyChanged("WebTexture"); }
}