Did you try the following?
Dim VALUE as integer
Dim source As String = [String].Format("/Exercises;component/CustomTheme/ThemeResources" & VALUE & ".xaml")
Where Value is a variable and you can set it what you like as long as its valid for an .xaml file you have.
I'm not 100% if it will work because the "Exercises;" kind of threw me off