Monday, January 19, 2009

SilverLight and App Class

((App)Application.Current).YourMethod()

Silverlight ve font embed

Fontu projenize ekledikten sonra fontun Visual Studio'da özellikler kısmına gelip "Build Action" kısmından "Resources" i seçiniz.
Daha sonra bu fontu kullanacağımız elemente aşğıdakini yazınız;
FontFamily="consola.ttf#Consolas"

Silverlight ve fullscreen

Application.Current.Host.Content.IsFullScreen = true;

Sunday, January 18, 2009

Silverlight And Path Files

var path = new Uri("http://" + System.Windows.Browser.HtmlPage.Document.DocumentUri.Host + "/videos/" + cmb_videos.SelectedItem.ToString());

SilverLight ve Wcf web service

protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
return base.CreateServiceHost(serviceType, new Uri[] { new Uri("
http://www.yoursite.com/Service.svc") });
}

Service sınıfınıda ServiceHostFactory sınıfından türetin.

The "function name" is not a recognized built-in function name'.

myfunc () instead dbo.myunc () type In SqlServer

The current database compatibility level does not support managed objects

When you receive this error in Sql Server Run the following sp. 'Northwind' database, write the name of your own instead.

exec sp_dbcmptlevel 'Northwind', 90