#副標=Windows Presentation Foudation(下) #大標=宣告式應用程式開發新境界-MPF #眉標=Windows Vista開發技術專欄 #作者=文/彭靖灝 ===========box 程式1============ ==============end================ ===============box 程式2=============== ====================end===================== ============box 程式3============ =============end============== ===========box 程式4=========== Public Sub btnHello(ByVal sender As Object, _ ByVal e As System.Windows.RoutedEventArgs) MessageBox.Show("Yes, hello!") End Sub =============end============== ==========box 程式5========== Dim btn As New Button btn.Content = "New Button" AddHandler btn.Click, AddressOf btnAnotherHello btn.Style = Me.MainPanel.Resources.Item("CustomButton") Me.MainPanel.Children.Add(btn) =============end============== ============box 程式6=========== ==================end================== ==========box 程式7============             ==============end=============== ============box 程式8===========     ==============end================ ==========box 程式9=========== ===============end================