Skip to content

Commit 7005cc7

Browse files
authored
Merge pull request #725 from CommunityToolkit/fix/package-names-and-namespaces
Normalized package names and namespaces
2 parents 48fc84d + 12fdd01 commit 7005cc7

File tree

148 files changed

+380
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+380
-366
lines changed

components/CanvasLayout/samples/CanvasLayoutSample.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<!-- 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. -->
1+
<!-- 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. -->
22
<Page x:Class="CanvasLayoutExperiment.Samples.CanvasLayoutSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
56
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
77
xmlns:local="using:CanvasLayoutExperiment.Samples"
88
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
99
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
@@ -12,7 +12,7 @@
1212

1313
<muxc:ItemsRepeater ItemsSource="{x:Bind Items}">
1414
<muxc:ItemsRepeater.Layout>
15-
<labs:CanvasLayout />
15+
<controls:CanvasLayout />
1616
</muxc:ItemsRepeater.Layout>
1717
<muxc:ItemsRepeater.ItemTemplate>
1818
<DataTemplate x:DataType="local:CanvasItem">

components/CanvasLayout/samples/CanvasLayoutSample.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using CommunityToolkit.Labs.WinUI;
5+
using CommunityToolkit.WinUI.Controls;
66

77
namespace CanvasLayoutExperiment.Samples;
88

components/CanvasLayout/src/CanvasLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace CommunityToolkit.Labs.WinUI;
5+
namespace CommunityToolkit.WinUI.Controls;
66

77
public partial class CanvasLayout : MUXC.VirtualizingLayout
88
{

components/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj renamed to components/CanvasLayout/src/CommunityToolkit.WinUI.Controls.CanvasLayout.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
<PropertyGroup>
44
<ToolkitComponentName>CanvasLayout</ToolkitComponentName>
55
<Description>This package contains a CanvasLayout Layout for ItemsRepeater.</Description>
6-
6+
77
<!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 -->
8-
<RootNamespace>CommunityToolkit.Labs.WinUI.CanvasLayoutRns</RootNamespace>
8+
<RootNamespace>CommunityToolkit.WinUI.Controls.CanvasLayoutRns</RootNamespace>
99
</PropertyGroup>
1010

1111
<!-- Sets this up as a toolkit component's source project -->
1212
<Import Project="$(ToolingDirectory)\ToolkitComponent.SourceProject.props" />
13+
14+
<PropertyGroup>
15+
<PackageId>$(PackageIdPrefix).$(PackageIdVariant).Controls.$(ToolkitComponentName)</PackageId>
16+
</PropertyGroup>
1317
</Project>

components/CanvasLayout/tests/ExampleCanvasLayoutTestClass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using CommunityToolkit.Labs.WinUI;
5+
using CommunityToolkit.WinUI.Controls;
66
using CommunityToolkit.Tooling.TestGen;
77
using CommunityToolkit.Tests;
88

components/CanvasLayout/tests/ExampleCanvasLayoutTestPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Page x:Class="CanvasLayoutTests.ExampleCanvasLayoutTestPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
56
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
88
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
99
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
@@ -12,7 +12,7 @@
1212
<Grid>
1313
<muxc:ItemsRepeater>
1414
<muxc:ItemsRepeater.Layout>
15-
<labs:CanvasLayout x:Name="CanvasLayoutControl" />
15+
<controls:CanvasLayout x:Name="CanvasLayoutControl" />
1616
</muxc:ItemsRepeater.Layout>
1717
</muxc:ItemsRepeater>
1818
</Grid>

components/CanvasView/samples/CanvasViewDragSample.xaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<!-- 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. -->
1+
<!-- 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. -->
22
<Page x:Class="CanvasViewExperiment.Samples.CanvasViewDragSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
56
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
77
xmlns:local="using:CanvasViewExperiment.Samples"
88
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
99
mc:Ignorable="d">
1010

11-
<labs:CanvasView MinHeight="400"
12-
VerticalAlignment="Stretch"
13-
ItemsSource="{x:Bind Rectangles}">
14-
<labs:CanvasView.ItemTemplate>
11+
<controls:CanvasView MinHeight="400"
12+
VerticalAlignment="Stretch"
13+
ItemsSource="{x:Bind Rectangles}">
14+
<controls:CanvasView.ItemTemplate>
1515
<DataTemplate x:DataType="local:ObservableRect">
1616
<Border Canvas.Left="{x:Bind Left, Mode=TwoWay}"
1717
Canvas.Top="{x:Bind Top, Mode=TwoWay}"
@@ -29,10 +29,10 @@
2929
Style="{StaticResource BodyStrongTextBlockStyle}"
3030
TextWrapping="WrapWholeWords">
3131
<Run Text="{x:Bind Left, Mode=OneWay}" />
32-
,<Run Text="{x:Bind Top, Mode=OneWay}" />
32+
<Run Text="{x:Bind Top, Mode=OneWay}" />
3333
</TextBlock>
3434
</Border>
3535
</DataTemplate>
36-
</labs:CanvasView.ItemTemplate>
37-
</labs:CanvasView>
36+
</controls:CanvasView.ItemTemplate>
37+
</controls:CanvasView>
3838
</Page>

components/CanvasView/src/CanvasView.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
#if NET8_0_OR_GREATER
66
using System.Diagnostics.CodeAnalysis;
77
#endif
8-
using CommunityToolkit.Labs.WinUI.CanvasViewInternal;
98
using CommunityToolkit.WinUI.Helpers;
109

11-
namespace CommunityToolkit.Labs.WinUI;
10+
namespace CommunityToolkit.WinUI.Controls;
1211

1312
/// <summary>
1413
/// <see cref="CanvasView"/> is an <see cref="ItemsControl"/> which uses a <see cref="Canvas"/> for the layout of its items.

components/CanvasView/src/CommunityToolkit.Labs.WinUI.CanvasView.csproj renamed to components/CanvasView/src/CommunityToolkit.WinUI.Controls.CanvasView.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
<Description>This package contains CanvasView.</Description>
66

77
<!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 -->
8-
<RootNamespace>CommunityToolkit.Labs.WinUI.CanvasViewRns</RootNamespace>
8+
<RootNamespace>CommunityToolkit.WinUI.Controls.CanvasViewRns</RootNamespace>
99
</PropertyGroup>
1010

1111
<!-- Sets this up as a toolkit component's source project -->
1212
<Import Project="$(ToolingDirectory)\ToolkitComponent.SourceProject.props" />
13+
14+
<PropertyGroup>
15+
<PackageId>$(PackageIdPrefix).$(PackageIdVariant).Controls.$(ToolkitComponentName)</PackageId>
16+
</PropertyGroup>
1317
</Project>

components/CanvasView/src/FrameworkElementExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Diagnostics.CodeAnalysis;
77
#endif
88

9-
namespace CommunityToolkit.Labs.WinUI.CanvasViewInternal;
9+
namespace CommunityToolkit.WinUI.Controls;
1010

1111
public static partial class FrameworkElementExtensions
1212
{

0 commit comments

Comments
 (0)