Có 17+ tài liệu thuộc chủ đề "thủ thuật lập trình .net"
tailieu.vn Xem trực tuyến Tải xuống
block, enter the following:. Now go back to MainMenu.xaml and find the line where it says the following:. <TextBlock FontSize . Canvas.Left . Canvas.Top gt;Silverlight Demo</TextBlock>. Add the following attribute to this tag to reference the style you created in App.xaml:. Canvas.Top . This is normally due to the following:. Figure 14-6. You are probably expecting to be able to...
tailieu.vn Xem trực tuyến Tải xuống
Replace the Grid tags with the following XAML:. Open ~/Animation/Animation.xaml.cs and enter the following code:. StoryBoard.Completed. StoryBoard.Duration = TimeSpan.FromMilliseconds(10);. StoryBoard.Begin();. StoryBoard.Stop();. Add the code to load Animation.xaml when the animation button is clicked:. PageNavigator.LoadPage(new Animation.Animation());. Note that you incremented the Opacity value using the following code:. However, when you incremented the Left and Top properties, you had to increment the...
tailieu.vn Xem trực tuyến Tải xuống
<Image Source="myImage.jpg"></Image>. <Image Source="http://www.mysite.com/myImage.jpg"></Image>. Add the image to the Silverlight project.. Text=""Hello""></TextBlock>";. Background="White">. Source="/Robotica_720.wmv"></MediaElement>. <Button x:Name="cmdPlay". Content="Play"></Button>. <Button x:Name="cmdStop". Content="Stop"></Button>. <Button x:Name="cmdPause". Content="Pause"></Button>. <StackPanel Orientation="Vertical">. Height gt;</TextBox>. ></TextBox>
tailieu.vn Xem trực tuyến Tải xuống
Add the event handler code:. In addition to the standard Silverlight controls such as TextBox, Image, and ComboBox additional controls such as a DataGrid, Slider, and Calendar are available. Add a new folder called DataBinding to the example project.. In theXAML, you need to add a namespace reference to the assemblies you're going to use.. Add the following line in...
tailieu.vn Xem trực tuyến Tải xuống
Open ~/DataBinding/DataBindingTest.xaml.. Add the following XAML after the TextBox that has the x:name set to txtDeclaration:. <TextBlock>Change an object in list:</TextBlock>. Open DataBindingTest.xaml.cs and add a click event handler:. //Change an item in the list. Open DataBindingTest.xaml.. Add the following XAML after the cmdChangeTitle button (note that the binding mode is set to TwoWay now):. <TextBlock>Two way binding:</TextBlock>. Open DataBindingTest.xaml.cs....
tailieu.vn Xem trực tuyến Tải xuống
WPF 4.0 and Silverlight 3.0. The Properties window in VS2010 for XAML applications has a new view mode that prioritizes the properties that you have defined above all the others.. CHAPTER 15 WPF 4.0 AND SILVERLIGHT 3.0. In VS2010 you can now open the Properties window, click the Sort by property source button (the third one along),and you will find...
tailieu.vn Xem trực tuyến Tải xuống
Figure 15-6. Figure 15-7. Figure 15-8. Figure 15-9. Figure 15-10. Figure 15-11. Figure 15-13. Now press F5 to run your application and you will have a fully functional master details view similar to Figure 15-14.. Figure 15-14
tailieu.vn Xem trực tuyến Tải xuống
WPF 4.0 now contains the DataGrid, Calendar, and DatePicker controls that were previously available as part of the WPF toolkit. Figure 15-16 shows the new Calendar and DatePicker controls. Figure 15-17 shows the DataGrid control in action.. Figure 15-16. Figure 15-17. The easiest way to create these controls is to drag them from the toolbox or add them manually with...
tailieu.vn Xem trực tuyến Tải xuống
This should then allow you to write input binding XAML such as the following:. This is fixed in WPF 4.0 (possibly driven by the need for clear text in VS2010 IDE) and you now have much finer-grained control over how text is rendered with the new TextFormattingMode and TextRenderingMode properties.. The following code demonstrates setting text to use the Display...
tailieu.vn Xem trực tuyến Tải xuống
Before you look at the new changes in Silverlight 3.0, note that upgrading can potentially break existing applications. And this URL provides guidance on how to upgrade your Silverlight 2.0 applications:. Probably the best feature of Silverlight 3.0 is the ability it offers to run your applications offline. Press F5 to run your Silverlight project and then right-click the Silverlight...
tailieu.vn Xem trực tuyến Tải xuống
Styles in Silverlight 3.0 can now be modified at runtime and support inheritance.. Silverlight 3.0 allows you to create styles that inherit from another style (sort of like CSS) by specifying a parent style in the BasedOn property. BasedOn="{StaticResource MyHorridFuciaStyle}"></Style>. Silverlight 3.0 has a new file save dialog that allows users to save content to their local machine rather than...
tailieu.vn Xem trực tuyến Tải xuống
Microsoft has been hard at work tweaking Silverlight 3.0’s performance. Silverlight 3.0 has support for Binary XML, allowing you to communicate with WCF binary XML endpoints. Silverlight.js. The JavaScript file Silverlight.js in Silverlight 3.0 is compressed and is now just 7k in size (previous versions were 57k). http://code.msdn.microsoft.com/silverlightjs/.. Silverlight 3.0 allows you to shift resource-intensive tasks such as clipping and...
tailieu.vn Xem trực tuyến Tải xuống
Windows Azure. Windows Azure is Microsoft’s entry into the cloud-computing arena and competes with offerings from established heavyweights such as Amazon and Google. Windows Azure applications are created using standard .NET technologies and developers will be glad they will not need to learn many additional techniques to get up and running.. The complexity of the Azure infrastructure is hidden from...
tailieu.vn Xem trực tuyến Tải xuống
If you haven’t created a project yet, click the adding services to the project link. Figure 16-10. Figure 16-11. We want to upload our application to Windows Azure, so click the Deploy button beneath the staging cube and you will be taken to the Staging Deployment screen.. Figure 16-12. Figure 16-13. Click the Run button to start your Azure application...
tailieu.vn Xem trực tuyến Tải xuống
The following example shows how to save a file to local storage:. Azure Storage. SQL Azure. Azure storage is very fast and intended for storing files or data with a simple structure, and it is also cheaper than its SQL counterpart. Azure Storage:. Cheaper than SQL Azure. More expensive than Azure Storage. Before you jump to automatically using SQL Azure...
tailieu.vn Xem trực tuyến Tải xuống
The following URL, for example, is used to retrieve a list of containers held in Azure Storage:. Add the following using directive:. Add the following code to the Main() method. Request.Method = "GET";. Request.ContentLength = 0;. Request.Headers.Add("x-ms-date", DateTime.UtcNow.ToString("R"));. Request.Headers["x-ms-date". And add the Authorization header to the request. Request.Headers.Add("Authorization", AuthorizationHeader);. HttpWebResponse Response = (HttpWebResponse) Request.GetResponse();. You should have a response like...
tailieu.vn Xem trực tuyến Tải xuống
Table Storage. Azure table storage is the third Azure storage option and allows you to store .NET objects (entities in Azure terminology) and access them in a manner compatible with WCF Data Services. Items stored in table storage are created as standard .NET classes that inherit from TableServiceEntity. Create a new Cloud Service project called Chapter16.TableStorage, adding a single ASP.NET...