更改另一页代码的代码 [英] Code that changes code of another page

查看:61
本文介绍了更改另一页代码的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我在我的应用程序中使用themeresources.xaml作为我主题的资源。我有几个themeresourcesX.xaml(x = 1,2,3,4etc)每个包含其他样式等。



如何编程按钮,从App更改代码.xaml.vb

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将被放置在Settings.xaml页面。

是否可以更改另一页的代码?



这是一个Windows Phone应用程序。



Button will be placed in Settings.xaml page.
Is that possible to change code of another page ?

It is a windows phone application.

推荐答案

您是否尝试过以下操作?



Did you try the following?

Dim VALUE as integer
Dim source As String = [String].Format("/Exercises;component/CustomTheme/ThemeResources" & VALUE & ".xaml")







其中,Value是一个变量,你可以将它设置为你想要的只要它对.xaml文件有效。



我不是100%,如果它能起作用,因为练习;有点让我失望




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


这篇关于更改另一页代码的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆