Skip to content

Commit e2844ec

Browse files
Add Data Binding to Adorner TabViewItem sample
1 parent 1f71527 commit e2844ec

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

components/Adorners/samples/Adorners.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ However, with an Adorner instead, you can abstract this behavior from the conten
3636

3737
> [!SAMPLE AdornersInfoBadgeSample]
3838
39-
You can see how Adorners react to more dynamic content, like a TabViewItem here:
39+
You can see how Adorners react to more dynamic content with this more complete example here:
4040

4141
> [!SAMPLE AdornersTabBadgeSample]
4242
43+
The above example shows how to leverage XAML animations and data binding alongside the XAML-based Adorner with a `TabViewItem` which can also move or disappear.
44+
4345
## Highlight Example
4446

4547
Adorners can be used in a variety of scenarios. For instance, if you wanted to highlight an element and show it's alignment to other elements in a creativity app:

components/Adorners/samples/AdornersTabBadgeSample.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
IsHitTestVisible="False"
1919
Opacity="0.9"
2020
Visibility="{x:Bind IsAdornerVisible, Mode=OneWay}"
21-
Value="3">
21+
Value="{x:Bind (x:Int32)BadgeValue, Mode=OneWay}">
2222
<animations:Implicit.ShowAnimations>
2323
<animations:RotationInDegreesAnimation From="45"
2424
To="0"

components/Adorners/samples/AdornersTabBadgeSample.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace AdornersExperiment.Samples;
66

77
[ToolkitSampleBoolOption("IsAdornerVisible", true, Title = "Is Adorner Visible")]
8+
[ToolkitSampleNumericOption("BadgeValue", 3, 1, 5, 1, true, Title = "Badge Value")]
89

910
[ToolkitSample(id: nameof(AdornersTabBadgeSample), "InfoBadge w/ Adorner in TabView", description: "A sample for showing how add an InfoBadge to a TabViewItem via an Adorner.")]
1011
public sealed partial class AdornersTabBadgeSample : Page

0 commit comments

Comments
 (0)