Class MainWindowクラスの全コード
Class MainWindow
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
If myControl.OpenFileDialog1.ShowDialog() = Forms.DialogResult.OK Then
myControl.PictureBox1.Load(myControl.OpenFileDialog1.FileName)
End If
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
myControl.PictureBox1.Image = Nothing
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button3.Click
If myControl.ColorDialog1.ShowDialog() = Forms.DialogResult.OK Then
myControl.PictureBox1.BackColor = myControl.ColorDialog1.Color
End If
End Sub
Private Sub Button4_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button4.Click
Close()
End Sub
Private Sub CheckBox1_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Checked
myControl.PictureBox1.SizeMode = Forms.PictureBoxSizeMode.Zoom
End Sub
Private Sub CheckBox1_Unchecked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Unchecked
myControl.PictureBox1.SizeMode = Forms.PictureBoxSizeMode.StretchImage
End Sub
End Class