intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Silverlight tiếng việt phần 2

Chia sẻ: Thái Duy Ái Ngọc | Ngày: | Loại File: PDF | Số trang:8

157
lượt xem
74
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

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ả

Chủ đề:
Lưu

Nội dung Text: Silverlight tiếng việt phần 2

  1. XAML - Extensible Application Markup Language XAML là gì Fill
  2. Text Hello! Cách 1: Cách 2: Cách 3 : Root elements và namespace trong XAML t. x:Class
  3. x:Class=" Chapter2.Page", Chapter2.Page. Page.xa ml). Grid Click="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
  4. http://msdn.microsoft.com/en-us/library/cc189026( VS.95).aspx S .Load XamlR eader.Load. Load CreateFromXaml Load ht. Microso ft XAML và các Custom class a.
  5. parameterless ’). XAML và Type Converter Layout Silverlight Silverlight Canvas, StackPanel và rid. G Canvas UIElement StackPanel
  6. Orientation Vertical HorizontalAlignment và erticalA V lignment làStretch StackPanel Grid dòng chúng ta dùngColumnDefinitions và owDefinitions. R ColumnDefinition và owDefinition trong ColumnDefinitions và R R owDefinitions ColumnDefinition và owDefinition R GridLength Grid public Page() { InitializeComponent(); LayoutDesign(); } private void LayoutDesign() {
  7. 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.Children.Add(BackButton); ButtonsStackPanel.Children.Add(CancelButton); ButtonsStackPanel.Children.Add(NextButton); BackButton.Margin = new Thickness(10); CancelButton.Margin = new Thickness(10); NextButton.Margin = new Thickness(10); } }
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2