{"id":15059808,"url":"https://github.com/sonnemaf/numberboxinputsample","last_synced_at":"2026-01-02T06:03:05.602Z","repository":{"id":192530112,"uuid":"686924254","full_name":"sonnemaf/NumberBoxInputSample","owner":"sonnemaf","description":"WinUI3 and UWP Sample project showing how to limit keyboard input on a NumberBox, only allow nubers, no letters.","archived":false,"fork":false,"pushed_at":"2023-09-04T11:44:08.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T00:33:42.548Z","etag":null,"topics":["numberbox","uwp","winui","winui2","winui3"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonnemaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-04T08:33:18.000Z","updated_at":"2023-09-04T16:14:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"a093b14a-9ad1-4554-819c-df471e69854c","html_url":"https://github.com/sonnemaf/NumberBoxInputSample","commit_stats":null,"previous_names":["sonnemaf/numberboxinputsample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnemaf%2FNumberBoxInputSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnemaf%2FNumberBoxInputSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnemaf%2FNumberBoxInputSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnemaf%2FNumberBoxInputSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonnemaf","download_url":"https://codeload.github.com/sonnemaf/NumberBoxInputSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681084,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["numberbox","uwp","winui","winui2","winui3"],"created_at":"2024-09-24T22:48:12.008Z","updated_at":"2026-01-02T06:03:05.538Z","avatar_url":"https://github.com/sonnemaf.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NumberBoxInputSample\n\nWinUI3 and UWP Sample project showing how to limit keyboard input on a NumberBox, only allow nubers, no letters.\n\nUses `x:Bind` to the [PreviewKeyDownHandler](https://github.com/sonnemaf/NumberBoxInputSample/blob/master/WinUI3App1/PreviewKeyDownHandler.cs) helper class.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cWindow x:Class=\"WinUI3App1.MainWindow\"\n        xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n        xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\n        xmlns:helpers=\"using:Helpers\"\n        xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n        mc:Ignorable=\"d\"\u003e\n\n    \u003cGrid Background=\"{ThemeResource ApplicationPageBackgroundThemeBrush}\"\u003e\n        \u003cStackPanel Width=\"208\"\n                    HorizontalAlignment=\"Center\"\n                    VerticalAlignment=\"Center\"\n                    Spacing=\"8\"\u003e\n\n            \u003cNumberBox Header=\"A\"\n                       PreviewKeyDown=\"{x:Bind helpers:PreviewKeyDownHandler.RejectLetters}\"\n                       SpinButtonPlacementMode=\"Inline\" /\u003e\n\n            \u003cNumberBox Header=\"B\"\n                       PreviewKeyDown=\"{x:Bind helpers:PreviewKeyDownHandler.AcceptNumbersOnly}\" /\u003e\n\n            \u003cStackPanel Orientation=\"Horizontal\"\n                        PreviewKeyDown=\"{x:Bind helpers:PreviewKeyDownHandler.AcceptNumbersOnly}\"\n                        Spacing=\"8\"\u003e\n                \u003cNumberBox Width=\"100\"\n                           Header=\"C\" /\u003e\n                \u003cNumberBox Width=\"100\"\n                           Header=\"D\" /\u003e\n            \u003c/StackPanel\u003e\n        \u003c/StackPanel\u003e\n    \u003c/Grid\u003e\n\u003c/Window\u003e\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonnemaf%2Fnumberboxinputsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonnemaf%2Fnumberboxinputsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonnemaf%2Fnumberboxinputsample/lists"}