WPF Customcontrol based on DataGrid + Custom Events
===

I'm currently writing a Customcontrol based on the standard WPF Datagrid. I've implemented a toolbar with some functions like sorting, grouping and filtering. With an ICollectionView as ItemsSource these functions are fairly easy to implement.

My problem lies within the events the toolbar buttons should fire:
I've managed to raise the buttonclick events to my codebehind for the view (MyDataGrid.cs) via Commands (SortClick, GroupClick, FilterClick).

                                        <ToolBarTray Orientation="Vertical" Grid.Row="1" Grid.Column="2" IsLocked="True">
                                            <ToolBar Band="1" BandIndex="1" >
                                                <Button Width="24" Height="24" ToolTip="Sort" Command="{x:Static local:PDataGrid.SortClick}">
                                                    <Image Source="pack://application:,,,/PControls;component/Resources/sort.png" />
                                                </Button>
                                                <Button Width="24" Height="24" ToolTip="Filter" Command="{x:Static local:PDataGrid.GroupClick}">
                                                    <Image Source="pack://application:,,,/PControls;component/Resources/filter.png" />
                                                </Button>
                                                <Button Width="24" Height="24" ToolTip="Group" Command="{x:Static local:PDataGrid.FilterClick}">
                                                    <Image Source="pack://application:,,,/PControls;component/Resources/group.png" />
                                                </Button>
                                            </ToolBar>
                                        </ToolBarTray>

But how do I raise these events out of my view, so that any class working with my control (in my case MyDataGridView.cs) can handle them?

My ICommands are defined as static (as I saw it in some examples).
RaiseEvent which I would use to raise a RoutedEvent which my viewmodel could catch is non-static.

        public static readonly RoutedEvent SortClickEvent = EventManager.RegisterRoutedEvent("SClick", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(PDataGrid));

        public event RoutedEventHandler SClick
        {
            add { AddHandler(SortClickEvent, value); }
            remove { RemoveHandler(SortClickEvent, value); }
        }

        private void raiseSortClickEvent()
        {
            RoutedEventArgs e = new RoutedEventArgs(PDataGrid.SortClickEvent);
            RaiseEvent(e);
        }

        private static ICommand sortClick;
        public static ICommand SortClick
		{
			get
			{
				if (sortClick == null)
				{
					sortClick = new BaseCommand(sort);
				}

				return sortClick;
			}
			set { sortClick = value; }
		}

		private static void sort()
		{
			// sort() = static, therefore not working...
            //raiseSortClickEvent();
		}

Please help - maybe there is a much simpler solution which I can't see at the moment...