Silverlight/XAML – Learning by Coding
1: <?xml version="1.0" encoding="UTF-8"?>
2: <!-- coded by Thomas Meinike 10/08 -->
3: <UserControl x:Class="sl2_messagebox.Page"
4: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
5: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6: Width="800" Height="600">
7:
8: <Canvas>
9: <Button Content="Meldung anzeigen ..." FontSize="12" Margin="30" Padding="10"
10: Click="Button_Click"/>
11: </Canvas>
12:
13:
14: <!-- // zusätzlich verwendeter VB.NET-Code in Page.xaml.vb:
15:
16: Partial Public Class Page
17: Inherits UserControl
18:
19: Public Sub New()
20: InitializeComponent()
21: End Sub
22:
23: Private Sub Button_Click(ByVal sender As System.Object, _
24: ByVal e As System.Windows.RoutedEventArgs)
25: MessageBox.Show("Ausgabe einer Meldung" + vbCrLf + "eine weitere Zeile ...", _
26: "Titelzeile ...", MessageBoxButton.OK) 'alternativ: MessageBoxButton.OKCancel
27: End Sub
28: End Class
29:
30: -->
31:
32: </UserControl>
[zum Anfang]