Silverlight/Migration from 1.1

BrowserHost야 어딜 간거니???

길버트리 2008. 3. 6. 19:57
BrowserHost.Resize 이벤트를 많이 애용했었지요.

BrowserHostApplication.Current.Host.Content로 대체됩니다.

Resized 이벤트는 이렇게

Application.Current.Host.Content.Resized += new EventHandler(Content_Resized);


void Content_Resized(object sender, EventArgs e)
{
    Width = Application.Current.Host.Content.ActualWidth;
    Height = Application.Current.Host.Content.ActualHeight;
}

IsFullScreen도 여기서 찾을 수 있습니다.

Application.Current.Host.Content.IsFullScreen


네임스페이스는 아래 것을 사용합니다.

using System.Windows;



'Silverlight > Migration from 1.1' 카테고리의 다른 글

Downloader 대신 WebClient  (1) 2008.03.08
HtmlTimer 대신 뭘 쓰면 될까요?  (2) 2008.03.06
Image.Source는 어떻게 쓰나  (0) 2008.03.06