Skip to content

Commit 63e31de

Browse files
author
Morten Nielsen
committed
Fix doc
1 parent d207dd8 commit 63e31de

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

docs/concepts/NumberBox.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## `NumberBox<T>`
22

3-
Port of WinUI's NumberBox control to support generic number types.
3+
Port of WinUI's [NumberBox](https://learn.microsoft.com/en-us/windows/apps/design/controls/number-box) control to support generic number types.
44

55
This control supports validation, increment stepping, and computing inline calculations of basic equations such as multiplication, division, addition, and subtraction.
66

@@ -14,6 +14,8 @@ To be able to assign Decimal values to the NumberBoxDecimal control, it can't be
1414

1515
## Usage
1616

17+
For the most part, you can rely on [Microsoft's NumberBox documentation](https://learn.microsoft.com/en-us/windows/apps/design/controls/number-box) for how to use this control.
18+
1719
Register the WinUIEx xmlns namespace and add one of the specified controls :
1820
```xml
1921
<ex:NumberBoxInt32 Header="NumberBoxInt32" AllowNull="True"
@@ -33,12 +35,8 @@ Register the WinUIEx xmlns namespace and add one of the specified controls :
3335
Description="Decimal"
3436
PlaceholderText="Enter number" />>
3537
```
36-
to
37-
```xml
38-
<winex:WindowEx xmlns:winex="using:WinUIEx" Width="1024" Height="768" ...>
39-
```
4038

41-
## Extending with your own number-type
39+
### Extending with your own number-type
4240

4341
First create a custom subclass of `NumberBox<T>`, for example for `float`:
4442

@@ -47,7 +45,7 @@ public class NumberBoxFloat : NumberBox<float>
4745
{
4846
public NumberBoxFloat() => DefaultStyleKey = typeof(NumberBoxFloat);
4947
}
50-
```cs
48+
```
5149

5250
Next duplicate the control template from the other NumberBox controls and update the target type to match the new type name.
5351

src/WinUIExtensions.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "concepts", "concepts", "{0B
3535
..\docs\concepts\index.md = ..\docs\concepts\index.md
3636
..\docs\concepts\Maui.md = ..\docs\concepts\Maui.md
3737
..\docs\concepts\MediaPlayer.md = ..\docs\concepts\MediaPlayer.md
38+
..\docs\concepts\NumberBox.md = ..\docs\concepts\NumberBox.md
3839
..\docs\concepts\Splashscreen.md = ..\docs\concepts\Splashscreen.md
3940
..\docs\concepts\toc.yml = ..\docs\concepts\toc.yml
4041
..\docs\concepts\TrayIcon.md = ..\docs\concepts\TrayIcon.md

0 commit comments

Comments
 (0)