Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1355463
WIP Move MarqueeText to Labs
Avid29 Sep 14, 2022
ef14d2e
Fixed Resource reference in Generic.xaml
Avid29 Sep 14, 2022
2ac14b8
Adjusted property body style
Avid29 Sep 14, 2022
c9348c9
Fixed MarqueeText sample crashes
Avid29 Sep 14, 2022
f9c2418
Improved Sample markdown and multi choice options
Avid29 Sep 15, 2022
3004c71
Fixed subcategory value
Avid29 Sep 15, 2022
edaebec
Merge branch 'CommunityToolkit:main' into marquee
Avid29 Oct 27, 2022
c4431cf
Applied XAML Styling
Avid29 Oct 27, 2022
59e0dfd
Added clarifying comments for MarqueeText
Avid29 Oct 27, 2022
7ae98c6
Removed bouncing MarqueeBehavior in uno for MarqueeText
Avid29 Oct 27, 2022
21c14ea
Merge branch 'main' into marquee
Avid29 Oct 27, 2022
d46e185
Update labs/MarqueeText/src/MarqueeText.xaml
niels9001 Nov 11, 2022
214888c
Add win prefix
niels9001 Nov 11, 2022
265358d
Update labs/MarqueeText/src/MarqueeText.xaml
niels9001 Nov 11, 2022
216b618
XAML formatting
niels9001 Nov 11, 2022
11bf198
Filled out ToolkitSample properties for MarqueeText sample
Avid29 Nov 11, 2022
1a02f3e
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into…
Avid29 Nov 11, 2022
be5debf
Applied XAML styling
Avid29 Nov 11, 2022
8102102
Added conditional IDisposible interface to MarqueeText
Avid29 Nov 25, 2022
ce7e6b4
Merge branch 'main' into marquee
Arlodotexe Dec 8, 2022
9d73643
Updated with project changes from #327
Arlodotexe Dec 8, 2022
85e1862
Added discussion and issue id to Marquee sample metadata
Avid29 Dec 21, 2022
f0b3158
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into…
Avid29 Dec 21, 2022
890fa73
Merge branch 'main' into marquee
Arlodotexe Dec 21, 2022
487c05c
Updated with project changes from #330
Arlodotexe Dec 21, 2022
048cc1c
Moved component Sample and Test files up one directory
Arlodotexe Feb 16, 2023
41994a6
Renamed ./labs to ./components
Arlodotexe Feb 16, 2023
26d8d82
Fixed issue renaming head folder
Arlodotexe Feb 21, 2023
8143ffe
Reorganized project template files
Arlodotexe Feb 21, 2023
930308d
Fixed invalid paths
Arlodotexe Feb 22, 2023
739410e
Fixed sample code not showing in "All" head
Arlodotexe Feb 22, 2023
457ddd5
Fixed various path issues with sample and doc rendering
Arlodotexe Feb 23, 2023
e87ec5c
Cleaned up debug code
Arlodotexe Feb 23, 2023
730ba7f
Merge branch 'refactor/component-folder-structure' into marquee
Arlodotexe Feb 23, 2023
9b9e92c
Migrated Marquee to new component layout
Arlodotexe Feb 23, 2023
59ac68e
Fixed an issue where MSBuild wouldn't be detected on some machines
Arlodotexe Feb 24, 2023
43abf1c
Fixed compilation errors for tests
Arlodotexe Feb 24, 2023
c8292f6
Fixed bug where swapping tabs in TabView caused the control to premat…
Avid29 Feb 24, 2023
b8a43c5
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into…
Avid29 Feb 24, 2023
854d13b
Added enum sample binding for Marquee Sample
Avid29 Feb 24, 2023
0c80885
Removed attempted hotfix for Uno IDisposable error
Avid29 Feb 24, 2023
9df6e7b
Fixed compiler error in release mode about internally exposed IDispos…
Arlodotexe Feb 24, 2023
a49d44e
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into…
Arlodotexe Feb 24, 2023
36f4080
Explicitly disabled warning CA1001 for Uno in MarqueeText
Avid29 Feb 24, 2023
fb28b40
Merge branch 'marquee' of https://github.com/Avid29/Labs-Windows into…
Avid29 Feb 24, 2023
2282efc
Updated MarqueeText markdown docs
Avid29 Mar 2, 2023
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 common/GlobalUsings_WinUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
global using Windows.UI.Xaml.Input;
global using Windows.UI.Xaml.Markup;
global using Windows.UI.Xaml.Media;
global using Windows.UI.Xaml.Media.Animation;
global using Windows.UI.Xaml.Navigation;

#else
Expand All @@ -40,6 +41,7 @@
global using Microsoft.UI.Xaml.Input;
global using Microsoft.UI.Xaml.Markup;
global using Microsoft.UI.Xaml.Media;
global using Microsoft.UI.Xaml.Media.Animation;
global using Microsoft.UI.Xaml.Navigation;
#endif

Expand Down
311 changes: 311 additions & 0 deletions labs/MarqueeText/MarqueeText.sln

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Samples/Dependencies.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
WinUI 2 under UWP uses TargetFramework uap10.0.*
WinUI 3 under WinAppSdk uses TargetFramework net6.0-windows10.*
However, under Uno-powered platforms, both WinUI 2 and 3 can share the same TargetFramework.

MSBuild doesn't play nicely with this out of the box, so we've made it easy for you.

For .NET Standard packages, you can use the Nuget Package Manager in Visual Studio.
For UWP / WinAppSDK / Uno packages, place the package references here.
-->
<Project>
<!-- WinUI 2 / UWP -->
<ItemGroup Condition="'$(IsUwp)' == 'true'">
<!-- <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.2"/> -->
</ItemGroup>

<!-- WinUI 2 / Uno -->
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<!-- <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.11"/> -->
</ItemGroup>

<!-- WinUI 3 / WinAppSdk -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true'">
<!-- <PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.2"/> -->
</ItemGroup>

<!-- WinUI 3 / Uno -->
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3'">
<!-- <PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.100-dev.15.g12261e2626"/> -->
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<!-- Labs Constants -->
<Import Project="$(RepositoryDirectory)common\Labs.TargetFrameworks.props" />
<Import Project="$(RepositoryDirectory)common\Labs.ProjectIdentifiers.props" />

<!-- Labs Platform Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Uno.props" />
<Import Project="$(RepositoryDirectory)common\Labs.MultiTarget.props" />

<!-- Labs Project Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Sample.props" />

<PropertyGroup>
<RootNamespace>MarqueeTextExperiment.Samples</RootNamespace>
<AssemblyName>MarqueeTextExperiment.Samples</AssemblyName>
</PropertyGroup>

<ItemGroup>
<UpToDateCheckInput Remove="MarqueeTextSample.xaml" />
</ItemGroup>

<!-- Sample XAML Pages and Markdown files are automatically included, and don't need to be specified here. -->

<ItemGroup>
<ProjectReference Include="..\..\src\CommunityToolkit.Labs.WinUI.MarqueeText.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="MarqueeTextSample.xaml.cs">
<DependentUpon>MarqueeTextSample.xaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
22 changes: 22 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Samples/MarqueeText.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: MarqueeText
author: Avid29
description: A control for scrolling text in a marquee fashion.
keywords: Marquee, Control, Text
dev_langs:
- csharp
category: Controls
subcategory: StatusAndInfo
---

# MarqueeText

For more information about this experiment see:

- Discussion: https://github.com/CommunityToolkit/Labs-Windows/discussions/231

- Issue: TODO: PASTE LINK HERE

The MarqueeText control allows text to scroll in a marquee fashion. The control is heavily templated and many changes can be made by modifying the style.

> [!Sample MarqueeTextSample]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- 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. -->
<Page x:Class="MarqueeTextExperiment.Samples.MarqueeTextSample"
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.MarqueeTextRns"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<StackPanel Padding="16">
<labs:MarqueeText Behavior="Looping"
Direction="Left"
FontSize="18"
RepeatBehavior="{x:Bind MarqueeRepeat, Mode=OneWay}"
Speed="{x:Bind MarqueeSpeed, Mode=OneWay}"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." />
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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.

namespace MarqueeTextExperiment.Samples;
[ToolkitSample(id: nameof(MarqueeTextSample), "Templated control", description: "A sample for showing how to create and use a templated control.")]
[ToolkitSampleMultiChoiceOption("MarqueeSpeed", "Speed", "Slow : 64", "Medium : 96", "Fast : 128")]
//[ToolkitSampleMultiChoiceOption("MarqueeMode", "Mode", "Ticker", "Looping", "Bouncing")]
//[ToolkitSampleMultiChoiceOption("MarqueeDirection", "Direction", "Left", "Right", "Up", "Down")]
[ToolkitSampleMultiChoiceOption("MarqueeRepeat", "Repeat", "Forever", "1x", "2x")]
public sealed partial class MarqueeTextSample : Page
{
public MarqueeTextSample()
{
this.InitializeComponent();
}
}
61 changes: 61 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Uwp/MarqueeText.Uwp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove(directory.build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(directory.build.props))')" />

<!-- Labs Constants -->
<Import Project="$(RepositoryDirectory)common\Labs.TargetFrameworks.props" />
<PropertyGroup>
<IsDeployableHead>true</IsDeployableHead>
<IsUno>false</IsUno>
<IsWasm>false</IsWasm>
<IsWasmHead>false</IsWasmHead>
<IsWasmLib>false</IsWasmLib>
<IsDroid>false</IsDroid>
<IsMacOS>false</IsMacOS>
<IsiOS>false</IsiOS>
<IsUwp>true</IsUwp>
<IsWinAppSdk>false</IsWinAppSdk>
<IsWpf>false</IsWpf>
<IsWpfHead>false</IsWpfHead>
<IsWpfLib>false</IsWpfLib>
<IsGtk>false</IsGtk>
<IsGtkHead>false</IsGtkHead>
<IsGtkLib>false</IsGtkLib>
</PropertyGroup>
<Import Project="$(RepositoryDirectory)common\Labs.ProjectIdentifiers.props" />

<!-- Labs Platform Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Head.Uwp.props" />

<!-- Labs Project Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Head.props" />

<PropertyGroup>
<RootNamespace>MarqueeTextExperiment.Samples</RootNamespace>
<AssemblyName>MarqueeTextExperiment.Samples.Uwp</AssemblyName>
<ProjectGuid>{284BF413-59B7-401E-9800-D20E2D83CFDE}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\CommunityToolkit.Labs.WinUI.MarqueeText.csproj">
<Project>{6E8C0438-F7F7-4C68-AB48-82D7B16C0A90}</Project>
<Name>CommunityToolkit.Labs.WinUI.MarqueeText</Name>
</ProjectReference>
<ProjectReference Include="..\MarqueeText.Samples\MarqueeText.Samples.csproj">
<Project>{4122092A-1C04-49D5-A8AA-498FAF196815}</Project>
<Name>MarqueeText.Sample</Name>
</ProjectReference>
</ItemGroup>
<!-- Must be imported after any shared projects in non-sdk style projects -->
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project>
49 changes: 49 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Uwp/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">

<Identity
Name="Labs.MarqueeText.Uwp"
Publisher="CN=CommunityToolkit"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="82EAD122-A4A9-4B37-ADE1-32358413B53D" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>CommunityToolkit Labs: MarqueeText Samples (UWP)</DisplayName>
<PublisherDisplayName>CommunityToolkit</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="CommunityToolkit.Labs.Shared.App">
<uap:VisualElements
DisplayName="CommunityToolkit Labs: MarqueeText Sample"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="CommunityToolkit Labs Samples"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// 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.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CommunityToolkit.Labs.Uwp.Samples.MarqueeText")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(".NET Foundation")]
[assembly: AssemblyProduct("CommunityToolkit.Labs.Uwp.Samples.MarqueeText")]
[assembly: AssemblyCopyright("Copyright © .NET Foundation 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
31 changes: 31 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Uwp/Properties/Default.rd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.

Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919

To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>

To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />

Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->

<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />


<!-- Add your application specific runtime directives here. -->


</Application>
</Directives>
41 changes: 41 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Wasm/MarqueeText.Wasm.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk.Web" TreatAsLocalProperty="TargetFramework">
<!-- Labs Constants -->
<Import Project="$(RepositoryDirectory)common\Labs.TargetFrameworks.props" />
<PropertyGroup>
<IsDeployableHead>true</IsDeployableHead>
<IsUno>true</IsUno>
<IsWasm>true</IsWasm>
<IsWasmHead>false</IsWasmHead>
<IsWasmLib>false</IsWasmLib>
<IsDroid>false</IsDroid>
<IsMacOS>false</IsMacOS>
<IsiOS>false</IsiOS>
<IsUwp>false</IsUwp>
<IsWinAppSdk>false</IsWinAppSdk>
<IsWpf>false</IsWpf>
<IsWpfHead>false</IsWpfHead>
<IsWpfLib>false</IsWpfLib>
<IsGtk>false</IsGtk>
<IsGtkHead>false</IsGtkHead>
<IsGtkLib>false</IsGtkLib>
</PropertyGroup>
<Import Project="$(RepositoryDirectory)common\Labs.ProjectIdentifiers.props" />

<!-- Labs Platform Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Head.Wasm.props" />
<Import Project="$(RepositoryDirectory)common\Labs.Uno.props" />

<!-- Labs Project Config -->
<Import Project="$(RepositoryDirectory)common\Labs.Head.props" />
<Import Project="$(RepositoryDirectory)common\Labs.Head.Uno.props" />

<ItemGroup>
<EmbeddedResource Include="WasmCSS\Fonts.css" />
<EmbeddedResource Include="WasmScripts\AppManifest.js" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\CommunityToolkit.Labs.WinUI.MarqueeText.csproj" />
<ProjectReference Include="..\MarqueeText.Samples\MarqueeText.Samples.csproj" />
</ItemGroup>
</Project>
19 changes: 19 additions & 0 deletions labs/MarqueeText/samples/MarqueeText.Wasm/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 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.

using CommunityToolkit.Labs.Shared;

namespace MarqueeTextExperiment.Samples.Wasm;

public class Program
{
private static App? _app;

static int Main(string[] args)
{
Application.Start(_ => _app = new App());

return 0;
}
}
Loading