Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added UI Data Converter library #30

Merged
merged 13 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ body:
- "UI.Controls.ChipBox"
- "UI.Controls.DropDownList"
- "UI.Controls.FilePicker"
- "UI.Controls.RichEditToolbar"
- "UI.Controls.Validator"
- "UI.Data.Converters"
- "UI.Styling"
- "UI.ViewManagement"
- "UI.Views.Dialogs"
Expand Down
73 changes: 73 additions & 0 deletions MADE-Uno.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.Controls.ChipBox",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.Controls.RichEditToolbar", "src\MADE.UI.Controls.RichEditToolbar\MADE.UI.Controls.RichEditToolbar.csproj", "{258FB310-DC02-488C-97C7-CD1226EAAEC8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.UI.Data.Converters", "src\MADE.UI.Data.Converters\MADE.UI.Data.Converters.csproj", "{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
samples\MADE.Samples\MADE.Samples.Shared\MADE.Samples.Shared.projitems*{04f1b32d-9056-43fc-b4c2-b8c5481bdacb}*SharedItemsImports = 4
Expand Down Expand Up @@ -1104,6 +1106,76 @@ Global
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x64.Build.0 = Release|Any CPU
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x86.ActiveCfg = Release|Any CPU
{258FB310-DC02-488C-97C7-CD1226EAAEC8}.Release|x86.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|ARM.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|ARM64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|ARM64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|iPhone.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|x64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|x64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|x86.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.AppStore|x86.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|ARM.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|ARM64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|iPhone.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|x64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|x64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|x86.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Debug|x86.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|Any CPU.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|Any CPU.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|ARM.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|ARM.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|ARM64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|ARM64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|iPhone.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|iPhone.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|iPhoneSimulator.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|x64.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|x64.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|x86.ActiveCfg = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Package|x86.Build.0 = Debug|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|Any CPU.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|ARM.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|ARM.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|ARM64.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|ARM64.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|iPhone.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|iPhone.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|x64.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|x64.Build.0 = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|x86.ActiveCfg = Release|Any CPU
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -1126,6 +1198,7 @@ Global
{442D1E25-FFD1-405D-A1FC-40CAFCAD190C} = {01380FB8-F8A7-4416-AABA-5407574B7723}
{D1A16208-5A34-4CC1-B175-01B5AC99E69E} = {01380FB8-F8A7-4416-AABA-5407574B7723}
{258FB310-DC02-488C-97C7-CD1226EAAEC8} = {01380FB8-F8A7-4416-AABA-5407574B7723}
{55D12223-8B53-4EC7-8CD2-05FC8A84BA7C} = {01380FB8-F8A7-4416-AABA-5407574B7723}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3921AD86-E6C0-4436-8880-2D9EDFAD6151}
Expand Down
Binary file modified assets/SampleIcons.afdesign
Binary file not shown.
62 changes: 62 additions & 0 deletions docs/articles/features/ui-data-converters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
uid: package-ui-data-converters
title: Using the UI Data Converters package
---

# Using the UI Data Converters package

The UI Data Converters package is designed for making the conversion of data objects to a different type in native applications for Windows, Android, iOS, macOS, Linux, and the web easier.

## Converting boolean values to a string (and back) with the BooleanToStringValueConverter

The `MADE.UI.Data.Converters.BooleanToStringValueConverter` provides a way to convert a boolean value to a string and back with a bound data source in a XAML view.

```xml
<Grid>
<Grid.Resources>
<converters:BooleanToStringValueConverter x:Key="BooleanToStringValueConverter" TrueValue="Yes" FalseValue="No" />
</Grid.Resources>

<!-- A true boolean will return the TrueValue of the converter -->
<TextBlock Text="{x:Bind ViewModel.True, Converter={StaticResource BooleanToStringValueConverter}}" />

<!-- A false boolean will return the FalseValue of the converter -->
<TextBlock Text="{x:Bind ViewModel.False, Converter={StaticResource BooleanToStringValueConverter}}" />
</Grid>
```

Instances of the converter can be set up with varying values for the `TrueValue` and `FalseValue` properties that will represent the value shown when the boolean is true and false, respectively. The default values are `Yes` and `No`.

**Note**, when converting back from the string value to a boolean when used in a `TwoWay` binding, the `TrueValue` and `FalseValue` properties are used to determine which value is considered true and false. If the string value does not match, an exception will be thrown.

## Displaying a byte array as an image with the ByteArrayToImageSourceValueConverter

The `MADE.UI.Data.Converters.ByteArrayToImageSourceValueConverter` provides a way to convert a bound byte array containing the details of an image to an image source that can be bound to an `Image` XAML element.

```xml
<Grid>
<Grid.Resources>
<converters:ByteArrayToImageSourceValueConverter x:Key="ByteArrayToImageSourceValueConverter" />
</Grid.Resources>

<!-- Converts the image's byte array into a source image that is loaded into the element -->
<Image Source="{x:Bind ViewModel.ImageBytes, Converter={StaticResource ByteArrayToImageSourceValueConverter}, Mode=OneWay}" />
</Grid>
```

## Formatting a DateTime value with the DateTimeToStringValueConverter

The `MADE.UI.Data.Converters.DateTimeToStringValueConverter` converts a given `DateTime` object into a string using the provided format in the binding `ConverterParameter` property.

```xml
<Grid>
<Grid.Resources>
<converters:DateTimeToStringValueConverter x:Key="DateTimeToStringValueConverter" />
</Grid.Resources>

<!-- Converts the DateTime object into the dd/MM/yyyy format -->
<TextBlock Text="{x:Bind ViewModel.DateTime, Converter={StaticResource DateTimeToStringValueConverter}, ConverterParameter=dd/MM/yyyy}" />
</Grid>
```

**Note**, the converter supports any of the standard and custom formats supported by the `DateTime.ToString()` method. You can [find more information on these in the Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings).
38 changes: 36 additions & 2 deletions docs/articles/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ dotnet add package MADE.UI
| MADE.UI.Controls.ChipBox | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Controls.ChipBox)](https://www.nuget.org/packages/MADE.UI.Controls.ChipBox/) |
| MADE.UI.Controls.DropDownList | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Controls.DropDownList)](https://www.nuget.org/packages/MADE.UI.Controls.DropDownList/) |
| MADE.UI.Controls.FilePicker | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Controls.FilePicker)](https://www.nuget.org/packages/MADE.UI.Controls.FilePicker/) |
| MADE.UI.Controls.RichEditToolbar | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Controls.RichEditToolbar)](https://www.nuget.org/packages/MADE.UI.Controls.RichEditToolbar/) |
| MADE.UI.Controls.Validator | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Controls.Validator)](https://www.nuget.org/packages/MADE.UI.Controls.Validator/) |
| MADE.UI.Data.Converters | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Data.Converters)](https://www.nuget.org/packages/MADE.UI.Data.Converters/) |
| MADE.UI.Styling | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.Styling)](https://www.nuget.org/packages/MADE.UI.Styling/) |
| MADE.UI.ViewManagement | [![NuGet](https://img.shields.io/nuget/v/MADE.UI.ViewManagement)](https://www.nuget.org/packages/MADE.UI.ViewManagement/) |

#### UI

The UI package is a base library for building out great user experiences for applications built for Windows, Android, iOS, and the web.
The UI package is a base library for building out great user experiences for applications built for Windows, Android, iOS, and the web.

Taking advantage of the Uno Platform, the UI packages provide extensible features such as:

Expand Down Expand Up @@ -67,7 +69,7 @@ The control works in a similar way to the `ComboBox` element in the Windows SDK,

#### UI.Controls.FilePicker

The UI Controls FilePicker library contains a cross-platform UI element that provides a web-like `<input type="file" />` equivalent for native applications.
The UI Controls FilePicker library contains a cross-platform UI element that provides a web-like `<input type="file" />` equivalent for native applications.

The control provides the capability to select one or multiple files of given types and show them within the UI.

Expand All @@ -77,6 +79,18 @@ The control provides the capability to select one or multiple files of given typ

</span>

#### UI.Controls.RichEditToolbar

The UI Controls RichEditToolbar library contains a cross-platform UI element that provides customizable and extensible collection of buttons that activate rich text features in an associated RichEditBox.

Think the InkToolbar equivalent for RichEditBox controls!

<span class="button">

[Discover UI.Controls.RichEditToolbar](features/ui-controls-filepicker.md)

</span>

#### UI.Controls.Validator

The UI Controls Validator library contains a cross-platform UI element that provides validation capabilities over any input element.
Expand All @@ -89,6 +103,16 @@ Taking advantage of the Data Validation library, you can simply and easily setup

</span>

#### UI.Data.Converters

The UI Data Converters package is designed for making the conversion of data objects to a different type in native applications for Windows, Android, iOS, macOS, Linux, and the web easier.

<span class="button">

[Discover UI.Data.Converters](features/ui-data-converters.md)

</span>

#### UI.Styling

The UI Styling library contains a collection of cross-platform UI styling components for improving the designing of applications.
Expand All @@ -98,3 +122,13 @@ The UI Styling library contains a collection of cross-platform UI styling compon
[Discover UI.Styling](features/ui-styling.md)

</span>

#### UI.ViewManagement

The UI View Management package is designed for improving how your applications can create and manage additional windows in Windows applications.

<span class="button">

[Discover UI.ViewManagement](features/ui-view-management.md)

</span>
4 changes: 4 additions & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
href: features/ui-controls-dropdownlist.md
- name: FilePicker
href: features/ui-controls-filepicker.md
- name: RichEditToolbar
href: features/ui-controls-richedittoolbar.md
- name: Validator
href: features/ui-controls-validator.md
- name: Data Converters
href: features/ui-data-converters.md
- name: Styling
href: features/ui-styling.md
- name: View Management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console">
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
</PackageReference>
<PackageReference Include="Uno.ColorCode.UWP">
<Version>2.1.0-uno.32</Version>
</PackageReference>
Expand Down Expand Up @@ -133,6 +136,10 @@
<Project>{e2b20928-dae2-4a9c-bdaf-d787b4f48391}</Project>
<Name>MADE.UI.Controls.Validator</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\MADE.UI.Data.Converters\MADE.UI.Data.Converters.csproj">
<Project>{55d12223-8b53-4ec7-8cd2-05fc8a84ba7c}</Project>
<Name>MADE.UI.Data.Converters</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\MADE.UI.Styling\MADE.UI.Styling.csproj">
<Project>{f8d00106-0598-45e7-b92e-ef408249c02e}</Project>
<Name>MADE.UI.Styling</Name>
Expand Down
5 changes: 4 additions & 1 deletion samples/MADE.Samples/MADE.Samples.Shared/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Application
<Application
x:Class="MADE.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MADE.Samples">

<Application.Resources>
</Application.Resources>

</Application>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public MainPageViewModel(INavigationService navigationService, IMessenger messen

public ICollection<SampleGroup> SampleGroups { get; } = GetSampleGroups();

public ICollection<Sample> Samples => SampleGroups.SelectMany(x => x.Samples).ToList();

private static ICollection<SampleGroup> GetSampleGroups()
{
var controls = new SampleGroup
Expand All @@ -48,13 +50,18 @@ private static ICollection<SampleGroup> GetSampleGroups()
"InputValidator",
typeof(InputValidatorPage),
"/Features/Samples/Assets/InputValidator/InputValidator.png"),
new Sample(
"RichEditToolbar",
typeof(RichEditToolbarPage),
"/Features/Samples/Assets/RichEditToolbar/RichEditToolbar.png")
}
};

#if WINDOWS_UWP
AddPlatformSpecificSample(
controls,
new Sample(
"RichEditToolbar",
typeof(RichEditToolbarPage),
"/Features/Samples/Assets/RichEditToolbar/RichEditToolbar.png"));
#endif

var helpers = new SampleGroup
{
Name = "Helpers",
Expand All @@ -63,26 +70,35 @@ private static ICollection<SampleGroup> GetSampleGroups()
new Sample(
"AppDialog",
typeof(AppDialogPage),
"/Features/Samples/Assets/AppDialog/AppDialog.png")
"/Features/Samples/Assets/AppDialog/AppDialog.png"),
new Sample(
"Value Converters",
typeof(ValueConvertersPage),
"/Features/Samples/Assets/ValueConverters/ValueConverters.png")
}
};

if (PlatformApiHelper.IsTypeSupported(typeof(WindowManager)))
{
helpers.Samples.InsertAtPotentialIndex(
AddPlatformSpecificSample(
helpers,
new Sample(
"WindowManager",
typeof(WindowManagerPage),
"/Features/Samples/Assets/WindowManager/WindowManager.png"),
(item, compare) => compare.Name.IsLessThanOrEqualTo(item.Name));
"/Features/Samples/Assets/WindowManager/WindowManager.png"));
}

var list = new List<SampleGroup> { controls, helpers };
var list = new List<SampleGroup> {controls, helpers};

return list;
}

public ICollection<Sample> Samples => SampleGroups.SelectMany(x => x.Samples).ToList();
private static void AddPlatformSpecificSample(SampleGroup sampleGroup, Sample sample)
{
sampleGroup.Samples.InsertAtPotentialIndex(
sample,
(item, compare) => compare.Name.IsLessThanOrEqualTo(item.Name));
}

private void NavigateToSample(Sample sample)
{
Expand Down
Loading