File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/Shared/HandyControl_Shared/Controls/Input Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,16 @@ namespace HandyControl.Controls
1212{
1313 public class ImageSelector : Control
1414 {
15+ public static readonly RoutedEvent ImageSelectedEvent =
16+ EventManager . RegisterRoutedEvent ( "ImageSelected" , RoutingStrategy . Bubble ,
17+ typeof ( RoutedEventHandler ) , typeof ( ImageSelector ) ) ;
18+
19+ public event RoutedEventHandler ImageSelected
20+ {
21+ add => AddHandler ( ImageSelectedEvent , value ) ;
22+ remove => RemoveHandler ( ImageSelectedEvent , value ) ;
23+ }
24+
1525 public ImageSelector ( ) => CommandBindings . Add ( new CommandBinding ( ControlCommands . Switch , SwitchImage ) ) ;
1626
1727 private void SwitchImage ( object sender , ExecutedRoutedEventArgs e )
@@ -34,6 +44,7 @@ private void SwitchImage(object sender, ExecutedRoutedEventArgs e)
3444 } ) ;
3545 SetValue ( HasValuePropertyKey , ValueBoxes . TrueBox ) ;
3646 SetCurrentValue ( ToolTipProperty , dialog . FileName ) ;
47+ RaiseEvent ( new RoutedEventArgs ( ImageSelectedEvent , this ) ) ;
3748 }
3849 }
3950 else
You can’t perform that action at this time.
0 commit comments