在c#(winRt)中使用Reflection,可以动态获取userControl所属页面的根目录吗?
<SearchBox PlaceholderText="{Binding placeholder,Mode=TwoWay}"
Width="300"
Margin="20,0,20,0"
SearchHistoryEnabled="False"
FocusOnKeyboardInput="False"
ChooseSuggestionOnEnter="True"
SuggestionsRequested="SearchBoxSuggestions"
ResultSuggestionChosen="SuggestionChoosen"
QueryChanged="SearchQueryChanged"
HorizontalAlignment="Left"
x:Name="searchBox"
/>
public void SuggestionChoosen(Windows.UI.Xaml.Controls.SearchBox sender, SearchBoxResultSuggestionChosenEventArgs args)
{
int p = Convert.ToInt32(args.Tag);
TransporterExt t = new TransporterExt();
t = suggested[p];
selected = t;
//I WANT TO GET HERE THE ROOT OF THE PAGE IN WHICH USER CONTROLLER BELONGS TO
}
如何从UserControl的codeBehind获取页面的根目录?