AK.Toolkit.WinUI3.ScrollBarExtensions 1.0.5

dotnet add package AK.Toolkit.WinUI3.ScrollBarExtensions --version 1.0.5                
NuGet\Install-Package AK.Toolkit.WinUI3.ScrollBarExtensions -Version 1.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AK.Toolkit.WinUI3.ScrollBarExtensions" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AK.Toolkit.WinUI3.ScrollBarExtensions --version 1.0.5                
#r "nuget: AK.Toolkit.WinUI3.ScrollBarExtensions, 1.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AK.Toolkit.WinUI3.ScrollBarExtensions as a Cake Addin
#addin nuget:?package=AK.Toolkit.WinUI3.ScrollBarExtensions&version=1.0.5

// Install AK.Toolkit.WinUI3.ScrollBarExtensions as a Cake Tool
#tool nuget:?package=AK.Toolkit.WinUI3.ScrollBarExtensions&version=1.0.5                

🧰 AK.Toolkit

The AK.Toolkit will be a collection of controls, helpers, etc... stuff that I need but couldn't find somewhere else.

🔵 WinUI 3

💻 AutoCompleteTextBox

🎬 YouTube

A TextBox control that shows a suggestion based on input. AutoCompleteTextBox shows a suggestion inside the TextBox control.

<toolkit:AutoCompleteTextBox
    IsSuggestionCaseSensitive="false"
    SuggestionForeground="HotPink"
    SuggestionPrefix="..."
    SuggestionSuffix=" ? [Press Right]"
    SuggestionsSource="{x:Bind Suggestions, Mode=OneWay}" />

AutoCompleteTextBox Screenshot

🔢 NumberBoxEx

🎬 YouTube

In addition to the built-in NumberBox:

  • NumberHorizontalAlignment DependencyProperty
  • IsDeleteButtonVisible DependencyProperty

Coming soon:

  • Thousand separators
    • Comma
    • Space

⚒️ ScrollBarExtensions.KeepExpanded

🎬 YouTube

An attached property that keeps ScrollBars expanded.


<ScrollBar toolkit:ScrollBarExtensions.KeepVerticalExpanded="True" />

<ScrollViewer
    toolkit:ScrollBarExtensions.KeepHorizontalExpanded="True"
    toolkit:ScrollBarExtensions.KeepVerticalExpanded="True">
    <ItemsRepeater />
</ScrollViewer>

<ListView toolkit:ScrollBarExtensions.KeepVerticalExpanded="True" />

<GridView toolkit:ScrollBarExtensions.KeepVerticalExpanded="True" />

<NavigationView toolkit:ScrollBarExtensions.KeepVerticalExpanded="True" />

⚒️ ScrollBarExtensions.Annotations

🎬 YouTube

An attached property that adds annotations to vertical ScrollBars.

First, you need to create a collection of your annotations that implements IAnnotation or just use the built-in BasicAnnotation.

public interface IAnnotation
{
    double Value { get; }

    ValueType ValueType { get; }

    Shape Shape { get; }

    double LeftOffset { get; }
}

public record BasicAnnotation : IAnnotation
{
    public double Value { get; }

    public ValueType ValueType { get; set; }

    public Shape Shape { get; private set; }

    public double LeftOffset { get; set; }

    public BasicAnnotation(double value, Shape shape)
    {
        Value = value;
        Shape = shape;
    }
}

Then bind your annotations using ScrollBarExtensions.VerticalAnnotations attached property.

<controls:DataGrid
    toolkit:ScrollBarExtensions.KeepVerticalExpanded="True"
    toolkit:ScrollBarExtensions.VerticalAnnotations="{x:Bind Annotations, Mode=OneWay}"
    ItemsSource="{x:Bind Users}">

ScrollBar Extensions Annotations Screenshot

🏁 Grid Extensions - GridIndexer (GI)

🎬 YouTube

An extensions that makes it easier to define rows and columns in Grid.

For example, usually, you need to define the ColumnDefinitions and the RowDefinitions like below. You also need to set the Grid.Row and Grid.Column by INDEX which makes it difficult and error prone to modificate the order.

<Grid
    ColumnDefinitions="*,*,*,*,*"
    RowDefinitions="*,*,*,*,*">
    <TextBlock Grid.Row="0" Grid.Column="0"/>
    <TextBlock Grid.Row="1" Grid.Column="1"/>
    <TextBlock Grid.Row="2" Grid.Column="2"/>
    <TextBlock Grid.Row="3" Grid.Column="3"/>
    <TextBlock Grid.Row="4" Grid.Column="4"/>
</Grid>

You can use GridIndexer (GI) and define your columns and rows like below.

<Grid>
    <TextBlock GI.Row="0" GI.Column="0"/>
    <TextBlock GI.Row="+1" GI.Column="+1"/>
    <TextBlock GI.Row="+1" GI.Column="+1"/>
    <TextBlock GI.Row="+1" GI.Column="+1"/>
    <TextBlock GI.Row="+1" GI.Column="+1"/>
</Grid>

🛠️ Utilities

🧩 RandomStringGenerator

🎬 YouTube

A static class that generates random strings.

OutputType Source
Numbers 0123456789
Alphabets ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
LowerCaseAlphabets abcdefghijklmnopqrstuvwxyz
UpperCaseAlphabets ABCDEFGHIJKLMNOPQRSTUVWXYZ
AlphaNumerics ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
LowerCaseAlphaNumerics abcdefghijklmnopqrstuvwxyz0123456789
UpperCaseAlphaNumerics ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

It's easy to use.

string randomString = RandomStringGenerator.GenerateString(
    OutputType.AlphaNumerics,
    minLength: 3,
    maxLength: 10);

🗑️ Deprecated

🌏 Localizer

Note: Localizer has been replaced with WinUI3Localizer.

🎬 YouTube

Localizer helps you to localize your app.

  • Switch languages without restarting the app
  • You (users) can edit localized strings even after deployment
  • You (users) can add new languages even after deployment
  • Use the starndard Resources.resw
Product Compatible and additional computed target framework versions.
.NET net6.0-windows10.0.19041 is compatible.  net7.0-windows was computed.  net7.0-windows10.0.19041 is compatible.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 1,429 4/13/2023
1.0.4 171 4/1/2023
1.0.3 195 3/13/2023
1.0.2 210 2/28/2023
1.0.1 226 2/22/2023
1.0.0 220 2/21/2023