Windows Presentation Foundation Unleashed (2) XAML Demystified
- Elements and Attributes
XAML:
1
<Button Name="myButton" MouseLeftButtonDown="OnMouseLeftButtonDownButton" PreviewMouseLeftButtonDown="OnPreviewMouseLeftButtonDownButton">
C#:1
private System.Windows.Forms.Button button1; - Namespace
1
using System.Windows.Controls; - The implicit .NET namespaces
WPF maps .NET namesapces to XML namesapce. This is a many to one mapping.
1
using System;
2
using System.Collections.Generic;
3
using System.Text;
4
using System.Windows;
5
using System.Windows.Controls;
6
using System.Windows.Data;
7
using System.Windows.Documents;
8
using System.Windows.Input;
9
using System.Windows.Media;
10
using System.Windows.Media.Imaging;
11
using System.Windows.Shapes;

浙公网安备 33010602011771号