{"id":25066806,"url":"https://github.com/oriches/simple.wpf.terminal","last_synced_at":"2025-04-05T22:09:56.855Z","repository":{"id":12736061,"uuid":"15409038","full_name":"oriches/Simple.Wpf.Terminal","owner":"oriches","description":"A simple console\\terminal window for use in a WPF application ","archived":false,"fork":false,"pushed_at":"2023-11-23T10:07:38.000Z","size":2949,"stargazers_count":105,"open_issues_count":4,"forks_count":24,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T22:09:51.032Z","etag":null,"topics":["csharp","dotnet","dotnet-core","terminal","wpf","wpf-application","xaml"],"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/oriches.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":"2013-12-24T01:53:34.000Z","updated_at":"2025-03-07T01:28:17.000Z","dependencies_parsed_at":"2023-11-23T11:24:46.303Z","dependency_job_id":"48ca7df7-f35c-44f7-b0d7-e81c7df6b088","html_url":"https://github.com/oriches/Simple.Wpf.Terminal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriches%2FSimple.Wpf.Terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriches%2FSimple.Wpf.Terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriches%2FSimple.Wpf.Terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oriches%2FSimple.Wpf.Terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oriches","download_url":"https://codeload.github.com/oriches/Simple.Wpf.Terminal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406111,"owners_count":20933806,"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":["csharp","dotnet","dotnet-core","terminal","wpf","wpf-application","xaml"],"created_at":"2025-02-06T20:28:03.323Z","updated_at":"2025-04-05T22:09:56.837Z","avatar_url":"https://github.com/oriches.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple.Wpf.Terminal\n\n[![NuGet](https://img.shields.io/nuget/v/simple.wpf.terminal.svg)](https://github.com/oriches/simple.wpf.terminal)\n[![Build status](https://ci.appveyor.com/api/projects/status/q6156o3477vsss4p/branch/master?svg=true)](https://ci.appveyor.com/project/oriches/simple-wpf-terminal/branch/master)\n\nSupported versions:\n\n\t.NET Framework 4.7 and higher,\n\t.Net Core 3.1 and higher,\n\t.Net 5.0 and higher\n\nA simple console\\\\terminal window for use in a WPF application, this is a user control that will allow the user to enter a line of text (script\\\\command) and\\or display a list of items in a console\\\\terminal style.\n\nThis user control does NOT actually do anything more than display data - the user control is the View (UI) in a MVVM implementation, the ViewModel would be responsible for the actual behaviour \u0026 contents of the console\\\\terminal window. The user control is designed to use XAML binding for all UI properties the user can configure.\n\nThe control supports theming and there are a couple of example themes supplied in the Simple.Wpf.Terminal.Themes project.\n\nFor more information about the releases see [Release Info] (https://github.com/oriches/Simple.Wpf.Terminal/wiki/Release-Info).\n\nFor more information about the styling the control see [Style Info] (https://github.com/oriches/Simple.Wpf.Terminal/wiki/Style-Info).\n\nCurrently we support the following .Net versions:\n\t\nThis library is available as a nuget [package] (https://www.nuget.org/packages/Simple.Wpf.Terminal/).\n\nExamples of usage:\n\n### Custom F# Interactive window in a WPF application\n![alt text](https://raw.github.com/oriches/Simple.Wpf.Terminal/master/Readme%20Images/fsharp_repl.png \"F# Interactive window\")\n\nThe XAML is shown below:\n\n```XAML\n\u003ct:Terminal x:Name=\"TerminalOutput\"\n            IsReadOnlyCaretVisible=\"False\"\n            VerticalScrollBarVisibility=\"Visible\"\n            Style=\"{DynamicResource ReplTerminalStyle}\"\n            IsReadOnly=\"{Binding Path=IsReadOnly, Mode=OneWay}\"\n            Prompt=\"{Binding Path=Prompt, Mode=OneWay}\"\n            ItemsSource=\"{Binding Path=Output, Mode=OneWay}\"\n            ItemDisplayPath=\"Value\"\u003e\n\n        \u003ct:Terminal.InputBindings\u003e\n            \u003cKeyBinding Command=\"{Binding Path=ClearCommand, Mode=OneWay}\"\n                        Gesture=\"CTRL+E\" /\u003e\n            \u003cKeyBinding Command=\"{Binding Path=ResetCommand, Mode=OneWay}\"\n                        Gesture=\"CTRL+R\" /\u003e\n            \u003cKeyBinding Command=\"{x:Null}\"\n                        Gesture=\"CTRL+L\" /\u003e\n        \u003c/t:Terminal.InputBindings\u003e\n\n        \u003ct:Terminal.ContextMenu\u003e\n            \u003cContextMenu\u003e\n                \u003cMenuItem Header=\"Clear\"\n                          InputGestureText=\"Ctrl+E\"\n                          Command=\"{Binding Path=ClearCommand, Mode=OneWay}\" /\u003e\n                \u003cMenuItem Header=\"Reset\"\n                          InputGestureText=\"Ctrl+R\"\n                          Command=\"{Binding Path=ResetCommand, Mode=OneWay}\" /\u003e\n                \u003cSeparator /\u003e\n                \u003cMenuItem Header=\"Copy\"\n                          InputGestureText=\"Ctrl+C\"\n                          Command=\"ApplicationCommands.Copy\" /\u003e\n                \u003cMenuItem Header=\"Paste\"\n                          InputGestureText=\"Ctrl+V\"\n                          Command=\"ApplicationCommands.Paste\" /\u003e\n                \u003cSeparator /\u003e\n                \u003cMenuItem Header=\"Open Working Folder\"\n                          Command=\"{Binding Path=OpenWorkingFolderCommand, Mode=OneWay}\" /\u003e\n           \u003c/ContextMenu\u003e\n        \u003c/t:Terminal.ContextMenu\u003e\n\n        \u003ci:Interaction.Triggers\u003e\n            \u003ci:EventTrigger EventName=\"LineEntered\"\u003e\n                \u003ci:InvokeCommandAction Command=\"{Binding Path=ExecuteCommand, Mode=OneWay}\"\n                                       CommandParameter=\"{Binding Path=Line, Mode=OneWay, ElementName=TerminalOutput}\" /\u003e\n            \u003c/i:EventTrigger\u003e\n        \u003c/i:Interaction.Triggers\u003e\n\n\u003c/t:Terminal\u003e\n```\nAn example of the Terminal Style (ReplTerminalStyle) is shown below and is available at the link below the example:\n\n```XAML\n\u003cResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n                    xmlns:terminal=\"clr-namespace:Simple.Wpf.Terminal;assembly=Simple.Wpf.Terminal\"\n                    xmlns:ui=\"clr-namespace:Simple.Wpf.FSharp.Repl.UI;assembly=Simple.Wpf.FSharp.Repl\"\u003e\n\n    \u003cResourceDictionary.MergedDictionaries\u003e\n        \u003cResourceDictionary Source=\"/Simple.Wpf.FSharp.Repl;component/UI/DefaultTheme.xaml\" /\u003e\n    \u003c/ResourceDictionary.MergedDictionaries\u003e\n\n    \u003cui:LineColorConverter x:Key=\"LineColorConverter\"\n                           Normal=\"DeepSkyBlue\"\n                           Error=\"Red\"/\u003e\n\n    \u003cStyle x:Key=\"ReplTerminalStyle\"\n           TargetType=\"{x:Type terminal:Terminal}\"\n           BasedOn=\"{x:Null}\"\u003e\n        \u003cSetter Property=\"BorderThickness\"\n                Value=\"0\" /\u003e\n        \u003cSetter Property=\"Background\"\n                Value=\"Black\" /\u003e\n        \u003cSetter Property=\"Foreground\"\n                Value=\"DeepSkyBlue\" /\u003e\n        \u003cSetter Property=\"LineColorConverter\"\n                Value=\"{StaticResource LineColorConverter}\" /\u003e\n        \u003cSetter Property=\"ItemsMargin\"\n                Value=\"5\" /\u003e\n        \u003cSetter Property=\"ItemHeight\"\n                Value=\"10\" /\u003e\n    \u003c/Style\u003e\n\n\u003c/ResourceDictionary\u003e\n```\n\nThe code for this is available here - https://github.com/oriches/Simple.Wpf.FSharp.Repl\n\n### In-app Log viewer in a WPF application\n![alt text](https://raw.github.com/oriches/Simple.Wpf.Terminal/master/Readme%20Images/log_window.png \"Log window\")\n\nThe XAML is shown below:\n\n```XAML\n\u003cResourceDictionary.MergedDictionaries\u003e\n        \u003cResourceDictionary Source=\"/Simple.Wpf.Terminal.Themes;component/BlueTheme.xaml\" /\u003e\n\u003c/ResourceDictionary.MergedDictionaries\u003e\n    \n\u003cterminal:Terminal x:Name=\"LoggingTerminal\"\n\t\t   Margin=\"5\"\n\t\t   IsReadOnly=\"True\"\n\t\t   VerticalScrollBarVisibility=\"Visible\"\n\t\t   Prompt=\"{Binding Path=Prompt, Mode=OneTime}\"\n\t\t   ItemsSource=\"{Binding Path=Entries, Mode=OneWay}\"/\u003e\n```\n\nThe code for this is available here - https://github.com/oriches/Simple.Wpf.Composition\n\n\nI'd be interested to hear about other uses :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriches%2Fsimple.wpf.terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foriches%2Fsimple.wpf.terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriches%2Fsimple.wpf.terminal/lists"}