Finally I know the solution. I create an instance of the current class:
public static WCCSegmentControl _wccSegmentControl;
And I add this to the static method:
button.Click += new RoutedEventHandler(_wccSegmentControl.segmentcontrolButtonClick);
It works perfectly.