UserInfo.xaml.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace HistoryView.Controls
  16. {
  17. /// <summary>
  18. /// Interaction logic for UserInfo.xaml
  19. /// </summary>
  20. public partial class UserInfo : UserControl
  21. {
  22. public UserInfo()
  23. {
  24. InitializeComponent();
  25. }
  26. public ICommand SwitchUserCommand
  27. {
  28. get { return (ICommand)GetValue(SwitchUserCommandProperty); }
  29. set { SetValue(SwitchUserCommandProperty, value); }
  30. }
  31. // Using a DependencyProperty as the backing store for SwitchUserCommand. This enables animation, styling, binding, etc...
  32. public static readonly DependencyProperty SwitchUserCommandProperty =
  33. DependencyProperty.Register("SwitchUserCommand", typeof(ICommand), typeof(UserInfo), new PropertyMetadata(default));
  34. public UserInformation User
  35. {
  36. get { return (UserInformation)GetValue(UserProperty); }
  37. set { SetValue(UserProperty, value); }
  38. }
  39. public static readonly DependencyProperty UserProperty =
  40. DependencyProperty.Register("User", typeof(UserInformation), typeof(UserInfo), new PropertyMetadata(default));
  41. }
  42. }