-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into opacitymaskview-experiment
- Loading branch information
Showing
100 changed files
with
4,583 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ on: | |
merge_group: | ||
|
||
env: | ||
DOTNET_VERSION: ${{ '7.0.402' }} | ||
DOTNET_VERSION: ${{ '8.0.201' }} | ||
ENABLE_DIAGNOSTICS: false | ||
#COREHOST_TRACE: 1 | ||
MSBUILD_VERBOSITY: normal | ||
|
@@ -106,7 +106,6 @@ jobs: | |
- name: Restore dotnet tools | ||
run: dotnet tool restore | ||
|
||
# Pinning Manifest for 1.18 version of Uno.Check at the moment to unblock build, see https://github.com/CommunityToolkit/Windows/pull/320 | ||
- name: Run Uno Check to Install Dependencies | ||
run: > | ||
dotnet tool run uno-check | ||
|
@@ -117,10 +116,11 @@ jobs: | |
--skip androidemulator | ||
--skip vswinworkloads | ||
--verbose | ||
--manifest https://raw.githubusercontent.com/unoplatform/uno.check/1660eba219684491362704c75153b40ce6ef7a35/manifests/uno.ui.manifest.json | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
vs-version: '[17.9,)' | ||
|
||
- name: Enable ${{ env.TARGET_PLATFORMS }} TargetFrameworks | ||
working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }} | ||
|
@@ -158,6 +158,10 @@ jobs: | |
working-directory: ./tooling/Scripts/ | ||
run: ./PackEachExperiment.ps1 -date ${{ env.VERSION_DATE }}${{ env.VERSION_PROPERTY != '' && format(' -postfix {0}', env.VERSION_PROPERTY) || '' }} | ||
|
||
- name: Validate package names | ||
if: ${{ env.VERSION_PROPERTY != '' }} | ||
run: powershell -version 5.1 -command "Get-ChildItem -Path '**/*.nupkg' | ForEach-Object { if (`$_.Name -notmatch '${{ env.VERSION_PROPERTY }}') { throw 'Nupkg name is missing trailing VERSION_PROPERTY' + `$_.Name } }" -ErrorAction Stop | ||
|
||
# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) | ||
- name: Push PR packages (if not fork) | ||
if: ${{ env.IS_PR == 'true' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"fernandoescolar.vscode-solution-explorer", | ||
"ms-dotnettools.csdevkit", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
components/AppServices/src/CommunityToolkit.AppServices.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
components/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
components/CanvasView/src/CommunityToolkit.Labs.WinUI.CanvasView.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
components/DataTable/src/CommunityToolkit.WinUI.Controls.DataTable.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...Extensions.DependencyInjection/src/CommunityToolkit.Extensions.DependencyInjection.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@ECHO OFF | ||
|
||
powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
17 changes: 17 additions & 0 deletions
17
components/MarkdownTextBlock/samples/MarkdownTextBlock.Samples.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" /> | ||
<PropertyGroup> | ||
<ToolkitComponentName>MarkdownTextBlock</ToolkitComponentName> | ||
</PropertyGroup> | ||
|
||
<!-- Sets this up as a toolkit component's sample project --> | ||
<Import Project="$(ToolingDirectory)\ToolkitComponent.SampleProject.props" /> | ||
<ItemGroup> | ||
<None Remove="Assets\MarkdownTextBlock.png" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Assets\MarkdownTextBlock.png"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: MarkdownTextBlock | ||
author: nerocui | ||
description: A control for displaying markdown natively. | ||
keywords: MarkdownTextBlock, Control, Layout | ||
dev_langs: | ||
- csharp | ||
category: Controls | ||
subcategory: StatusAndInfo | ||
experimental: true | ||
discussion-id: 0 | ||
issue-id: 0 | ||
icon: Assets/MarkdownTextBlock.png | ||
--- | ||
|
||
<!-- To know about all the available Markdown syntax, Check out https://docs.microsoft.com/contribute/markdown-reference --> | ||
<!-- Ensure you remove all comments before submission, to ensure that there are no formatting issues when displaying this page. --> | ||
<!-- It is recommended to check how the Documentation will look in the sample app, before Merging a PR --> | ||
<!-- **Note:** All links to other docs.microsoft.com pages should be relative without locale, i.e. for the one above would be /contribute/markdown-reference --> | ||
<!-- Included images should be optimized for size and not include any Intellectual Property references. --> | ||
|
||
<!-- Be sure to update the discussion/issue numbers above with your Labs discussion/issue id numbers in order for UI links to them from the sample app to work. --> | ||
|
||
# MarkdownTextBlock | ||
|
||
MarkdownTextBlock is a evolution of the existing MarkdownTextBlock in the community toolkit. This new implementation uses the popular [Markdig](https://github.com/xoofx/markdig) library for parsing. This solves some long standing bugs and feature gaps in our existing implementation. | ||
|
||
## Templated Controls | ||
|
||
The Toolkit is built with templated controls. This provides developers a flexible way to restyle components | ||
easily while still inheriting the general functionality a control provides. The examples below show | ||
how a component can use a default style and then get overridden by the end developer. | ||
|
||
> [!Sample MarkdownTextBlockCustomSample] |
44 changes: 44 additions & 0 deletions
44
components/MarkdownTextBlock/samples/MarkdownTextBlockCustomSample.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- 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="MarkdownTextBlockExperiment.Samples.MarkdownTextBlockCustomSample" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="using:CommunityToolkit.Labs.WinUI.MarkdownTextBlock" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:MarkdownTextBlockExperiment.Samples" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="auto" /> | ||
<RowDefinition Height="auto" /> | ||
<RowDefinition Height="auto" /> | ||
<RowDefinition Height="auto" /> | ||
</Grid.RowDefinitions> | ||
<TextBlock Grid.Row="0" | ||
Margin="0,0,0,12" | ||
FontSize="16" | ||
FontWeight="Bold" | ||
Text="Try it live!" /> | ||
<Grid Grid.Row="1"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<controls:MarkdownTextBlock Grid.Column="0" | ||
Config="{x:Bind LiveMarkdownConfig, Mode=OneTime}" | ||
Text="{x:Bind MarkdownTextBox.Text, Mode=OneWay}" /> | ||
<TextBox x:Name="MarkdownTextBox" | ||
Grid.Column="1" | ||
AcceptsReturn="True" /> | ||
</Grid> | ||
<TextBlock Grid.Row="2" | ||
Margin="0,0,0,12" | ||
FontSize="16" | ||
FontWeight="Bold" | ||
Text="Built-in Sample" /> | ||
<controls:MarkdownTextBlock Grid.Row="3" | ||
Config="{x:Bind MarkdownConfig, Mode=OneTime}" | ||
Text="{x:Bind Text, Mode=OneTime}" /> | ||
</Grid> | ||
</Page> |
Oops, something went wrong.