I have the following class, and want to pass the text variable as RoutedEventArgs.
public class CloseableTabItem : TabItem
{
String text;
public
Create a new subclass of RoutedEventArgs, add a property to it where you can store the variable to be passed and create a respective handler delegate of type void (object, YourNewEventArgs) which you then assign as the handler type of your event (which currently uses a normal RoutedEventHandler which hence only provides normal RoutedEventArgs).
If the event then is to be raised you need to create your new event args and pass the variable to its property for that variable. How to get the value in the handler should be self-explanatory.