Click here to Skip to main content
Sign Up to vote bad
good
Hello. I use themeresources.xaml as a resource of my theme in my application. I have several themeresourcesX.xaml (x=1,2,3,4etc) Each contains other styles etc.
 
How should I program button, to change code from App.xaml.vb
       Dim source As String = [String].Format("/Exercises;component/CustomTheme/ThemeResources.xaml")
 
to
       Dim source As String = [String].Format("/Exercises;component/CustomTheme/ThemeResources2.xaml")
 
Button will be placed in Settings.xaml page.
Is that possible to change code of another page ?
 
It is a windows phone application.
Posted 17 Dec '12 - 2:22
Edited 17 Dec '12 - 2:23


1 solution

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
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 355
1 OriginalGriff 325
2 Arun Vasu 268
3 CPallini 213
4 Tadit Dash 201
0 Sergey Alexandrovich Kryukov 10,005
1 OriginalGriff 7,654
2 CPallini 4,171
3 Rohan Leuva 3,447
4 Maciej Los 2,974


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid