Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/300.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
C# 不在帧树中的Windows 8.1渲染控件_C#_Xaml_Windows 8.1_Win Universal App - Fatal编程技术网

C# 不在帧树中的Windows 8.1渲染控件

C# 不在帧树中的Windows 8.1渲染控件,c#,xaml,windows-8.1,win-universal-app,C#,Xaml,Windows 8.1,Win Universal App,我有一个问题,因为我的应用程序渲染按钮不在控件树中。我无法通过父属性找到它们。我甚至编写了代码来隐藏任何东西,这些按钮仍然存在 var parrent = Frame as FrameworkElement; while (parrent != null) { parrent.Visibility = Windows.UI.Xaml.Visibility.Collapsed; parrent = parrent.Parent as FrameworkElement; } 使用此

我有一个问题,因为我的应用程序渲染按钮不在控件树中。我无法通过父属性找到它们。我甚至编写了代码来隐藏任何东西,这些按钮仍然存在

var parrent = Frame as FrameworkElement;
while (parrent != null)
{
    parrent.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
    parrent = parrent.Parent as FrameworkElement;
}
使用此代码后,按钮仍然存在

能否显示创建页面和按钮的XAML或C#(或VB)代码?没有证据表明您正在调用为正确对象提供的代码。