当前位置:网站首页>Getting started with Silverlight development 1

Getting started with Silverlight development 1

2022-06-25 05:55:00 bcbobo21cn

VS2012 Create a new silver project ;

Silverlight Applications cannot run independently , In the dialog box that pops up later, we can choose to create a ASP.NET Web Site perhaps Web Application Project For hosting Silverlight Applications ;

 

After creation, the project structure is as follows ;

 

Let's have a project, sir ; More than one. ClientBin Folder , There is a .xap file ; This is the assembly run by the silver project ; This must be present during deployment ;

 

Take a look at the generated aspx Containing the silver light js;

 

Go to interface design xaml part ; Add a button ;

 

      understand xaml For grammar, please refer to some of my WPF post , Or related tutorials ;

Name the button btn1, And add an event handling code ;

private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.btn1.Background = new SolidColorBrush(Colors.Orange);
        }

function ; Click button , Button background color changes ;

 

 

原网站

版权声明
本文为[bcbobo21cn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202201254196933.html