Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKeepCoding committed Apr 1, 2023
1 parent cf0e54e commit 96adbce
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions AK.Toolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{0DFB7268-1E7E-460F-A670-8336E61A13A4}"
ProjectSection(SolutionItems) = preProject
Assets\auto-complete-textbox-screenshot.png = Assets\auto-complete-textbox-screenshot.png
Assets\scrollbar-extensions-annotations-screenshot.png = Assets\scrollbar-extensions-annotations-screenshot.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E80FA35-6512-4090-A907-90D58957C6A6}"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,54 @@ An attached property that keeps `ScrollBars` expanded.
<NavigationView toolkit:ScrollBarExtensions.KeepVerticalExpanded="True" />
```

### ⚒️ UI.ScrollBarExtensions.Annotations (Work in progress...)
### ⚒️ ScrollBarExtensions.Annotations

[🎬 YouTube]()

An attached property that adds annotations to `ScrollBars`.
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``.

```csharp
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.

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

![ScrollBar Extensions Annotations Screenshot](Assets/scrollbar-extensions-annotations-screenshot.png)

### 🏁 Grid Extensions - GridIndexer (GI)

Expand Down

0 comments on commit 96adbce

Please sign in to comment.