Skip to content
Open
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
Binary file added Images/SettingsOOBEWSLContainer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions localization/strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,30 @@ Take a moment to preview some of the community’s favorite features or view our
<value>https://aka.ms/wsldocs</value>
<comment>{Locked}Uri to the Microsoft WSL Documentation</comment>
</data>
<data name="Settings_OOBEWSLContainer.Description" xml:space="preserve">
<value>Easily run Linux containers on Windows as a 1st class experience.

You can use the `wslc.exe` CLI to build, run, push, pull and manage Linux containers all directly on Windows.

As well you can use the WSLc API to create Windows applications that have runtime logic powered by Linux containers, making it easier to embed Linux contianers as a direct component of your Windows applications. This feature makes it easy to use code that would run in a Linux environment right on Windows, useful for applications like cloud to local, AI applications, and isolation.</value>
</data>
<data name="Settings_OOBEWSLContainer.Title" xml:space="preserve">
<value>WSL container</value>
</data>
<data name="Settings_OOBEWSLContainer_LearnMoreLink.Content" xml:space="preserve">
<value>Learn more about WSL container</value>
</data>
<data name="Settings_OOBEWSLContainer_LearnMoreLink.NavigateUri" xml:space="preserve">
<value>https://aka.ms/wslc</value>
<comment>{Locked}Uri to the WSL container documentation</comment>
</data>
<data name="Settings_OOBEWSLContainer_APIReferenceLink.Content" xml:space="preserve">
<value>WSL container API reference</value>
</data>
<data name="Settings_OOBEWSLContainer_APIReferenceLink.NavigateUri" xml:space="preserve">
<value>https://wsl.dev/api-reference/</value>
<comment>{Locked}Uri to the WSL container API reference</comment>
</data>
<data name="Settings_OOBEGUIApps.Description" xml:space="preserve">
<value>You can use graphical based Linux applications with native Windows interactions like alt-tab, start menu launching, task bar pinning, and cut &amp; paste support.</value>
</data>
Expand Down Expand Up @@ -1883,6 +1907,12 @@ You can also access more VS Code Remote options through the command palette with
<data name="Settings_Shell_General.Content" xml:space="preserve">
<value>General</value>
</data>
<data name="Settings_Shell_WSLContainer.Content" xml:space="preserve">
<value>WSL container</value>
</data>
<data name="Settings_Shell_WSLContainer_NewBadgeText.Text" xml:space="preserve">
<value>NEW</value>
</data>
<data name="Settings_Shell_GPUAcceleration.Content" xml:space="preserve">
<value>GPU Acceleration</value>
</data>
Expand Down
2 changes: 2 additions & 0 deletions src/windows/wslsettings/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public App()
services.AddTransient<DockerDesktopIntegrationPage>();
services.AddTransient<GeneralViewModel>();
services.AddTransient<GeneralPage>();
services.AddTransient<WSLContainerViewModel>();
services.AddTransient<WSLContainerPage>();
services.AddTransient<GPUAccelerationViewModel>();
services.AddTransient<GPUAccelerationPage>();
services.AddTransient<GUIAppsViewModel>();
Expand Down
6 changes: 6 additions & 0 deletions src/windows/wslsettings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBECrossOSFileAccess.gif ${
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEDistroManagement.png ${BIN}/${TargetApp}/Assets/SettingsOOBEDistroManagement.png)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEDockerDesktopIntegration.png ${BIN}/${TargetApp}/Assets/SettingsOOBEDockerDesktopIntegration.png)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEGeneral.png ${BIN}/${TargetApp}/Assets/SettingsOOBEGeneral.png)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEWSLContainer.png ${BIN}/${TargetApp}/Assets/SettingsOOBEWSLContainer.png)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEGPUAcceleration.gif ${BIN}/${TargetApp}/Assets/SettingsOOBEGPUAcceleration.gif)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBEGUIApps.png ${BIN}/${TargetApp}/Assets/SettingsOOBEGUIApps.png)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/images/SettingsOOBENetworkingIntegration.png ${BIN}/${TargetApp}/Assets/SettingsOOBENetworkingIntegration.png)
Expand Down Expand Up @@ -87,6 +88,7 @@ add_executable(
ViewModels/OOBE/VSCodeIntegrationViewModel.cs
ViewModels/OOBE/VSIntegrationViewModel.cs
ViewModels/OOBE/WorkingAcrossFileSystemsViewModel.cs
ViewModels/OOBE/WSLContainerViewModel.cs
ViewModels/Settings/AboutViewModel.cs
ViewModels/Settings/DeveloperViewModel.cs
ViewModels/Settings/FileSystemViewModel.cs
Expand Down Expand Up @@ -115,6 +117,8 @@ add_executable(
Views/OOBE/VSIntegrationPage.xaml.cs
Views/OOBE/WorkingAcrossFileSystemsPage.xaml
Views/OOBE/WorkingAcrossFileSystemsPage.xaml.cs
Views/OOBE/WSLContainerPage.xaml
Views/OOBE/WSLContainerPage.xaml.cs
Views/Settings/AboutPage.xaml
Views/Settings/AboutPage.xaml.cs
Views/Settings/DeveloperPage.xaml
Expand Down Expand Up @@ -168,6 +172,8 @@ csharp_set_xaml_cs_properties(
Views/OOBE/VSIntegrationPage.xaml.cs
Views/OOBE/WorkingAcrossFileSystemsPage.xaml
Views/OOBE/WorkingAcrossFileSystemsPage.xaml.cs
Views/OOBE/WSLContainerPage.xaml
Views/OOBE/WSLContainerPage.xaml.cs
Views/Settings/AboutPage.xaml
Views/Settings/AboutPage.xaml.cs
Views/Settings/DeveloperPage.xaml
Expand Down
1 change: 1 addition & 0 deletions src/windows/wslsettings/Services/PageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public PageService()
Configure<AboutViewModel, AboutPage>();

Configure<GeneralViewModel, GeneralPage>();
Configure<WSLContainerViewModel, WSLContainerPage>();
Configure<WorkingAcrossFileSystemsViewModel, WorkingAcrossFileSystemsPage>();
Configure<VSCodeIntegrationViewModel, VSCodeIntegrationPage>();
Configure<VSIntegrationViewModel, VSIntegrationPage>();
Expand Down
21 changes: 21 additions & 0 deletions src/windows/wslsettings/Styles/CommonStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,27 @@
<Setter Property="MinWidth" Value="{StaticResource BoxMinWidth}" />
</Style>

<!-- Small pill-shaped badge used to call out new navigation items (e.g. "NEW") -->
<Style x:Key="NewFeatureInfoBadgeStyle" TargetType="InfoBadge">
<Setter Property="Background" Value="{ThemeResource SystemFillColorSuccessBrush}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="InfoBadge">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
Padding="6,2">
<TextBlock x:Uid="Settings_Shell_WSLContainer_NewBadgeText"
Foreground="{TemplateBinding Foreground}"
FontSize="10"
FontWeight="SemiBold"
LineHeight="12" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="OobeSubtitleStyle" TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,0,-12" />
<Setter Property="Foreground" Value="{ThemeResource DefaultTextForegroundThemeBrush}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (C) Microsoft Corporation. All rights reserved.

using CommunityToolkit.Mvvm.ComponentModel;

namespace WslSettings.ViewModels.OOBE;

public partial class WSLContainerViewModel : ObservableRecipient
{
public WSLContainerViewModel()
{
}
}
8 changes: 8 additions & 0 deletions src/windows/wslsettings/Views/OOBE/ShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/wslbw.ico" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem x:Uid="Settings_Shell_WSLContainer" helpers:NavigationHelper.NavigateTo="WslSettings.ViewModels.OOBE.WSLContainerViewModel">
<NavigationViewItem.Icon>
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xE7B8;"/>
</NavigationViewItem.Icon>
<NavigationViewItem.InfoBadge>
<InfoBadge Style="{StaticResource NewFeatureInfoBadgeStyle}" />
</NavigationViewItem.InfoBadge>
</NavigationViewItem>
<NavigationViewItem x:Uid="Settings_Shell_WorkingAcrossFileSystems" helpers:NavigationHelper.NavigateTo="WslSettings.ViewModels.OOBE.WorkingAcrossFileSystemsViewModel">
<NavigationViewItem.Icon>
<BitmapIcon ShowAsMonochrome="False" UriSource="/Assets/SettingsOOBEFileExplorerIcon.png" />
Expand Down
17 changes: 17 additions & 0 deletions src/windows/wslsettings/Views/OOBE/WSLContainerPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Page
x:Class="WslSettings.Views.OOBE.WSLContainerPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:WslSettings.Behaviors"
xmlns:controls="using:WslSettings.Controls"
behaviors:NavigationViewHeaderBehavior.HeaderMode="Never">

<controls:OOBEContent x:Uid="Settings_OOBEWSLContainer" HeroImage="ms-appx:///Assets/SettingsOOBEWSLContainer.png">
<controls:OOBEContent.PageContent>
<StackPanel Orientation="Vertical" Spacing="12">
<HyperlinkButton x:Uid="Settings_OOBEWSLContainer_LearnMoreLink" Style="{StaticResource TextButtonStyle}"/>
<HyperlinkButton x:Uid="Settings_OOBEWSLContainer_APIReferenceLink" Style="{StaticResource TextButtonStyle}"/>
</StackPanel>
</controls:OOBEContent.PageContent>
</controls:OOBEContent>
</Page>
19 changes: 19 additions & 0 deletions src/windows/wslsettings/Views/OOBE/WSLContainerPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (C) Microsoft Corporation. All rights reserved.

using Microsoft.UI.Xaml.Controls;
using WslSettings.ViewModels.OOBE;
namespace WslSettings.Views.OOBE;

public sealed partial class WSLContainerPage : Page
{
public WSLContainerViewModel ViewModel
{
get;
}

public WSLContainerPage()
{
ViewModel = App.GetService<WSLContainerViewModel>();
InitializeComponent();
}
}