Skip to content

Commit

Permalink
Various 7.1 Clean-up Fixes (#4251)
Browse files Browse the repository at this point in the history
## Fixes #4210 and Fixes #4158

Cleans up sample for #4248 (though underlying issue remains to be figured out later).

Fixes a sample and cleans-up a few items we missed in our nuget packages. Just need to validate output from CI, but should be fairly straight-forward.

## PR Type

What kind of change does this PR introduce?

<!-- Please uncomment one or more options below that apply to this PR. -->

<!-- - Bugfix -->
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
- Documentation content changes
- Sample app changes
<!-- - Other... Please describe: -->

## What is the current behavior?

TTB Sample was binding to the internal collection instead of showing binding to a developer provided collection.

Some new features were missing from the NuGet package info.

## What is the new behavior?

Fixed! 🎉

## PR Checklist

Please check if your PR fulfills the following requirements: <!-- and remove the ones that are not applicable to the current PR -->

- [ ] Tested code with current [supported SDKs](../#supported)
- [ ] New component
  - [ ] Pull Request has been submitted to the documentation repository [instructions](../blob/main/Contributing.md#docs). Link: <!-- docs PR link -->
  - [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  - [ ] If control, added to Visual Studio Design project
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
  - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets)
- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Header has been added to all new source files (run _build/UpdateHeaders.bat_)
- [ ] Contains **NO** breaking changes

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below.
Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. -->

## Other information

<!-- Please add any other information that might be helpful to reviewers. -->
  • Loading branch information
msftbot[bot] authored Sep 16, 2021
2 parents 6fd3327 + 2ac2c51 commit f18604f
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ public sealed partial class TokenizingTextBoxPage : Page, IXamlRenderListener
private AdvancedCollectionView _acv;
private AdvancedCollectionView _acvEmail;

private ObservableCollection<SampleEmailDataType> _selectedEmails;
public ObservableCollection<SampleDataType> SelectedTokens { get; set; }

public ObservableCollection<SampleEmailDataType> SelectedEmails { get; set; }

public TokenizingTextBoxPage()
{
Expand All @@ -112,7 +114,10 @@ public TokenizingTextBoxPage()

public void OnXamlRendered(FrameworkElement control)
{
_selectedEmails = new ObservableCollection<SampleEmailDataType>();
SelectedTokens = new();
SelectedEmails = new();

control.DataContext = this;

if (_ttb != null)
{
Expand Down Expand Up @@ -150,7 +155,6 @@ public void OnXamlRendered(FrameworkElement control)
{
_ttbEmail = ttbEmail;

_ttbEmail.ItemsSource = _selectedEmails;
_ttbEmail.ItemClick += EmailTokenItemClick;
_ttbEmail.TokenItemAdding += EmailTokenItemAdding;
_ttbEmail.TokenItemAdded += EmailTokenItemAdded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</TextBlock>
<controls:TokenizingTextBox
x:Name="TokenBox"
ItemsSource="{Binding SelectedTokens}"
PlaceholderText="Add Actions"
QueryIcon="{ui:SymbolIconSource Symbol=Setting}"
MaxHeight="104"
Expand Down Expand Up @@ -65,14 +66,15 @@
<Run>Current Edit: </Run>
<Run Text="{Binding Text, ElementName=TokenBox}"/>
</TextBlock>
<ItemsControl ItemsSource="{Binding ItemsSource, ElementName=TokenBox}"/>
<ItemsControl ItemsSource="{Binding SelectedTokens}"/>
</StackPanel>

<StackPanel Grid.Row="1">
<TextBlock FontSize="32" Text="Select Email Addresses"
Margin="0,0,0,4"/>
<controls:TokenizingTextBox
x:Name="TokenBoxEmail"
ItemsSource="{Binding SelectedEmails}"
PlaceholderText="Select Names"
MaxHeight="104"
HorizontalAlignment="Stretch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
<Title>Windows Community Toolkit - UI Behaviors</Title>
<Description>
This library provides UI behaviors built on the XAML behaviors SDK. It is a part of the Windows Community Toolkit.

Behaviors:
- BehaviorBase: Helper for building Behaviors

- Animation: Various helpers for integration with the Toolkit's Animation package.
- AutoFocusBehevior: Sets focus to the associated control.
- FocusBehavior: Sets focus to a specified control.
- ViewportBehavior: Listening for element to enter or exit the ScrollViewer viewport
- AutoSelectBehavior: Selects a TextBox's text automatically.
- FadeHeaderBehavior, QuickReturnHeaderBehavior, StickyHeaderBehavior: Helpers for ListViewBase Header Behavior
- FocusBehavior: Sets focus to a specified control.
- KeyDownTriggerBehavior: Trigger behaviors when a key is pressed.
- ViewportBehavior: Listening for element to enter or exit the ScrollViewer viewport
</Description>
<PackageTags>UI;XAML;Behaviors;Interactivity;Interaction;Focus;Header;Viewport</PackageTags>
<PackageTags>UI;XAML;Behaviors;Interactivity;Interaction;Focus;Header;Viewport;Selection;Focus;KeyDown;Triggers;Viewport</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- ImageEx: Images are downloaded asynchronously showing a load indicator and can be stored in a local cache.
- InAppNotification: Show local notifications in your application.
- Loading: Helps to show content with animation to the user while the app is doing some calculation.
- MetadataControl: Control for organizing text based categories with a separator, supports commands.
- RadialProgressBar: Displays progress as a circle getting filled.
- RotatorTile: Rotates through a set of items one-by-one like a live-tile.
- TabbedCommandBar: A command bar that organizes features of an application into a series of tabs.
Expand All @@ -29,6 +30,7 @@
Image;Ex ;ImageEx ;
In;App;Notification;InAppNotification;InApp ;
Loading ;
Metadata;Tags;
Radial;Progress;Bar;RadialProgressBar;ProgressBar ;
Rotator;Tile ;RotatorTile ;
Tabbed;Command;Bar ;TabbedCommandBar ;CommandBar ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- RadialGauge: Displays a value within a range, using a needle on a circular face.
- RangeSelector: "Double slider" control for range values.
- RemoteDevicePicker: Remote Device Picker Control for Project Rome.
- RichSuggestBox: RichEditBox which supports at mentioning or tags.
- TokenizingTextBox: An AutoSuggestBox like control which places entered input into easily removed containers for contacts or tags.
</Description>
<PackageTags>
Expand All @@ -23,6 +24,7 @@
Radial;Gauge ;RadialGauge ;
Range;Selector ;RangeSelector ;
Remote;Device;Picker;RemoteDevicePicker;DevicePicker;RemoteDevice;
RichEditBox;RichSuggestBox;Suggestions;Mentions;Tags;
Tokenizing;Text;Box ;TokenizingTextBox ;TextBox ;
</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

Controls:
- AdaptiveGridView: Presents items in an evenly-spaced set of columns to fill the total available space.
- ConstrainedBox: Constrain child element by aspect ratio, scale, or multiple.
- DockPanel: Define areas where you can arrange child elements either horizontally or vertically, relative to each other.
- StaggeredLayout: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
- StaggeredPanel: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
Expand All @@ -23,6 +24,7 @@
<PackageTags>
Controls;XAML;UI;
Adaptive;Grid;View;AdaptiveGridView;GridView ;AdaptiveGrid ;
Constrained;Box;ConstrainedBox;AspectRatio;Aspect;Scale;Multiple;
Dock;Panel ;DockPanel ;
Staggered;Layout ;StaggeredLayout ;
Staggered;Panel ;StaggeredPanel ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@
<PropertyGroup>
<Title>Windows Community Toolkit - UI Media</Title>
<Description>
This library provides UI brushes. It is a part of the Windows Community Toolkit.
This library provides UI effects which rely on Win2D. It is a part of the Windows Community Toolkit.

Media:
- AcrylicBrush: A custom Brush that that implements an acrylic effect with full control over all parameters.
- BackdropBlurBrush: The BackdropBlurBrush is a Brush that blurs whatever is behind it in the application.
- BackdropGammaTransferBrush: A brush which alters the colors of whatever is behind it in the application by applying a per-channel gamma transfer function.
- BackdropInvertBrush: The BackdropInvertBrush is a Brush which inverts whatever is behind it in the application.
- BackdropSaturationBrush: Brush which applies a SaturationEffect to the Backdrop.
- BackdropSepiaBrush: Brush which applies a SepiaEffect to the Backdrop.
- CanvasBrushBase: Helper Brush class to interop with Win2D Canvas calls.
- ImageBlendBrush: A Brush which blends a BitmapImage to the Backdrop in a given mode.
- PipelineBrush: A Brush that renders a customizable Composition/Win2D effects pipeline
- RadialGradientBrush: This GradientBrush defines its Gradient as an interpolation within an Ellipse.
- TilesBrush: A Brush that displays a tiled image, wrapping at the edges and endlessly repeating.
AttachedCardShadow: Provides an easy-to-use, simple, and performant rounded-rectangle shadow effect.

Effects:
- AcrylicEffect: A custom acrylic effect that can be inserted into a pipeline.
Expand All @@ -33,15 +22,28 @@
- TileEffect: An effect that loads an image and replicates it to cover all the available surface area.
- ExposureEffect, GrayscaleEffect, HueRotationEffect and more, mapping to Win2D effects.

Geometry:
- CanvasPathGeometry: A class that parses Win2d Path Mini Language and converts it to CanvasGeometry, CanvasBrush, CanvasStroke, CanvasStrokeStyle or Color.

Helpers:
- SurfaceLoader: A class that can load and draw images and other objects to Win2D surfaces and brushes.

PipelineBuilder: A class that allows to build custom effects pipelines and create CompositionBrush instances from them.
Media:
- AcrylicBrush: A custom Brush that that implements an acrylic effect with full control over all parameters.
- BackdropBlurBrush: The BackdropBlurBrush is a Brush that blurs whatever is behind it in the application.
- BackdropGammaTransferBrush: A brush which alters the colors of whatever is behind it in the application by applying a per-channel gamma transfer function.
- BackdropInvertBrush: The BackdropInvertBrush is a Brush which inverts whatever is behind it in the application.
- BackdropSaturationBrush: Brush which applies a SaturationEffect to the Backdrop.
- BackdropSepiaBrush: Brush which applies a SepiaEffect to the Backdrop.
- CanvasBrushBase: Helper Brush class to interop with Win2D Canvas calls.
- ImageBlendBrush: A Brush which blends a BitmapImage to the Backdrop in a given mode.
- PipelineBrush: A Brush that renders a customizable Composition/Win2D effects pipeline
- RadialGradientBrush: This GradientBrush defines its Gradient as an interpolation within an Ellipse.
- TilesBrush: A Brush that displays a tiled image, wrapping at the edges and endlessly repeating.

Geometry:
- CanvasPathGeometry: A class that parses Win2d Path Mini Language and converts it to CanvasGeometry, CanvasBrush, CanvasStroke, CanvasStrokeStyle or Color.
PipelineBuilder: A class that allows to build custom effects pipelines and create CompositionBrush instances from them.
</Description>
<PackageTags>UI;XAML;Acrylic;Brushes;Blur;Effects;Canvas;Geometry</PackageTags>
<PackageTags>UI;XAML;Acrylic;Brushes;Blur;Effects;Canvas;Geometry;Shadow;Shadows;Animation</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions Microsoft.Toolkit.Uwp.UI/Microsoft.Toolkit.Uwp.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<Title>Windows Community Toolkit - UI</Title>
<Description>
This library provides UI components, such as XAML extensions, helpers, converters and more. It is a part of the Windows Community Toolkit.
This library provides various common UI helpers. It is a part of the Windows Community Toolkit.

AdvancedCollectionView: It's a collection view implementation that support filtering, sorting and incremental loading. It's meant to be used in a viewmodel.

Expand All @@ -19,6 +19,7 @@

Extensions:
- ApplicationViewExtensions: Provides attached properties for interacting with the ApplicationView on a window (app view).
- AttachedDropShadow: Provides a composition based shadow effect which supports masking.
- FrameworkElementExtensions: Provides attached dependency properties for the FrameworkElement.
- ListViewExtensions: Provides attached dependency properties for the ListViewBase
- LogicalTree: Defines a collection of extensions methods for UI.
Expand All @@ -42,8 +43,10 @@
- BindableValueHolder: Holds the value. Can be used to change several objects' properties at a time.
- DependencyPropertyWatcher: Used to Track Changes of a Dependency Property
- ThemeListener: Class which listens for changes to Application Theme or High Contrast Modes and Signals an Event when they occur.

Triggers: Various Visual State Triggers to help trigger VisualStates in a wide variety of scenarios.
</Description>
<PackageTags>UI;XAML;ApplicationView;FrameworkElement;SurfaceDial;Matrix;Mouse;TextBoxMask;TitleBar;VisualTree;Converters;Extensions;Helpers</PackageTags>
<PackageTags>UI;XAML;ApplicationView;FrameworkElement;ListView;SurfaceDial;Matrix;Mouse;TextBoxMask;TitleBar;VisualTree;Converters;Extensions;Helpers</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.Uwp/Microsoft.Toolkit.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<PropertyGroup>
<Title>Windows Community Toolkit - Common (UWP)</Title>
<Description>This package includes code only helpers such as Colors conversion tool, Storage file handling, a Stream helper class, etc.</Description>
<PackageTags>Storage;File;Folder;Color;Conversion;Stream;Helpers;Extensions</PackageTags>
<Description>This package includes code only helpers such as Color conversion tool, Storage file handling, a Stream helper class, SystemInformation helpers, etc.</Description>
<PackageTags>Storage;File;Folder;Color;Conversion;Stream;Helpers;Extensions;System;Information</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 9 additions & 2 deletions Windows Community Toolkit.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31521.260
# Visual Studio Version 16
VisualStudioVersion = 16.0.31605.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9AD30620-667D-433C-9961-8D885EE7B762}"
EndProject
Expand Down Expand Up @@ -50,6 +50,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.targets = Directory.Build.targets
global.json = global.json
settings.xamlstyler = settings.xamlstyler
build\Windows.Toolkit.Common.props = build\Windows.Toolkit.Common.props
build\Windows.Toolkit.Common.targets = build\Windows.Toolkit.Common.targets
build\Windows.Toolkit.UWP.Build.targets = build\Windows.Toolkit.UWP.Build.targets
build\Windows.Toolkit.UWP.Controls.targets = build\Windows.Toolkit.UWP.Controls.targets
build\Windows.Toolkit.VisualStudio.Design.props = build\Windows.Toolkit.VisualStudio.Design.props
build\Windows.Toolkit.VisualStudio.Design.targets = build\Windows.Toolkit.VisualStudio.Design.targets
build\Windows.Toolkit.Workarounds.Xaml.targets = build\Windows.Toolkit.Workarounds.Xaml.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Uwp.UI.Controls.Core.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Microsoft.Toolkit.Uwp.UI.Controls.Core.DesignTools.csproj", "{7AEFC959-ED7C-4D96-9E92-72609B40FBE0}"
Expand Down
1 change: 1 addition & 0 deletions build/Windows.Toolkit.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<ItemGroup Condition="$(IsPackable)">
<None Include="$(BuildToolsDirectory)nuget.png" Pack="true" PackagePath="\Icon.png" />
<None Include="$(RepositoryDirectory)License.md" Pack="true" PackagePath="\" />
<None Include="$(RepositoryDirectory)ThirdPartyNotices.txt" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit f18604f

Please sign in to comment.