- Controls for Windows apps
- Intro
- Get the Windows UI Library
- Alphabetical index
- XAML Controls Gallery
- Additional controls
- findstr
- Syntax
- Parameters
- Remarks
- Examples
- Элементы управления приложений для Windows Controls for Windows apps
- Вступление Intro
- Получение библиотеки пользовательского интерфейса Windows Get the Windows UI Library
- Алфавитный указатель Alphabetical index
- XAML Controls Gallery XAML Controls Gallery
- Дополнительные элементы управления Additional controls
Controls for Windows apps
In Windows app development, a control is a UI element that displays content or enables interaction. Controls are the building blocks of the user interface. A pattern is a recipe for combining several controls to make something new.
We provide 45+ controls for you to use, ranging from simple buttons to powerful data controls like the grid view. These controls are a part of the Fluent Design System and can help you create a bold, scalable UI that looks great on all devices and screen sizes.
The articles in this section provide design guidance and coding instructions for adding controls & patterns to your Windows app.
Intro
General instructions and code examples for adding and styling controls in XAML and C#.
Add controls and handle events
There are 3 key steps to adding controls to your app: Add a control to your app UI, set properties on the control, and add code to the control’s event handlers so that it does something.
Styling controls
You can customize the appearance of your apps in many ways by using the XAML framework. Styles let you set control properties and reuse those settings for a consistent appearance across multiple controls.
Get the Windows UI Library
Some controls are only available in the Windows UI Library (WinUI), a NuGet package that contains new controls and UI features. To get it, see the Windows UI Library overview and installation instructions.
Starting with WinUI 2.2, the default style for many controls has been updated to use rounded corners. For more info, see Corner radius.
Alphabetical index
Detailed information about specific controls and patterns.
- Animated visual player (see Lottie)
- Auto-suggest box
- Button
- Calendar date picker
- Calendar view
- Checkbox
- Color picker
- Combo box
- Command bar
- Command bar flyout
- Contact card
- Content dialog
- Content link
- Context menu
- Date picker
- Dialogs and flyouts
- Drop down button
- Flip view
- Flyout
- Forms (pattern)
- Grid view
- Hyperlink
- Hyperlink button
- Images and image brushes
- Inking controls
- List/details (pattern)
- List view
- Map control
- Media playback
- Menu bar
- Menu flyout
- Navigation view
- Number box
- Parallax view
- Password box
- Person picture
- Pivot
- Progress bar
- Progress ring
- Radio button
- Rating control
- Repeat button
- Rich edit box
- Rich text block
- Scroll viewer
- Search (pattern)
- Semantic zoom
- Shapes
- Slider
- Split button
- Split view
- Swipe control
- Tab view
- Teaching tip
- Text block
- Text box
- Time picker
- Toggle switch
- Toggle button
- Toggle split button
- Tooltips
- Tree view
- Two-pane view
- Web view
XAML Controls Gallery
Get the XAML Controls Gallery app from the Microsoft Store to see these controls and the Fluent Design System in action. The app is an interactive companion to this website. When you have it installed, you can use links on individual control pages to launch the app and see the control in action.
Additional controls
Additional controls for Windows development are available from companies such as Telerik, SyncFusion, DevExpress, Infragistics, ComponentOne, and ActiPro. These controls provide additional support for enterprise and .NET developers by augmenting the standard system controls with custom controls and services.
findstr
Searches for patterns of text in files.
Syntax
Parameters
Parameter | Description |
---|---|
/b | Matches the text pattern if it is at the beginning of a line. |
/e | Matches the text pattern if it is at the end of a line. |
/l | Processes search strings literally. |
/r | Processes search strings as regular expressions. This is the default setting. |
/s | Searches the current directory and all subdirectories. |
/i | Ignores the case of the characters when searching for the string. |
/x | Prints lines that match exactly. |
/v | Prints only lines that don’t contain a match. |
/n | Prints the line number of each line that matches. |
/m | Prints only the file name if a file contains a match. |
/o | Prints character offset before each matching line. |
/p | Skips files with non-printable characters. |
/off[line] | Does not skip files that have the offline attribute set. |
/f: | Gets a file list from the specified file. |
/c: | Uses the specified text as a literal search string. |
/g: | Gets search strings from the specified file. |
/d: | Searches the specified list of directories. Each directory must be separated with a semicolon (;), for example dir1;dir2;dir3 . |
/a: | Specifies color attributes with two hexadecimal digits. Type color /? for additional information. |
Specifies the text to search for in filename. Required. | |
[\ :][ |
] [. ]
Remarks
All findstr command-line options must precede strings and filename in the command string.
Regular expressions use both literal characters and meta-characters to find patterns of text, rather than exact strings of characters.
A literal character is a character that doesn’t have a special meaning in the regular-expression syntax; instead, it matches an occurrence of that character. For example, letters and numbers are literal characters.
A meta-character is a symbol with special meaning (an operator or delimiter) in the regular-expression syntax.
The accepted meta-characters are:
Meta-character | Value |
---|---|
. | Wildcard — Any character |
* | Repeat — Zero or more occurrences of the previous character or class. |
^ | Beginning line position — Beginning of the line. |
$ | Ending line position — End of the line. |
[class] | Character class — Any one character in a set. |
[^class] | Inverse class — Any one character not in a set. |
[x-y] | Range — Any characters within the specified range. |
\x | Escape — Literal use of a meta-character. |
\ | Beginning word position — Beginning of the word. |
string\> | Ending word position — End of the word. |
The special characters in regular expression syntax have the most power when you use them together. For example, use the combination of the wildcard character ( . ) and repeat ( * ) character to match any string of characters: .*
Use the following expression as part of a larger expression to match any string beginning with b and ending with ing: b.*ing
To search for multiple strings in a set of files, you must create a text file that contains each search criterion on a separate line.
Use spaces to separate multiple search strings unless the argument is prefixed with /c.
Examples
To search for hello or there in file x.y, type:
To search for hello there in file x.y, type:
To find all occurrences of the word Windows (with an initial capital letter W) in the file proposal.txt, type:
To search every file in the current directory and all subdirectories that contained the word Windows, regardless of the letter case, type:
To find all occurrences of lines that begin with FOR and are preceded by zero or more spaces (as in a computer program loop), and to display the line number where each occurrence is found, type:
To list the exact files that you want to search in a text file, use the search criteria in the file stringlist.txt, to search the files listed in filelist.txt, and then to store the results in the file results.out, type:
To list every file containing the word computer within the current directory and all subdirectories, regardless of case, type:
To list every file containing the word computer and any other words that begin with comp, (such as compliment and compete), type:
Элементы управления приложений для Windows Controls for Windows apps
В разработке приложений для Windows элемент управления — это элемент пользовательского интерфейса, отображающий содержимое или обеспечивающий взаимодействие. In Windows app development, a control is a UI element that displays content or enables interaction. Элементы управления — это основа пользовательского интерфейса. Controls are the building blocks of the user interface. Шаблон — это макет для объединения нескольких элементов управления, позволяющий получить что-то новое. A pattern is a recipe for combining several controls to make something new.
Мы предоставляем более 45 элементов управления — от простых кнопок до мощных элементов управления данными, таких как представление сетки. We provide 45+ controls for you to use, ranging from simple buttons to powerful data controls like the grid view. Эти элементы управления являются частью системы Fluent Design и помогают создавать удобный и масштабируемый пользовательский интерфейс, который прекрасно выглядит на всех устройствах и экранах разного размера. These controls are a part of the Fluent Design System and can help you create a bold, scalable UI that looks great on all devices and screen sizes.
В статьях в этом разделе представлены инструкции по проектированию и программированию для добавления элементов управления и шаблонов в приложение для Windows. The articles in this section provide design guidance and coding instructions for adding controls & patterns to your Windows app.
Вступление Intro
Общие инструкции и примеры кода для добавления и настройки стиля элементов управления на языках XAML и C#. General instructions and code examples for adding and styling controls in XAML and C#.
Добавление элементов управления и обработка событий Add controls and handle events
Три основных действия для добавления элементов управления в приложение: добавление элемента управления в пользовательский интерфейс приложения, установка свойств элемента управления и добавление кода в обработчики событий элемента управления, чтобы он начал функционировать. There are 3 key steps to adding controls to your app: Add a control to your app UI, set properties on the control, and add code to the control’s event handlers so that it does something.
Настройка стиля элементов управления Styling controls
Платформа XAML предоставляет множество способов настройки внешнего вида приложений. You can customize the appearance of your apps in many ways by using the XAML framework. С помощью стилей вы можете настраивать свойства элементов управления и многократно использовать эти параметры, чтобы придать единообразный внешний вид нескольким элементам управления. Styles let you set control properties and reuse those settings for a consistent appearance across multiple controls.
Получение библиотеки пользовательского интерфейса Windows Get the Windows UI Library
Некоторые элементы управления доступны только в библиотеке пользовательского интерфейса Windows (WinUI). Это пакет NuGet, который содержит новые элементы управления и компоненты пользовательского интерфейса. Some controls are only available in the Windows UI Library (WinUI), a NuGet package that contains new controls and UI features. Чтобы получить ее, ознакомьтесь с общими сведениями и инструкциями по установке библиотеки пользовательского интерфейса Windows. To get it, see the Windows UI Library overview and installation instructions.
Начиная с версии WinUI 2.2 стиль по умолчанию для многих элементов управления обновлен для использования скругленных углов. Starting with WinUI 2.2, the default style for many controls has been updated to use rounded corners. Дополнительные сведения см. в разделе о радиусе угла. For more info, see Corner radius.
Алфавитный указатель Alphabetical index
Подробные сведения о конкретных элементах управления и шаблонах. Detailed information about specific controls and patterns.
- Анимированный визуальный проигрыватель (см. сведения о Lottie)
- Поле автозаполнения Auto-suggest box
- Кнопка Button
- Выбор даты в календаре Calendar date picker
- Представление календаря Calendar view
- Флажок Checkbox
- Палитра
- Поле со списком Combo box
- Панель команд Command bar
- Всплывающее меню панели команд
- Карточка контакта Contact card
- Диалоговое окно содержимого Content dialog
- Ссылка на содержимое Content link
- Контекстное меню Context menu
- Выбор даты Date picker
- Диалоговые окна и всплывающие элементы Dialogs and flyouts
- Кнопка раскрытия списка
- Представление пролистывания Flip view
- Flyout Flyout
- Формы (шаблон) Forms (pattern)
- Представление в виде сетки Grid view
- Гиперссылка Hyperlink
- Кнопка с гиперссылкой Hyperlink button
- Изображения и кисти изображений Images and image brushes
- Элементы управления рукописным вводом Inking controls
- Список/сведения (шаблон) List/details (pattern)
- Представление списка List view
- Элемент управления картой Map control
- Воспроизведение мультимедиа Media playback
- Строка меню
- Всплывающее меню Menu flyout
- Представление навигации
- Поле ввода номера телефона
- Представление параллакса
- Поле ввода пароля Password box
- Изображение пользователя
- Сведение Pivot
- Индикатор выполнения
- Кольцевой индикатор выполнения
- Переключатель
- Элемент управления «Оценка»
- Кнопка повтора Repeat button
- Поле форматируемого текста Rich edit box
- Блок форматированного текста Rich text block
- Средство прокрутки Scroll viewer
- Поиск (шаблон) Search (pattern)
- Контекстное масштабирование Semantic zoom
- Фигуры Shapes
- Ползунок Slider
- Разворачивающаяся кнопка
- Комбинированный режим Split view
- Элемент управления для прокрутки
- Вкладки
- Совет по обучению
- Блок текста Text block
- Текстовое поле Text box
- Выбор времени Time picker
- Тумблер Toggle switch
- Выключатель Toggle button
- Выключатель с разделением Toggle split button
- Подсказки Tooltips
- Представление в виде дерева
- Представление с двумя панелями
- Представление веб-страницы Web view
XAML Controls Gallery XAML Controls Gallery
Скачайте приложение XAML Controls Gallery с сайта Microsoft Store, чтобы просмотреть эти элементы управления и систему Fluent Design в действии. Get the XAML Controls Gallery app from the Microsoft Store to see these controls and the Fluent Design System in action. Данное приложение является интерактивным помощником для этого веб-сайта. The app is an interactive companion to this website. После его установки вы можете использовать ссылки на отдельные страницы элементов управления для запуска приложения, чтобы увидеть его в действии. When you have it installed, you can use links on individual control pages to launch the app and see the control in action.
Дополнительные элементы управления Additional controls
Дополнительные элементы управления для разработки для Windows предлагают такие компании, как Telerik, SyncFusion, DevExpress, Infragistics, ComponentOne и ActiPro. Additional controls for Windows development are available from companies such as Telerik, SyncFusion, DevExpress, Infragistics, ComponentOne, and ActiPro. Эти элементы управления обеспечивают дополнительную поддержку для предприятий и разработчиков .NET путем дополнения стандартных системных элементов управления пользовательскими элементами управления и службами. These controls provide additional support for enterprise and .NET developers by augmenting the standard system controls with custom controls and services.