發表文章

目前顯示的是 2012的文章

如何在Silverlight中建立預設頁面

Silverlight 建立UI的方式,是透過 Application.RootVisual 屬性指定要載入的XAML 檔案。 所以,開啟一個基本的 Silverlgiht 專案來看,在  App.xaml.cs  中Application_Startup,指定了這程式會載入哪個 XAML 頁面當成主要的程式介面: private void Application_Startup( object sender, StartupEventArgs e) {       this .RootVisual = new MainPage (); } 在 App(繼承Application) 中的 this.RootVisual  就是  Application.Current.RootVisual 。 而在 MainPage (繼承UserControl) 類別中,就有包含XAML定義,因此,指定此類別後,RootVisual實際會載入類別中的的 content 對象。 如果想改變載入的畫面,就可以修改指定給 RootVisual 的類別名稱。 例如:       根據使用者選擇,開啟不同頁面: private void  Application_Startup( object  sender,  StartupEventArgs  e) { switch  (selection) { case  1: this .RootVisual =  new   PageStyle1 ();            break ;        default :            this .RootVisual =  new   PageStyle2 ();     } } ------------------------------------------------------------------- 註: Application.RootVisual 只能夠指定一次來源。

使用Chrome套件下載Youtube影片

圖片
有時網路速度不穩定、不想線上痴痴等著youtube載入影片, 因此想要將影片下載來看, 但YouTube改版後,網路上許多下載的工具就失效了, 如果是Google Chrome的使用者,現在可以安裝Chome 擴充功能 《 YouTube HD Suite 》 ,就可以輕鬆下載你要的影片 ! 軟體名稱:YouTube HD Suite 版本:3.5.1 下載: http://userscripts.org/scripts/show/39167 支援多種影片格式: Original /MP4/H.264/AAC HD1080p /MP4/H.264/AAC HD720p /WebM/VP8/vorb HD720p /MP4/H.264/AAC 480p /WebM/VP8/vorb 480p /FLV/H.264/AAC 360p /WebM/VP8/vorb 360p /FLV/H.264/AAC SD /MP4/H.264/AAC OldLQ /FLV/H.263/MP3 使用方法: 安裝  http://userscripts.org/scripts/source/39167.user.js 開啟YouTube,每個檔案旁都有顯示最高畫質的標記    3. 選擇要下載的影片    4. 選擇要下載的影片格式