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

Updated the default namespace for new components #394

Merged
merged 19 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<PackageIdPrefix>CommunityToolkit.Labs</PackageIdPrefix>
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion common/ToolkitComponent.SourceProject.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Import Project="$(RepositoryDirectory)common\MultiTarget\MultiTarget.props" />

<PropertyGroup>
<PackageId Condition="'$(PackageId)' == ''">CommunityToolkit.Labs.$(PackageIdVariant).$(ToolkitComponentName)</PackageId>
<PackageId Condition="'$(PackageId)' == ''">$(PackageIdPrefix).$(PackageIdVariant).$(ToolkitComponentName)</PackageId>
</PropertyGroup>

<!-- XAML Pages are automatically included, and don't need to be specified here. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<PropertyGroup>
<ToolkitComponentName>SegmentedControl</ToolkitComponentName>
<PackageId>CommunityToolkit.Labs.$(PackageIdVariant).SegmentedControl</PackageId>
<Description>This package contains SegmentedControl.</Description>
<Version>0.0.1</Version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
xmlns:local="using:ProjectTemplateExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Import custom styles -->
<ResourceDictionary Source="ms-appx:///CommunityToolkit.Labs.WinUI.ProjectTemplate/ProjectTemplateStyle_ClassicBinding.xaml" />
<ResourceDictionary Source="ms-appx:///CommunityToolkit.WinUI.Controls.ProjectTemplate/ProjectTemplateStyle_ClassicBinding.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<PropertyGroup>
<ToolkitComponentName>ProjectTemplate</ToolkitComponentName>
<PackageId>CommunityToolkit.Labs.$(PackageIdVariant).ProjectTemplate</PackageId>
<PackageId>$(PackageIdPrefix).$(PackageIdVariant).Controls.ProjectTemplate</PackageId>
<Description>This package contains ProjectTemplate.</Description>
<Version>0.0.1</Version>

<!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 -->
<RootNamespace>CommunityToolkit.Labs.WinUI.ProjectTemplateRns</RootNamespace>
<RootNamespace>CommunityToolkit.WinUI.Controls.ProjectTemplateRns</RootNamespace>
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<!-- Sets this up as a toolkit component's source project -->
Expand Down
2 changes: 1 addition & 1 deletion template/ProjectTemplate/src/ProjectTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace CommunityToolkit.Labs.WinUI;
namespace CommunityToolkit.WinUI.Controls;

/// <summary>
/// This is an example control based off of the BoxPanel sample here: https://docs.microsoft.com/windows/apps/design/layout/boxpanel-example-custom-panel. If you need this similar sort of layout component for an application, see UniformGrid in the Toolkit.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:labs="using:CommunityToolkit.Labs.WinUI">
xmlns:labs="using:CommunityToolkit.WinUI.Controls">

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
Expand Down
4 changes: 2 additions & 2 deletions template/ProjectTemplate/src/ProjectTemplateStyle_xBind.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<ResourceDictionary x:Class="CommunityToolkit.Labs.WinUI.ProjectTemplateStyle_xBind"
<ResourceDictionary x:Class="CommunityToolkit.WinUI.Controls.ProjectTemplateStyle_xBind"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:labs="using:CommunityToolkit.Labs.WinUI">
xmlns:labs="using:CommunityToolkit.WinUI.Controls">

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace CommunityToolkit.Labs.WinUI;
namespace CommunityToolkit.WinUI.Controls;

/// <summary>
/// Backing code for this resource dictionary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace CommunityToolkit.Labs.WinUI;
namespace CommunityToolkit.WinUI.Controls;

/// <summary>
/// An example templated control.
Expand Down
2 changes: 1 addition & 1 deletion template/ProjectTemplate/src/ProjectTemplate_xBind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace CommunityToolkit.Labs.WinUI;
namespace CommunityToolkit.WinUI.Controls;

/// <summary>
/// An example templated control.
Expand Down
4 changes: 2 additions & 2 deletions template/ProjectTemplate/src/Themes/Generic.xaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:labs="using:CommunityToolkit.Labs.WinUI">
xmlns:labs="using:CommunityToolkit.WinUI.Controls">

<ResourceDictionary.MergedDictionaries>
<labs:ProjectTemplateStyle_xBind />
<ResourceDictionary Source="ms-appx:///CommunityToolkit.Labs.WinUI.ProjectTemplate/ProjectTemplateStyle_ClassicBinding.xaml" />
<ResourceDictionary Source="ms-appx:///CommunityToolkit.WinUI.Controls.ProjectTemplate/ProjectTemplateStyle_ClassicBinding.xaml" />
</ResourceDictionary.MergedDictionaries>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:labs="using:CommunityToolkit.WinUI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
Expand Down
6 changes: 3 additions & 3 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dotnet new labexp -n MyExperimentNameHere
```

This creates a new experiment called "MyExperimentNameHere".
You can now open `./components/MyExperimentNameHere/MyExperimentNameHere.sln` and start your experiment.
You can now open `./components/MyExperimentNameHere/OpenSolution.bat` to start your experiment.

### Inside the generated solution

Expand All @@ -31,7 +31,7 @@ The `Tests` folder contains projects used to run the tests on different platform

#### Where to add your code

The main code of your experiment will go in the project `CommunityToolkit.Labs.WinUI.MyExperimentNameHere`. When an experiment is merged into Labs, this code will be bundled automatically in a NuGet package and pushed to the Labs DevOps feed. This will let others try out your experiment and provide feedback to further your experiment.
The main code of your experiment will go in the project `CommunityToolkit.WinUI.Controls.MyExperimentNameHere`. When an experiment is merged into Labs, this code will be bundled automatically in a NuGet package and pushed to the Labs DevOps feed. This will let others try out your experiment and provide feedback to further your experiment.
You will find an empty class in `MyExperimentNameHere.cs` that you can use as your starting point or one of the templated variants. You can find more info in the `MyExperimentNameHere.md` file in the sample project.

The project `MyExperimentNameHere.Sample`is where you can put code that will allow you to demonstrate and exercise the experiment. In this project you'll find a sample page that includes an example of how to use settings and properties that can be controlled within the sample app. This folder also contains a **markdown** file that contains the documentation for the experiment and how to use it.
Expand Down Expand Up @@ -64,7 +64,7 @@ This may require a reboot.

#### Updating NuGet Package

Packages are manually versioned right now, [see this issue here](https://github.com/CommunityToolkit/Labs-Windows/issues/133). In order to update your NuGet package, update the `<Version>` tag in your library's `CommunityToolkit.Labs.WinUI.MyExperimentNameHere.csproj` file.
Packages are manually versioned right now, [see this issue here](https://github.com/CommunityToolkit/Labs-Windows/issues/133). In order to update your NuGet package, update the `<Version>` tag in your library's `CommunityToolkit.WinUI.Controls.MyExperimentNameHere.csproj` file.

#### WebAssembly Sample Project

Expand Down