wpfXamlEditor

UNDER CONSTRUCTION

Overview

XamlEditor is a Xaml editor for an APL variable or for a file on disk. This user command is able to show the Xaml in color with folding, print it, reorganize it so it is more readable according to some settings set by the user. It is inspired by the work of Robby Ingebretsen of Kaxaml (http://www.Kaxaml.com). It is particularly valuable for APLers that like to keep their Xaml in the workspace. With XamlEditor they have a tool to maintain it without effort.

Usage

Once installed the user command can be invoke by typing ]XamlEditor (casing is not important, no argument). The following start-up screen will appear:

InitialView.png
Here is a short description for each buttons:

Button

Explanation

Button

Explanation

Exec32.png

Execute the Xaml and Show the Result in a Separate Window

SelectAll24.png

Select All the Xaml

Scrubber24.png

Scrub the Xaml According to Settings

Delete24.png

Delete the Selected Text

OpenObject24.png

Open a Dialog Box to Select a Xaml Variable in the WS

ClearClipboard24.png

Clear the Clipboard

SaveObject24.png

Open a Dialog Box to Save the Xaml as a Variable in the WS

Undo24.png

Undo Last Operation

Open24.png

Open a Dialog Box to Select a File on Disk

Redo24.png

Redo Previous Operation

Save24.png

Open a Dialog Box to Save the Xaml to a File

Print32.png

Print All the Xaml

Cut24.png

Cut the Selected Text to The Clipboard

PrintPreview32.png

Print Preview All the Xaml

Copy24.png

Copy the Selected Text to the Clipboard

Comments24.png

Make Selected Text a Comment

Paste24.png

Paste the Text From the clipboard

Settings24.png

Choose the Settings when Scrubbing

Installation

  1. Download the file wpfXamlEditor.1.0.zip. It contains the Dyalog user command file wpfXamlEditor.dyalog and a dll named ICSharpCode.AvalonEdit.dll

  2. Copy the file wpfXamlEditor.dyalog to your user command directory (for advice how to organize your User Commands see UserCommands/WhereShouldTheyGo).

  3. Copy the file ICSharpCode.AvalonEdit.dll to the same directory as your dyalog.exe file (as shown by doing +2 ⎕NQ'.' 'GetEnvironment' 'Dyalog')(you may need administrator privileges for doing that). That dll is free of charge and was written by Daniel Grunwald. It can be downloaded from CodeProject or from AvalonEdit but is included in the zip file for commodity.

Detailed Explanations

Exec32.png

Execute the Xaml and Show the Result in a Separate Window


The settings for scrubbing are saved in a xml file named XED.Settings.xml. The file will be created automatically the first time the user command runs. It will be located next to the wpfXamlEditor.dyalog file or in the AppData directory depending on the Windows version and security. The data of the file looks like this:

<Settings>
  <EditorFont>APL385 Unicode</EditorFont>
  <EditorFontSize>14</EditorFontSize>
  <ReducePrecision>0</ReducePrecision>
  <Precision>10</Precision>
  <AttributeCounteTolerance>2</AttributeCounteTolerance>
  <ReorderAttributes>1</ReorderAttributes>
  <RemoveCommonDefaultValues>1</RemoveCommonDefaultValues>
  <ConvertTabsToSpaces>1</ConvertTabsToSpaces>
  <SpaceCount>2</SpaceCount>
</Settings>


It is used to build the Settings window (button Settings24.png of the command bar).
Settings.png
Look at the individual tooltips on the Window for more information on each settings.