title: Custom control design - opening edit dialog responsibility
body: <p>I have a custom Calendar control that is showing appointments in a chosen period of time.</p>
  
  <p>I would like to add the ability to create/edit appointments. Appointment edit dialog (fields, save button, cancel button) should open when I click on a day. </p>
  
  <p>Who should be responsible for opening the edit dialog?</p>
  
  <ol>
  <li><p>Should the control be responsible for opening the dialog and have just <code>SaveCommand</code> and <code>EditedAppointment</code> property. </p></li>
  <li><p>Or should it just expose commands/events for the user like <code>BeginEditCommand/DayClick event</code> and the user of my control would have to implement the dialog by herself (instead of just implementing Save command)? I think <a href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.datagrid?view=netframework-4.8#events" rel="nofollow noreferrer">DataGrid works that way</a></p></li>
  </ol>
  
  <p>Both solutions will work but which is better?</p>
  
  <p>It's my first custom control in WPF so excuse me for a noob question.</p>