2009年11月11日
Silverlight Unloaded Event & ZIndex
Silverlight 有一個問題,就是沒有提供 Unloaded Event,
如果你設計了一個 UserControl 並在 Loaded 中加入了 event
那麼這個 UserControl 若移出 Parent 後再加入,
就會再呼叫一次 Loaded,而 event 便再增加一次。
因此,圖形物件的 layer 在進行變更時,
要記得利用 Canvas.SetZIndex 來處理,
而不要用 Panel.Children.Remove() 及 Panel.Children.Add().
2009年11月10日
Silverlight Facebook SDK
這是今天看到的消息,
消息來自於 ZDNet: 微軟釋出Facebook SDK
而 SDK 的下載位置為 Windows Developer Center: Facebook SDK Overview
The Silverlight Team Blog:
Announcing the new Microsoft SDK for Facebook Platform
2009年11月2日
Rich Internet Application Market Share
因為訂閱了 Google Blog 有關 Silverlight 的快訊,
收到了 Kimo Chung's AS3 Playground: Why Silverlight? um, I don't know.
這篇文章,
也因此發現了有關 RIA 市場占有率的現況,
提供大家分享。
Silverlight 全世界的安裝比例,大約為 29%,
台灣的安裝比列則是41%。
[Reference]
Rich Internet Application Statistics
Rich Internet Application Market Share
2009年10月29日
Silverlight Game Loop
撰寫遊戲程式,經常需要利用 main loop 處理一些工作。
以下是 Silverlight 使用 loop 的方法。
[Reference]
Silverlight Tip of the Day #50 – Main Game Loop Revisited!
以下是 Silverlight 使用 loop 的方法。
public Page()
{
InitializeComponent();
CompositionTarget.Rendering += new EventHandler(SnowFlakeTimer);
}
private void SnowFlakeTimer(object sender, EventArgs e)
{
// do your task
}
[Reference]
Silverlight Tip of the Day #50 – Main Game Loop Revisited!
Getting Query String Values in Silverlight
Silverlight 可以直接取得網址後面的參數,
方法如下:
[Reference]
Getting Query String Values in Silverlight
方法如下:
string val = System.Windows.Browser.HtmlPage.Document.QueryString["foo"];
[Reference]
Getting Query String Values in Silverlight
2009年10月28日
Silverlight TextBox 斷行處理
下列的範例,可以將 TextBlock.Text 所取得的字串,
拆解成字串陣列。
string text = TheTextBox.Text;
text = text.Replace(Environment.NewLine, "\r");
string[] texts = text.Split(new char[] { '\r' });
2009年10月27日
SyntaxHihglighter Test
為了讓程式碼看起來更整潔,
試了一下 SyntaxHihglighte,
有興趣的人可以到官網取得相關資訊。
不過為了讓 blogger 不要自動加入換行, 之前的程式碼卻變得更零亂了。
不過為了讓 blogger 不要自動加入換行, 之前的程式碼卻變得更零亂了。
function test() : String
{
return 10;
}
訂閱:
文章 (Atom)
Deploying Vue & .NET with Google OAuth on GCP Cloud Run
Deploying Vue & .NET with Google OAuth on GCP Cloud Run Deploying Vue & .NET with Google OAuth on GCP Cloud Run...
-
有幾個正正當當的 SEO 規則: 讓 Google 與 Yahoo 知道這個網站或網頁的存在:Google 可以透過網站管理工具,Yahoo 則透過 siteexplorer。 找出與網站相關的熱門關鍵字:既然想透過 Google 或 Yahoo 的關鍵字搜尋,當然不要選...
-
使用 WPF 建立雙螢幕或多螢幕畫面,作法如下: 首先刪除 App.xaml 中的 StartupUri="MainWindows.xaml"的設定。 加入 System.Windows.Forms (for Screen) 與 System.Drawi...
-
自從我知道了 iPhone 的 App Store 平台服務後,才發現 Google 與 Microsoft 也有類似的服務。 Apple - App Store Google - Android Market Microsoft - Windows Mobile Market...