So first thing that I would say is yes, you can do that, but I don’t think it’s a question to be asked on a Dynamo Forum. It has really nothing to do with Dynamo. My understanding of your question is that it is not a Dynamo node that you are trying to build (because you can already do what you want in Dynamo), but rather a typical Revit plugin with a WPF UI. In that case, you can look into something called External Event for Revit. What is external event?
Let me explain first how Revit works. Revit is a single threaded application. That means that for the most part when you create a button on a ribbon to do something custom, you define it as an ExternalCommand. It executes on the same thread as the main Revit process. What that means, is that when a windows is shown, Revit window becomes inactive, and you can’t interact with it. Your code would execute, window would get closed, and then control is returned to Revit.
What you want to do, in order to be able to change a slider, and see that drive some curve in Revit is create a so called External Event driven command. It’s a type of interaction mode where UI is on its own UI thread, and doesn’t lock Revit UI up, so you can interact with both at the same time. You can do it in two ways, one is using an IdlingEvent and another using an ExternalEvent. Dynamo uses the IdlingEvent method for its execution, and that’s why you can see that when you drag a slider in Dynamo it moves something in Revit “live”.
Again, you will need to go read up about External Events or Idling Events in Revit.