简体   繁体   English

Windows.UI.Xaml.Controls.SearchBox在哪里?

[英]Where is Windows.UI.Xaml.Controls.SearchBox?

I can't add using Windows.UI.Xaml.Controls.SearchBox; 我无法using Windows.UI.Xaml.Controls.SearchBox;添加using Windows.UI.Xaml.Controls.SearchBox; to my Windows Store Application. 到我的Windows应用商店应用程序。 Visual Studio doesn't seem to know what I'm talking about. Visual Studio似乎不知道我在说什么。 It tells me that it doesn't exist in the namespace. 它告诉我它在名称空间中不存在。

A namespace is a collection of classes, to use one of the classes you need to reference the respective namespace. 名称空间是类的集合,要使用其中一个类,您需要引用相应的名称空间。

Windows.UI.Xaml.Controls is namespace Windows.UI.Xaml.Controls名称空间

SearchBox is a class SearchBox是一个

You need to add reference of Windows.UI.Xaml.Controls : 您需要添加Windows.UI.Xaml.Controls引用:

using Windows.UI.Xaml.Controls;

and create an object of Windows.UI.Xaml.Controls.SearchBox : 并创建Windows.UI.Xaml.Controls.SearchBox对象:

Windows.UI.Xaml.Controls.SearchBox sbox = new Windows.UI.Xaml.Controls.SearchBox();
this.Controls.Add(sbox); //this line will add it to your app page controls list

Here is the list of controls available in Windows.UI.Xaml.Controls namespace. Windows.UI.Xaml.Controls命名空间中可用的控件列表。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows.UI.Xaml.Controls.TreeView w/ Selection=“Multiple”,复选框选中/未选中事件在哪里? - Windows.UI.Xaml.Controls.TreeView w/ Selection=“Multiple”, where is the checkbox selected/unselected event? 命名空间 Windows.UI.Xaml.Controls 和 Microsoft.UI.Xaml.Controls 之间的区别 - Difference between namespace Windows.UI.Xaml.Controls and Microsoft.UI.Xaml.Controls 单元测试Windows 8 Store App UI(Xaml控件) - Unit Testing Windows 8 Store App UI (Xaml Controls) 无法将类型为“ Windows.UI.Xaml.Controls.ItemsControl”的对象转换为类型为“ Windows.UI.Xaml.Controls.Image”的对象 - Unable to cast object of type 'Windows.UI.Xaml.Controls.ItemsControl' to type 'Windows.UI.Xaml.Controls.Image' 无法分配给属性“ Windows.UI.Xaml.Controls.ContentPresenter.Content” - Failed to assign to property 'Windows.UI.Xaml.Controls.ContentPresenter.Content' 无法将字符串转换为Windows.UI.Xaml.Controls.IconElement - Unable to convert a string to Windows.UI.Xaml.Controls.IconElement 无法分配给属性“Windows.UI.Xaml.Controls.ContentControl.Content” - Failed to assign to property 'Windows.UI.Xaml.Controls.ContentControl.Content' 无法将类型为“ Windows.UI.Xaml.Controls.Grid”的对象转换为类型为“ Windows.UI.Xaml.Controls.ListView”的对象 - Unable to cast object of type 'Windows.UI.Xaml.Controls.Grid' to type 'Windows.UI.Xaml.Controls.ListView' 系统 Windows 控件中的类 命名空间 VS Windows UI XAML 控件中的类 - Classes in System Windows controls Namespace VS Classes in Windows UI XAML controls 如何从Windows.UI.Xaml.Controls.TextBox中的不同线程中读取文本-Windows Phone 8.1 - How to read text from Windows.UI.Xaml.Controls.TextBox in different thread - Windows Phone 8.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM