Danh mục

Silverlight tiếng việt phần 2

Số trang: 8      Loại file: pdf      Dung lượng: 1.27 MB      Lượt xem: 9      Lượt tải: 0    
10.10.2023

Hỗ trợ phí lưu trữ khi tải xuống: 1,000 VND Tải xuống file đầy đủ (8 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Tham khảo tài liệu silverlight tiếng việt phần 2, công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Silverlight tiếng việt phần 2XAML - Extensible Application Markup Language XAML là gì Fill Text Hello!Cách 1: Cách 2: Cách 3 : Root elements và namespace trong XAML t. x:Class x:Class= Chapter2.Page, Chapter2.Page. Page.xaml). GridClick=Button_Click.namespace Chapter2{ public partial class Page : UserControl { public Page() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { //Xu ly su kien Button click o day MessageBox.Show(Xin chao!); } }} function Button_Click() { alert(Xin chao!); } Các namescope trong XAML http://msdn.microsoft.com/en-us/library/cc189026(VS.95).aspxS .Load XamlReader.Load. Load CreateFromXaml Loadht. MicrosoftXAML và các Custom class a. parameterless’).XAML và Type ConverterLayout Silverlight Silverlight Canvas, StackPanel và rid. G Canvas UIElement StackPanel Orientation Vertical HorizontalAlignment và erticalA Vlignment làStretch StackPanel Grid dòng chúng ta dùngColumnDefinitions và owDefinitions. R ColumnDefinition và owDefinition trong ColumnDefinitions và R RowDefinitions ColumnDefinition và owDefinition R GridLength Grid public Page() { InitializeComponent(); LayoutDesign(); } private void LayoutDesign() { StackPanel DeptStackPanel = new StackPanel(); DeptStackPanel.Margin = new Thickness(10); LayoutRoot.Children.Add(DeptStackPanel); Grid.SetColumn(DeptStackPanel, 1); Grid.SetRow(DeptStackPanel, 1); TextBlock DeptListHeading = new TextBlock(); DeptListHeading.Text = Department; ListBox DeptList = new ListBox(); DeptList.Items.Add(Finance); DeptList.Items.Add(Marketing); DeptList.Items.Add(Human Resources); DeptList.Items.Add(Payroll); DeptStackPanel.Children.Add(DeptListHeading); DeptStackPanel.Children.Add(DeptList); StackPanel ButtonsStackPanel = new StackPanel(); ButtonsStackPanel.Margin = new Thickness(10); ButtonsStackPanel.Orientation = Orientation.Horizontal; ButtonsStackPanel.HorizontalAlignment = HorizontalAlignment.Center; LayoutRoot.Children.Add(ButtonsStackPanel); Grid.SetColumn(ButtonsStackPanel, 0); Grid.SetRow(ButtonsStackPanel, 2); Grid.SetColumnSpan(ButtonsStackPanel, 2); Button BackButton = new Button(); BackButton.Content = Back; BackButton.Height = 30; BackButton.Width = 100; Button CancelButton = new Button(); CancelButton.Content = Cancel; CancelButton.Height = 30; CancelButton.Width = 100; Button NextButton = new Button(); NextButton.Content = Next; NextButton.Height = 30; NextButton.Width = 100; ButtonsStackPanel ...

Tài liệu được xem nhiều: