开发者

Access of Variables in Multiple Xaml files

开发者 https://www.devze.com 2022-12-24 19:38 出处:网络
How can we access varia开发者_运维技巧ble from one Xaml file in to another xaml file in a same projectXaml files don\'t have variables.Do you mean variables in the code-behind of the Xaml file in a Si

How can we access varia开发者_运维技巧ble from one Xaml file in to another xaml file in a same project


Xaml files don't have variables. Do you mean variables in the code-behind of the Xaml file in a Silverlight Application?

If the so the answer is yes you simply expose a variable as a property:-

public string MyVariable { get; private set; }

In the above example external code can read MyVariable but can't write to it.

Having said that I'm gonna guess that is not what you are after but thats the problem when you only use a single sentence in your question. ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消