using System; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; namespace DTS.Viewer { public class ComponentsGroupControl : Control { public class ClickEventArgs : EventArgs { public ClickEventArgs() : base() { } } //public delegate void ClickEventHandler(Object sender, ClickEventArgs e); //public event ClickEventHandler OnClicked; private static RoutedCommand _click; public static RoutedCommand ClickCommand { get { return _click; } } private static void OnCommandExecute(object sender, ExecutedRoutedEventArgs e) { var control = sender as ComponentsGroupControl; } private static void InitializeCommands() { _click = new RoutedCommand("ClickCommand", typeof(ComponentsGroupControl)); CommandManager.RegisterClassCommandBinding(typeof(ComponentsGroupControl), new CommandBinding(_click, OnCommandExecute)); } static ComponentsGroupControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ComponentsGroupControl), new FrameworkPropertyMetadata(typeof(ComponentsGroupControl))); InitializeCommands(); } public static readonly DependencyProperty ImageProperty = DependencyProperty.Register("Image", typeof(ImageSource), typeof(ComponentsGroupControl), new UIPropertyMetadata(null)); public ImageSource Image { get { return (ImageSource)GetValue(ImageProperty); } set { SetValue(ImageProperty, value); } } public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(ComponentsGroupControl), new UIPropertyMetadata("Title")); public string Title { get { return (string)GetValue(TitleProperty); } set { SetValue(TitleProperty, value); } } /*public static readonly DependencyProperty SubtitleProperty = DependencyProperty.Register("Subtitle", typeof(string), typeof(ComponentsGroupControl), new UIPropertyMetadata("Subtitle")); public string Subtitle { get { return (string)GetValue(SubtitleProperty); } set { SetValue(SubtitleProperty, value); } }*/ //public static readonly DependencyProperty TabItemProperty = DependencyProperty.Register("TabItem", typeof(AssemblyNameImage), typeof(ComponentsGroupControl), new PropertyMetadata()); //public DataModel.TabPageItem TabItem //{ // get { return (DataModel.TabPageItem)GetValue(TabItemProperty); } // set { SetValue(TabItemProperty, value); } //} } }