/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/cmdpal/ext/SamplePagesExtension/Pages/SampleGridsListPage.cs
59 строк
3 KB
Jiří Polášek
CmdPal: Fix grid views (#43991)
01 дек 2025, 04:32
Не верифицирован
01 дек 2025, 04:32
4d3c223
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; namespace SamplePagesExtension; internal sealed partial class SampleGridsListPage : ListPage { private readonly IListItem[] _items = [ new ListItem(new SampleGalleryListPage { GridProperties = new GalleryGridLayout { ShowTitle = true, ShowSubtitle = true } }) { Title = "Gallery list page (title and subtitle)", Subtitle = "A sample gallery list page with images", Icon = IconHelpers.FromRelativePath("Assets/Images/Swirls.png"), }, new ListItem(new SampleGalleryListPage { GridProperties = new GalleryGridLayout { ShowTitle = true, ShowSubtitle = false } }) { Title = "Gallery list page (title, no subtitle)", Subtitle = "A sample gallery list page with images", Icon = IconHelpers.FromRelativePath("Assets/Images/Swirls.png"), }, new ListItem(new SampleGalleryListPage { GridProperties = new GalleryGridLayout { ShowTitle = false, ShowSubtitle = false } }) { Title = "Gallery list page (no title, no subtitle)", Subtitle = "A sample gallery list page with images", Icon = IconHelpers.FromRelativePath("Assets/Images/Swirls.png"), }, new ListItem(new SampleGalleryListPage { GridProperties = new SmallGridLayout() }) { Title = "Small grid list page", Subtitle = "A sample grid list page with text items", Icon = IconHelpers.FromRelativePath("Assets/Images/Win-Digital.png"), }, new ListItem(new SampleGalleryListPage { GridProperties = new MediumGridLayout { ShowTitle = true } }) { Title = "Medium grid (with title)", Subtitle = "A sample grid list page with text items", Icon = IconHelpers.FromRelativePath("Assets/Images/Win-Digital.png"), }, new ListItem(new SampleGalleryListPage { GridProperties = new MediumGridLayout { ShowTitle = false } }) { Title = "Medium grid (hidden title)", Subtitle = "A sample grid list page with text items", Icon = IconHelpers.FromRelativePath("Assets/Images/Win-Digital.png"), } ]; public SampleGridsListPage() { Icon = new IconInfo("\uE7C5"); Name = "Grid and gallery lists"; } public override IListItem[] GetItems() => _items; }