{"id":44512911,"url":"https://github.com/benpollarduk/netaf.wpf","last_synced_at":"2026-04-01T17:49:45.101Z","repository":{"id":338105858,"uuid":"914936022","full_name":"benpollarduk/NetAF.WPF","owner":"benpollarduk","description":"An extension library for NetAF targeting WPF and providing controls to allow NetAF to be easily integrated into WPF applications.","archived":false,"fork":false,"pushed_at":"2026-03-13T23:35:37.000Z","size":191,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-14T02:06:52.851Z","etag":null,"topics":["csharp","framework","interactive-fiction","netaf","text-adventure","wpf"],"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/benpollarduk.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-10T16:02:46.000Z","updated_at":"2026-03-13T23:33:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/benpollarduk/NetAF.WPF","commit_stats":null,"previous_names":["benpollarduk/netaf.wpf"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/benpollarduk/NetAF.WPF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.WPF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.WPF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.WPF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.WPF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benpollarduk","download_url":"https://codeload.github.com/benpollarduk/NetAF.WPF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.WPF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csharp","framework","interactive-fiction","netaf","text-adventure","wpf"],"created_at":"2026-02-13T15:50:25.776Z","updated_at":"2026-03-17T23:24:08.359Z","avatar_url":"https://github.com/benpollarduk.png","language":"C#","readme":"\u003cdiv align=\"center\"\u003e\n\n# NetAF.WPF\nAn extension library for NetAF targeting WPF and providing controls to allow NetAF to be easily integrated into WPF applications.\n\n![icon](.nuget/Icon.bmp)\n\n[![main-ci](https://github.com/benpollarduk/NetAF.WPF/actions/workflows/main-ci.yml/badge.svg)](https://github.com/benpollarduk/NetAF.WPF/actions/workflows/main-ci.yml)\n[![GitHub release](https://img.shields.io/github/release/benpollarduk/NetAF.WPF.svg)](https://github.com/benpollarduk/NetAF.WPF/releases)\n[![NuGet](https://img.shields.io/nuget/v/netaf.wpf.svg)](https://www.nuget.org/packages/netaf.wpf/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/netaf.wpf)](https://www.nuget.org/packages/netaf.wpf/)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.WPF\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.WPF)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.WPF\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.WPF)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.WPF\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.WPF)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.WPF\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.WPF)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.WPF\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.WPF)\n[![License](https://img.shields.io/github/license/benpollarduk/NetAF.WPF.svg)](https://opensource.org/licenses/MIT)\n\n\u003c/div\u003e\n\n## Getting Started\n\n### Running the Example\nGetting started running [NetAF](https://github.com/benpollarduk/NetAF/) in WPF is easy!\n\n* Clone the repo.\n* Build and run NetAF.WPF.TestApp.\n\n![wpf-example](https://github.com/user-attachments/assets/39ba248f-5a21-414b-9ee2-75f30249528d)\n\n## How it Works\nYou need a couple of components to run a NetAF game:\n\n* Input - a way to interact with the game.\n* Output - a way to view the game.\n\n### Input\nNetAF.WPF provides some easy ways to interact with the game:\n\n#### Prompt\nThe prompt allows direct text entry. Add the prompt to a window or control:\n\n```\n\u003ccontrols:NetAFPrompt/\u003e\n```\n\nThis will send input directly to the active game, in a window it looks like this:\n\n```\n\u003cWindow x:Class=\"NetAF.WPF.TestApp.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:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n        xmlns:controls=\"clr-namespace:NetAF.Targets.WPF.Controls;assembly=NetAF.WPF\"\n        mc:Ignorable=\"d\"\n        Title=\"Example\" Height=\"850\" Width=\"1000\"\u003e\n    \u003cGrid\u003e\n        \u003cGrid.RowDefinitions\u003e\n            \u003cRowDefinition Height=\"*\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n        \u003c/Grid.RowDefinitions\u003e\n        \u003ccontrols:NetAFPrompt Grid.Row=\"1\"/\u003e\n    \u003c/Grid\u003e\n\u003c/Window\u003e\n```\n\n#### Command Buttons\nCommand buttons make it easier to interact with a game. There are a few main types:\n\n* **NetAFCommandPicker** - functions as a general command picker for all commands.\n* **NetAFMovementCommandPicker** - functions as a general command picker for movement commands.\n* **NetAFRegionMapCommandPicker** - functions as a general command picker for navigating the region map.\n\nThese can be used individually or as a combination. The **ButtonLayout** control provides a preconfigured control that combines all of the above controls.\n\n```\n\u003clayouts:ButtonLayout x:Name=\"ButtonLayout\"/\u003e\n```\n\nAdding that to the window:\n\n```\n\u003cWindow x:Class=\"NetAF.WPF.TestApp.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:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n        xmlns:controls=\"clr-namespace:NetAF.Targets.WPF.Controls;assembly=NetAF.WPF\"\n        xmlns:inputLayouts=\"clr-namespace:NetAF.Targets.WPF.InputLayouts;assembly=NetAF.WPF\"\n        mc:Ignorable=\"d\"\n        Title=\"Example\" Height=\"850\" Width=\"1000\"\u003e\n    \u003cGrid\u003e\n        \u003cGrid.RowDefinitions\u003e\n            \u003cRowDefinition Height=\"*\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n        \u003c/Grid.RowDefinitions\u003e\n        \u003ccontrols:NetAFPrompt Grid.Row=\"1\"/\u003e\n        \u003cinputLayouts:ButtonLayout Grid.Row=\"2\"/\u003e\n    \u003c/Grid\u003e\n\u003c/Window\u003e\n```\n\n### Output\nNetAF provides a options for viewing the game:\n\n#### Text Terminal\nA basic terminal that just displays text without any styling.\n\n\u003cimg width=\"960\" height=\"682\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c243a54f-683a-45bd-a485-48235005737b\" /\u003e\n\n```\n\u003ccontrols:NetAFMTextTerminal/\u003e\n```\n\nAdding that to the window:\n\n```\n\u003cWindow x:Class=\"NetAF.WPF.TestApp.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:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n        xmlns:controls=\"clr-namespace:NetAF.Targets.WPF.Controls;assembly=NetAF.WPF\"\n        xmlns:inputLayouts=\"clr-namespace:NetAF.Targets.WPF.InputLayouts;assembly=NetAF.WPF\"\n        mc:Ignorable=\"d\"\n        Title=\"Example\" Height=\"850\" Width=\"1000\"\u003e\n    \u003cGrid\u003e\n        \u003cGrid.RowDefinitions\u003e\n            \u003cRowDefinition Height=\"*\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n        \u003c/Grid.RowDefinitions\u003e\n        \u003ccontrols:NetAFTextTerminal x:Name=\"Terminal\" Grid.Row=\"0\"/\u003e\n        \u003ccontrols:NetAFPrompt Grid.Row=\"1\"/\u003e\n        \u003cinputLayouts:ButtonLayout Grid.Row=\"2\"/\u003e\n    \u003c/Grid\u003e\n\u003c/Window\u003e\n```\n\n#### Markup Terminal\nThe markup terminal is highly recommended as it provides customisable styling to frames.\n\n\u003cimg width=\"961\" height=\"645\" alt=\"image\" src=\"https://github.com/user-attachments/assets/aa3a3536-d514-4369-8b83-067131b66c2e\" /\u003e\n\n```\n\u003ccontrols:NetAFMarkupTerminal/\u003e\n```\n\nAdding that to the window:\n\n```\n\u003cWindow x:Class=\"NetAF.WPF.TestApp.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:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n        xmlns:controls=\"clr-namespace:NetAF.Targets.WPF.Controls;assembly=NetAF.WPF\"\n        xmlns:inputLayouts=\"clr-namespace:NetAF.Targets.WPF.InputLayouts;assembly=NetAF.WPF\"\n        mc:Ignorable=\"d\"\n        Title=\"Example\" Height=\"850\" Width=\"1000\"\u003e\n    \u003cGrid\u003e\n        \u003cGrid.RowDefinitions\u003e\n            \u003cRowDefinition Height=\"*\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n            \u003cRowDefinition Height=\"Auto\"/\u003e\n        \u003c/Grid.RowDefinitions\u003e\n        \u003ccontrols:NetAFMarkupTerminal x:Name=\"Terminal\" Grid.Row=\"0\"/\u003e\n        \u003ccontrols:NetAFPrompt Grid.Row=\"1\"/\u003e\n        \u003cinputLayouts:ButtonLayout Grid.Row=\"2\"/\u003e\n    \u003c/Grid\u003e\n\u003c/Window\u003e\n```\n\n#### Directing Game Output to the Terminal\nThe game output needs to be pointed to the terminal. This is done with adapters. In the case of a NetAFTextTerminal the terminal is passed directly to the adapter on configuration:\n\n```csharp\nusing NetAF.Logic;\nusing NetAF.Rendering.FrameBuilders;\nusing NetAF.Targets.Text;\nusing System.Windows;\n\nnamespace NetAF.WPF.TestApp\n{\n    public partial class MainWindow : Window\n    {\n        public MainWindow()\n        {\n            InitializeComponent();\n\n            var configuration = new GameConfiguration(new TextAdapter(Terminal), FrameBuilderCollections.Text, Assets.Size.Dynamic);\n            GameExecutor.Execute(ExampleGame.Create(configuration));\n        }\n    }\n}\n```\n\nAnd in the case that markup is used:\n\n```csharp\nusing NetAF.Logic;\nusing NetAF.Rendering.FrameBuilders;\nusing NetAF.Targets.Markup;\nusing System.Windows;\n\nnamespace NetAF.WPF.TestApp\n{\n    public partial class MainWindow : Window\n    {\n        public MainWindow()\n        {\n            InitializeComponent();\n\n            var configuration = new GameConfiguration(new MarkupAdapter(Terminal), FrameBuilderCollections.Markup, Assets.Size.Dynamic);\n            GameExecutor.Execute(ExampleGame.Create(configuration));\n        }\n    }\n}\n```\n\nWith that you should be ready to go!\n\n## Persistence\nThe **NetAFFileManager** control adds easy persistence options to a game:\n\n```\n\u003ccontrols:NetAFFileManager/\u003e\n```\n\n\u003cimg width=\"953\" height=\"121\" alt=\"image\" src=\"https://github.com/user-attachments/assets/798622f4-ce8b-4545-bd8a-cc8069f54e92\" /\u003e\n\nNo configuration is required.\n\n## Styling\nThe controls can all be styled. By default a dark style is included - Targets/WPF/Styles/Dark.xaml.\n\nTo use this style merge it with the resource dictionary of your window or control:\n\n```\n\u003cWindow.Resources\u003e\n    \u003cResourceDictionary\u003e\n        \u003cResourceDictionary.MergedDictionaries\u003e\n            \u003cResourceDictionary Source=\"/NetAF.WPF;component/Targets/WPF/Styles/Dark.xaml\"/\u003e\n        \u003c/ResourceDictionary.MergedDictionaries\u003e\n    \u003c/ResourceDictionary\u003e\n\u003c/Window.Resources\u003e\n```\n\nAnd then apply the styles to the various controls:\n\n```\n\u003ccontrols:NetAFMarkupTerminal Style=\"{StaticResource DarkMarkupTerminalStyle}\"/\u003e\n\u003ccontrols:NetAFPrompt Style=\"{StaticResource DarkPromptStyle}\"/\u003e\n\u003clayouts:ButtonLayout Style=\"{StaticResource DarkButtonLayoutStyle}\"/\u003e\n```\n\n## Example Game\nThe [ExampleGame](NetAF.WPF.TestApp/Example.cs) is included in the repo.\n\n## Documentation\nPlease visit [https://benpollarduk.github.io/NetAF-docs/](https://benpollarduk.github.io/NetAF-docs/) to view the NetAF documentation.\n\n## For Open Questions\nVisit https://github.com/benpollarduk/NetAF.WPF/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpollarduk%2Fnetaf.wpf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenpollarduk%2Fnetaf.wpf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpollarduk%2Fnetaf.wpf/lists"}