[Visual Basic] Public Property ButtonClearAll As System.Windows.Controls.Button
[C#] public System.Windows.Controls.Button ButtonClearAll {get; set;}
プロパティ値
System.Windows.Controls.Button 型の値
解説
「すべてのオブジェクトをクリア」用の Button コントロールを示します。
ToolBarAnnotation が持つ任意のボタンの、詳細な設定やクリックイベント取得が可能です。
例
(1) 「すべてのオブジェクトをクリア」ボタンのイメージを変更する。
[Visual Basic.NET] Dim image As Image = new Image() image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute)) ToolBarAnnotation1.ButtonClearAll.Image.Content = image [Visual C#.NET] Image image = new Image(); image.Source = new BitmapImage(new Uri("pack://application:,,,/image/image.png", UriKind.Absolute)); toolBarAnnotation1.ButtonClearAll.Image.Content = image;(2) 「選択」ボタンのクリックイベントを発生させ、取得する。
[Visual Basic.NET] ※FormLoad イベント内などで、ButtonSelect のクリックイベントのデリゲートを設定しておく AddHandler ToolBarAnnotation1.ButtonSelect.Click, AddressOf Me.ButtonSelect_Click 'イベントハンドラデリゲート Private Sub ButtonSelect_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) 'イベント発生で処理する内容をここに記載 End Sub [Visual C#.NET] ※FormLoad イベント内などで、ButtonSelect のクリックイベントのデリゲートを設定しておく toolBarAnnotation1.ButtonSelect.Click += new MouseEventHandler(ButtonSelect_Click); //イベントハンドラデリゲート private void ButtonSelect_Click(object sender, RoutedEventArgs e) { //イベント発生で処理する内容をここに記載 }
参照
ToolBarAnnotation メンバ | Newtone.ImageKit.WPF.ToolBarAnnotation