sketchflowexpression-sketchflow

sketch flow -- how do we rename .xaml and .cs files without breaking sketchflow map?


how do we rename .xaml and .cs files?

would like to be able to keep development in synch with the original sketchflow. i.e. sketchflow has features such as the ability to collect client feedback on a per screen basis, etc.

... I kind of answered my own question here, so I'll post it as a follow up. Asked the original question 9 hours ago on the MS site without response... still trying to work out where the best place is to talk to the community, so sorry for the duplicate.


THE ANSWER (IS THERE A BETTER ONE?)

Context: Sketchflow is a prototyping tool. In large teams possibly you want to keep the prototype seperate from the finished version, or there's a large prototyping phase.

My view is that I really like Sketchflow. It's one of the coolest things I've seen for a while (well done Microsoft).

... so for me, I want the prototype to become a the finished product. I want the designers to step in and make transitions whenever they want. I want the designers to kick the process off, and the developers to put in the detail. I'd like our customers to be able to post feedback at any time during the build process. btw: get your developers to check out MVVM. It's very cool.

My bet is that the feedback could get lost if you make a breaking change (a file rename) -- so just beware of that. That wont be a problem for us. We'll get our file names to make sense and then mostly leave it alone. Of course MS could fix this this by creating a globally unique id (Guid) for each screen that is created. Perhaps they've done this already. If someone from MS reads this, please put this on your requested features list.

THE ANSWER:

So here is the answer that works for me:

don't try to hand-edit the xaml / cs, as all the cross referencing that you might be doing with behaviors will break if you aren't really careful. Typical files that need to be modified: .csproj, Sketch.Flow, xxxx.xaml, and xxxx.cs.

To auto do it, download a tool like Ultraedit. Alternatively, you might be able to just use VS 2010 (untested).

Steps with ultraedit:

(BACKUP YOUR PROJECT FIRST)

  1. Search/Replace In Files...

  2. Find in files... "Screen_1_19"

  3. Replace with... "Welcome"

  4. In Files/Types... "."

  5. Directory...

  6. Match Whole Word Only

  7. Hit "Start"

  8. follow the prompts

  9. rename the files (.xaml & .cs) to be Welcome.???? (where ???? is .xaml or .cs) . Since I use SVN, this step gets done for me in one step (no big deal).

    • If using VS2010 for steps 1 through 8, be careful do longer string replacements first e.g. Screen_1_19 before Screen_1. I think VS treats _ as a word break. On ultraedit you'll be fine.

If there's interest, in the spare time that I don't currently have, I could release a quick tool to do this on codeplex.

** note: because we are working with XML and XML is very particular about being correct, I close expression blend down, and then reopen it again after the replace/rename to see if I was successful + my screen map still has all the flow lines still drawn in.


Solution

  • answer is above in the body of the question.