Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight 3:获取当前XAML文件名的值_Silverlight_Xaml_Silverlight 3.0 - Fatal编程技术网

Silverlight 3:获取当前XAML文件名的值

Silverlight 3:获取当前XAML文件名的值,silverlight,xaml,silverlight-3.0,Silverlight,Xaml,Silverlight 3.0,我只想得到当前的XAML文件名,这样我就可以在用户控件中做出决定。你知道Silverlight 3中这个值的位置吗 例如: if (currentPage == "home") homeLink.foreground = "white" elseif (cuurentPage == "settings") settingsLink.foreground = "white" 也许我没有理解你的问题,但是这个.GetType.Name应该会提供你所需要的。如果你找不

我只想得到当前的XAML文件名,这样我就可以在用户控件中做出决定。你知道Silverlight 3中这个值的位置吗

例如:

if (currentPage == "home")  
    homeLink.foreground = "white"  
elseif (cuurentPage == "settings")  
    settingsLink.foreground = "white"  

也许我没有理解你的问题,但是这个.GetType.Name应该会提供你所需要的。

如果你找不到答案,你可以在用户控件中添加一个依赖属性,并在每个页面中设置它。很好!这也会起作用。谢谢我想这就是我的答案。谢谢你的意见!导航服务导航=新导航服务;字符串currentPage=nav.Source.Host;