Saturday, March 13, 2010 11:24 PMI would like to extend SketchFlow player functionality by adding some new controls in the user interface. For example, a combo box which will list a set of possible values for input variables, and have the corresponding screen/state load. Is it possible to do this in SketchFlow?
I have noticed that there is a PlayerContext object which seems to have stuff for this purpose. Will that help?
Monday, March 15, 2010 3:17 PMModeratorIf you are talking about putting UI into the already existing UI, then this is theoretically possible, but it is not a supported scenario. There are no guarantees that the player functionality will not change and break what you have created.
If you want to do this as part of your created screens inside the "artboard" view of the player, then there are a few ways you could do it, using behaviors, or code behind code using the PlayerContext as you suggested. But once again, it is not a supported API, and could change.
Monday, March 15, 2010 7:02 PMHi Chuck
Thanks for the reply. I have a follow up question.
I understand this is not a supported scenario, but this is for experimental purposes at the moment. If I decide to add controls to the artboard view of the player, I need to get access to some kind of LayoutRoot object as I understand it.. how to get access to this LayoutRoot using the PlayerContext?
I am guessing this is in the works for the future, but an extensible and full fledged SketchFlow API would make it a versatile and extremely useful platform.
Monday, March 15, 2010 8:08 PMModeratorYou are on the right track there with the LayoutRoot.
Are you familiar with reflector and snoop? (http://blois.us/Snoop/)
Are you using WPF or SL?
If you are using WPF, you can use snoop to explore the visuals, and reflector to explore the code pieces. You should be able to search through the visual tree and find the visual objects you want to use. From there you may be able to add controls. Can't say if it will work or not, because I've never tried it.
If you example the app.xaml.cs file you can see where the rootvisual is created, that also might be a starting place for you.