webbrowser is enabled only for out-of。。。。
来源:互联网 发布:天堂2手游mac版 编辑:程序博客网 时间:2024/04/19 18:44
来源:http://www.dotblogs.com.tw/lolota/archive/2010/03/19/14116.aspx
如果要在Silverlight中內嵌網頁,要怎麼處理呢?
在 Silverlight 4.0 中提供了一個可以內嵌網頁的WebBrowser 元件,我們就實際地來玩看看:
1.
開啟一個 Silverlight 專案。
2.
在 XAML 程式碼中,加入下列程式碼:
3.
然後你會發現畫面標示 – HTML is enabled only in Out-of-Browser mode:
4.
按下 F5 執行,畫面會出現:
5.
設定一下 OOB:
6.
按下滑鼠右鍵安裝:
7.
在 OOB 中顯示:
現在這個功能是無法直接在瀏覽器上內嵌網頁,只能在 OOB 時內嵌。雖然可以在OOB執行,但是感覺總少了一點味道。
有沒有辦法可以處理這個問題? 或許我們可以透過 HtmlBridge 來做處理?
找了一下,可以透過一個 Free 且可用在商業應用程式上的元件來做處理 - divtools。
1.
下載元件,然後加入專案參考:
2.
設定一下程式碼:
3.
按下 F5 執行,出現了這樣的畫面:
4.
看來是要設定 windowsless 屬性,作了一下調整
5.
執行後:
6.
也支援自訂 html,可以在程式碼這樣設定:
7.
在畫面上是這樣:
很簡單的一個工具,但是在 SilverLight 內嵌 html 程式碼來講,是非常有用的元件。
提供給需要的朋友作參考。
試煉大會,我們下次見囉~
參考來源:
http://www.divelements.co.uk/silverlight/tools.aspx
- webbrowser is enabled only for out-of。。。。
- The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for
- restoration of CBCentralManager is only allowed for applications that have specified the "bluetooth-
- STVD弹出"Line number 50 is out of range for "main.c"."的原因及解决办法
- keil for stm32中出现的警告" integer operation result is out of ran"
- 【IndexError: index 1 is out of bounds for axis 0 with size 1】
- Inject Javascript for WebBrowser control of WP7
- Second-level cache is not enabled for usage 异常
- svn Transaction is out of date
- integer operation result is out of range
- svn: Item is out of date
- adb server is out of date. killing
- adb server is out of date. killing..
- adb server is out of date. killing...
- adb server is out of date. killing...
- adb server is out of date.
- adb server is out of date. killing...
- adb server is out of date. killing...
- Theme Changeable Flash Design
- vb.net封装组件成com的方法
- 全球经济危机加重 中国改革千钧一发
- Windows下:Opencv2.1+Python2.6配置
- 始终无法忘怀
- webbrowser is enabled only for out-of。。。。
- 2011-9-13(机房布线)
- sql 效率
- C++"void __cdecl operator delete(void *)"原因
- 从今天起,我要做一个懒惰的程序员
- Android 2.0 API 读取通讯录中电话号码的实例
- STAF API Return Codes
- MySQL简介
- Android源代码浅析——Settings