using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace eDosStation { /// /// Interaction logic for DosimeterDisplay.xaml /// public partial class DosimeterDisplay : UserControl { public static readonly RoutedEvent ClosedClickedEvent = EventManager.RegisterRoutedEvent( nameof(ClosedClicked), RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DosimeterDisplay)); public event RoutedEventHandler ClosedClicked { add => AddHandler(ClosedClickedEvent, value); remove => RemoveHandler(ClosedClickedEvent, value); } public DosimeterDisplay() { InitializeComponent(); } private void RadButton_Click(object sender, RoutedEventArgs e) { // Raise the event so parent controls/windows know "Close" was clicked RaiseEvent(new RoutedEventArgs(ClosedClickedEvent)); } } }