locked
Programmatically get PrototypeRevision RRS feed

  • Question

  • Is there any way to programmatically "get" the value of the PrototypeRevision tag in the sketch.flow file?  This value is used when publishing the project to SharePoint and I would like to display it in a header in the application so the users know they are looking at the correct version.

    I know I can do this manually but since there is already a version number available I would like to use that.

    I am using Expression Blend version 4 and C#.

    Any help is appreciated.

    Thanks

    Friday, May 4, 2012 2:53 PM

Answers

  • The only supported functionality is documented here:

    http://msdn.microsoft.com/en-us/library/ff723948(v=Expression.40).aspx

    You can display either the assembly version number of the prototype revision number you mentioned, I believe you use {pr} for the revision number. 

    Friday, May 4, 2012 4:19 PM
    Moderator
  • If the branding support isn't enough for you, what follows here might help. However, this is completely unsupported, subject to change at any time, and may or may not work for you.

    You can pull the prototype revision data at runtime using the following:

    int rev = Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.RuntimeData.PrototypeRevision;

    Friday, May 4, 2012 4:26 PM
    Moderator

All replies

  • The only supported functionality is documented here:

    http://msdn.microsoft.com/en-us/library/ff723948(v=Expression.40).aspx

    You can display either the assembly version number of the prototype revision number you mentioned, I believe you use {pr} for the revision number. 

    Friday, May 4, 2012 4:19 PM
    Moderator
  • If the branding support isn't enough for you, what follows here might help. However, this is completely unsupported, subject to change at any time, and may or may not work for you.

    You can pull the prototype revision data at runtime using the following:

    int rev = Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.RuntimeData.PrototypeRevision;

    Friday, May 4, 2012 4:26 PM
    Moderator
  • Thanks Chuck!

    Both suggestions accomplish what I need perfectly.

    Friday, May 4, 2012 6:19 PM