Skip to content

Commit

Permalink
Merge branch 'release/v22.1.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
billhenn committed Sep 8, 2022
2 parents 9509bbd + e848de6 commit d2f4f1c
Show file tree
Hide file tree
Showing 26 changed files with 203 additions and 39 deletions.
11 changes: 11 additions & 0 deletions Documentation/topics/docking/docking-window-features/switchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,14 @@ Gets or sets the shadow elevation. The default value is `8`. Set this property
}

In scenarios where you don't use tool windows at all, set the [AreToolWindowsVisible](xref:@ActiproUIRoot.Controls.Docking.StandardSwitcher.AreToolWindowsVisible) property to `false`. Likewise, if you don't use MDI, set the [AreDocumentsVisible](xref:@ActiproUIRoot.Controls.Docking.StandardSwitcher.AreDocumentsVisible) property to `false`.

## Non-Switcher Tab Selection Key Gestures

Several other helpful tab selection key gestures are built into the product.

| Key | Description |
|-----|-----|
| `Ctrl+PgUp` | Activates the previous tab in the same container by selecting it and focusing its content. |
| `Ctrl+PgDn` | Activates the next tab in the same container by selecting it and focusing its content. |
| `Ctrl+1`, `Ctrl+2`, etc. | Directly activates the numbered tab in a normal state in the current container. For instance, `Ctrl+2` activates the second tab in a normal state. |
| `Ctrl+Alt+1`, `Ctrl+Alt+2`, etc. | Directly activates the numbered tab in a pinned state in the current container. For instance, `Ctrl+Alt+2` activates the second tab in a pinned state. |
10 changes: 10 additions & 0 deletions Documentation/topics/docking/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ This topic's information will assume you are using Visual Studio to write your X

@if (winrt) {

## App Must Target Fall Creators Update or Later

The Actipro @@PlatformName Controls target 'Windows 10 Fall Creators Update (10.0; Build 16299)'. Any apps using them must also set the project's target version AND minimum version to the same or newer, or errors may occur.

The controls also use Microsoft's 'Win2D.uwp' NuGet package, which must also be referenced. Please see the Readme file for a detailed chart specifying which Windows 10 target versions are compatible with the various NuGet package requirement versions.

}

@if (winrt) {

## Add Extension SDK Reference

In the Visual Studio "Add References" dialog, expand out "Windows/Extensions" and add the "Actipro Universal Windows Controls" SDK to your project. This process is described in further detail in the [References and Deployment](../deployment.md) topic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ The [IsPopupOpenedOnFocus](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.

The height of the popup can be restricted by setting the [MaxPopupHeight](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.MaxPopupHeight) property.

A header can be displayed within the popup by setting the [PopupHeader](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.PopupHeader), [PopupHeaderTemplate](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.PopupHeaderTemplate), and [PopupHeaderTemplateSelector](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.PopupHeaderTemplateSelector) properties.

## Submitting

When the end user clicks on a suggested item or presses `Enter` (even if the suggestion list is not open at the time), the [Submitted](xref:@ActiproUIRoot.Controls.Editors.AutoCompleteBox.Submitted) event is raised. Handlers of this event should perform whichever search query or command execution is appropriate based on the supplied text.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/topics/licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ The contents of a "licenses.licx" file are pretty simple. It needs a single lin
This single line (update the version to match the one you use) should be added to the "licenses.licx" file in any project that uses Actipro @@PlatformName control or SyntaxEditor add-on products:

```
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.Wpf, Version=22.1.2.0, Culture=neutral, PublicKeyToken=36ff2196ab5654b9
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.Wpf, Version=22.1.3.0, Culture=neutral, PublicKeyToken=36ff2196ab5654b9
```

### Notes on Build Machines When Using Licenses.licx Files
Expand Down
4 changes: 4 additions & 0 deletions Documentation/topics/recent-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ WPF Studio's documentation has frequent updates, so this topic is the best place

If you are looking for a list of recently added major new features to WPF Studio products, please see the Sample Browser's Recent Updates page instead.

## Updates for v22.1.3

- **SyntaxEditor:** Updated the [Word Wrap](syntaxeditor/user-interface/editor-view/word-wrap.md) topic with information on configuring the wrapped line indent amount.

## Updates for v22.1.2

- **Docking/MDI:** Updated the [Floating Dock Hosts](docking/docking-window-features/floating-dock-hosts.md) topic with information on new features for customizing the floating dock host title.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Don't know where to get started building a custom syntax language? This walkthr

This walkthough gives you a sequence of concepts to understand when working with syntax languages. Each section in the walkthough provides a brief overview along with links to other documentation topics that give detailed information about the related subject.

> [!TIP]
> The **Sample Browser** application included with our installer includes a series of *Getting Started QuickStarts* for building a custom language with full source code and a working sample for each step.
## Understanding Language Concepts

A syntax language is an object implementing [ISyntaxLanguage](xref:ActiproSoftware.Text.ISyntaxLanguage) that can be assigned to an [ICodeDocument](xref:ActiproSoftware.Text.ICodeDocument) to provide language-specific functionality for the document. This functionality can be anything from word-break finding to lexing/parsing, all available via registered services. Multiple syntax languages can be created so that different documents can each receive different functionality.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ A parsing framework is the key to enhancing a [SyntaxEditor](../index.md) editin

## Parser Type

The parser in our framework is LL(*), meaning it is a top-down parser that can run on a subset of context-free grammars. It parses input from left to right, traces leftmost derivation, and by default uses one symbol of look-ahead. This normally would mean LL(1), however [can-match callbacks](callbacks-and-error-handling.md) allow infinite symbol look-ahead, thus making it LL(*).
The parser in our framework is LL(*), meaning it is a top-down parser that can run on a subset of context-free grammars. It parses input from left to right, traces leftmost derivation, and by default uses one symbol of look-ahead.

This normally would mean LL(1), however [can-match callbacks](callbacks-and-error-handling.md) allow infinite symbol look-ahead, thus making it LL(*).

LL parsers do not support left recursion however grammars can generally be refactored to eliminate left recursion and turn it into right recursion instead. Ambiguity can be resolved using can-match callbacks. Examples of handling both scenarios are given in this framework's documentation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Press the `Esc` key when there are multiple selection ranges to collapse back to

Most built-in edit actions and editing features are designed to support multiple selections. For instance, pressing `Shift+Right Arrow` will extend all of the selections by one character. Copying text from multiple selections unions the selected text, joining each range's text with a line terminator. Pasting multi-line text into a view with the same number of selections as text lines being pasted will replace each selection with a related line from the pasted text.

### Adding the Next Occurrence

Pressing `Ctrl+D` adds the next occurrence of the currently-selected text to the selection, or selects the current word if there is no selection.

The [IEditorViewSelection](xref:@ActiproUIRoot.Controls.SyntaxEditor.IEditorViewSelection).[AddNextOccurrence](xref:@ActiproUIRoot.Controls.SyntaxEditor.IEditorViewSelection.AddNextOccurrence*) method provides access to this functionality.

## Creating Block Selections at Run-time

Block selections can be made via the mouse or the keyboard.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,15 @@ private void OnSyntaxEditorWordWrapModeChanged(object sender, EventArgs e) {
Word wrap glyphs can be displayed on the right side of view lines in a special margin that indicate soft line breaks (wrapped lines).

The [SyntaxEditor](xref:@ActiproUIRoot.Controls.SyntaxEditor.SyntaxEditor).[AreWordWrapGlyphsVisible](xref:@ActiproUIRoot.Controls.SyntaxEditor.SyntaxEditor.AreWordWrapGlyphsVisible) property can be set to `true` to activate this functionality.

@if (wpf winforms) {

## Wrapped Line Indent Amount

By default, wrapped lines are indented by a configurable amount, relative to their primary line's indentation. The [SyntaxEditor](xref:@ActiproUIRoot.Controls.SyntaxEditor.SyntaxEditor).[WrappedLineIndentAmount](xref:@ActiproUIRoot.Controls.SyntaxEditor.SyntaxEditor.WrappedLineIndentAmount) property is what determines the indent amount of wrapped lines.

A value of `2` (the default) will indent wrapped lines to the original indent level of the primary line, plus `2` additional character widths. A value of `0` will indent wrapped lines to the original indent level of the primary line. A value of `-1` will not indent wrapped lines at all, and will simply align them to the left edge of the view.

The indent amount may be limited or altogether disabled if there is not enough available width in the view to support proper indentation.

}
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ The following tables describe the default key bindings that are in place when th
| Ctrl + Shift + Page Up | [SelectToVisibleTopAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectToVisibleTopAction) |
| Ctrl + Shift + Page Down | [SelectToVisibleBottomAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectToVisibleBottomAction) |
| Ctrl + A | [SelectAllAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectAllAction) |
| Ctrl + D | [AddNextOccurrenceToSelectionAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.AddNextOccurrenceToSelectionAction) |
| Ctrl + Shift + W | [SelectWordAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectWordAction) |
| Ctrl + Shift + ] | [SelectToMatchingBracketAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectToMatchingBracketAction) |
| Shift + Alt + Down | [SelectBlockDownAction](xref:@ActiproUIRoot.Controls.SyntaxEditor.EditActions.SelectBlockDownAction) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,28 @@ CommonImageSourceProvider provider = new CommonImageSourceProvider(CommonImageKi

### Image Set Selection

@if (winforms) {

There are several image sets that are included with SyntaxEditor:

- Classic - Best for non-Metro themes.
- MetroLight (default) - Best for most Metro themes.
- MetroDark - Best for the MetroDark theme.

}

@if (winrt wpf) {

The MetroLight and MetroDark image sets are implemented with vector graphics, enabling the best clarity when used on high DPI systems.
There are several image sets that are included with SyntaxEditor:

- Classic - Best for non-Metro themes.
- MetroLight (default) - Best for most Metro themes.
- MetroDark - Best for the MetroDark theme.

}

> [!TIP]
> The MetroLight and MetroDark image sets are implemented with vector graphics, enabling the best clarity when used on high DPI systems.
To change the image set that is currently in effect, set the [CommonImageSourceProvider](xref:@ActiproUIRoot.Controls.SyntaxEditor.IntelliPrompt.Implementation.CommonImageSourceProvider).[DefaultImageSet](xref:@ActiproUIRoot.Controls.SyntaxEditor.IntelliPrompt.Implementation.CommonImageSourceProvider.DefaultImageSet) property to a [CommonImageSet](xref:@ActiproUIRoot.Controls.SyntaxEditor.IntelliPrompt.Implementation.CommonImageSet) value. Note that some UI, such as for the [NavigableSymbolSelector](navigable-symbol-selector.md), may need to be reloaded following a change to this property.

## Custom Image Source Providers
Expand Down
4 changes: 2 additions & 2 deletions Samples/PrismIntegration/PrismIntegration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ApplicationIcon>Actipro.ico</ApplicationIcon>

<Version>22.1.2.0</Version>
<Version>22.1.3.0</Version>

<RootNamespace>ActiproSoftware.Windows.PrismIntegration</RootNamespace>
<Company>Actipro Software LLC</Company>
Expand All @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup Label="Actipro References">
<PackageReference Include="ActiproSoftware.Controls.WPF.Docking" Version="22.1.2" />
<PackageReference Include="ActiproSoftware.Controls.WPF.Docking" Version="22.1.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ public static IEnumerable<PredefinedFormat> TimeSpan {
new PredefinedFormat("General (short)", "g"),
new PredefinedFormat("General (long)", "G"),
new PredefinedFormat(@"Custom (hh\h mm\m ss\s)", @"hh\h mm\m ss\s"),
new PredefinedFormat(@"Custom (+dd:hh:mm:ss.fff)", @"+dd:hh:mm:ss.fff"),
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,20 @@

<sampleBrowser:SampleGalleryControl>

<sampleBrowser:LabeledCardControl Label="Countries list, using DisplayMemberPath and ComboBox input mode, and with a clear button on focus">
<sampleBrowser:LabeledCardControl Label="Countries list, using DisplayMemberPath, ComboBox input mode, popup header, and with a clear button when there is text">
<editors:AutoCompleteBox x:Name="countryBox" MinWidth="300" PlaceholderText="Country" TextMemberPath="Name"
DisplayMemberPath="Name" InputMode="ComboBox" HasClearButton="True" HorizontalAlignment="Left">
DisplayMemberPath="Name" InputMode="ComboBox" HasClearButton="True" HorizontalAlignment="Left"
PopupHeader="Select a country:">
<editors:AutoCompleteBox.DataFilter>
<editors:AutoCompleteBoxStringFilter />
</editors:AutoCompleteBox.DataFilter>
<editors:AutoCompleteBox.PopupHeaderTemplate>
<DataTemplate>
<Border Background="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerBackgroundLowBrushKey}}">
<TextBlock Margin="4" Text="{Binding}" TextWrapping="Wrap" />
</Border>
</DataTemplate>
</editors:AutoCompleteBox.PopupHeaderTemplate>
</editors:AutoCompleteBox>
</sampleBrowser:LabeledCardControl>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ private static void OnOpenExecuted(object sender, ExecutedRoutedEventArgs e) {
if (!BrowserInteropHelper.IsBrowserHosted)
dialog.CheckFileExists = true;
dialog.Multiselect = false;
dialog.Filter = "Code files (*.cs;*.vb;*.js;*.py;*.xml;*.txt)|*.cs;*.vb;*.js;*.py;*.xml;*.txt|All files (*.*)|*.*";
dialog.Filter = "Code files (*.cs;*.vb;*.js;*.json;*.py;*.xml;*.txt)|*.cs;*.vb;*.js;*.json;*.py;*.xml;*.txt|All files (*.*)|*.*";
if (dialog.ShowDialog() == true) {
// Open a document
if (BrowserInteropHelper.IsBrowserHosted) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ public MainControl() {
editor.Document.Language.RegisterService(new IndicatorQuickInfoProvider());

// Add some indicators
editor.ActiveView.Selection.StartOffset = editor.ActiveView.CurrentSnapshot.Lines[15].StartOffset + 10;
editor.ActiveView.Selection.SelectWord();
this.AddIndicator(editor.ActiveView.Selection.SnapshotRange);
editor.ActiveView.Selection.StartOffset = editor.ActiveView.CurrentSnapshot.Lines[22].StartOffset + 10;
editor.ActiveView.Selection.SelectWord();
this.AddIndicator(editor.ActiveView.Selection.SnapshotRange);
this.AddIndicatorForWordAtOffset(editor.ActiveView.CurrentSnapshot.Lines[15].StartOffset + 10);
this.AddIndicatorForWordAtOffset(editor.ActiveView.CurrentSnapshot.Lines[22].StartOffset + 10);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -57,6 +53,24 @@ private void AddIndicator(TextSnapshotRange snapshotRange) {
editor.Document.IndicatorManager.Add<CustomIndicatorTagger, CustomIndicatorTag>(snapshotRange, tag);
}

/// <summary>
/// Adds an indicator for the word at the specified offset.
/// </summary>
/// <param name="startOffset">The offset to examine.</param>
private void AddIndicatorForWordAtOffset(int startOffset) {
var reader = editor.ActiveView.CurrentSnapshot.GetReader(startOffset);

if (!reader.IsAtTokenStart) {
reader.GoToCurrentWordStart();
startOffset = reader.Offset;
}

reader.GoToCurrentWordEnd();
var endOffset = reader.Offset;

this.AddIndicator(new TextSnapshotRange(reader.Snapshot, startOffset, endOffset));
}

/// <summary>
/// Occurs when the button is clicked.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:editor="http://schemas.actiprosoftware.com/winfx/xaml/syntaxeditor"
xmlns:grids="http://schemas.actiprosoftware.com/winfx/xaml/grids"
xmlns:gridseditors="http://schemas.actiprosoftware.com/winfx/xaml/gridseditors"
xmlns:sampleBrowser="clr-namespace:ActiproSoftware.SampleBrowser"
>

Expand All @@ -13,6 +14,9 @@
<sampleBrowser:SampleOptionsPropertyGrid>
<grids:PropertyModel CanAutoConfigure="True" Value="{Binding Mode=TwoWay, ElementName=editor, Path=WordWrapMode}" />
<grids:PropertyModel CanAutoConfigure="True" Value="{Binding Mode=TwoWay, ElementName=editor, Path=AreWordWrapGlyphsVisible}" />
<grids:PropertyModel CanAutoConfigure="True" Value="{Binding Mode=TwoWay, ElementName=editor, Path=WrappedLineIndentAmount}">
<gridseditors:Int32PropertyEditor Minimum="-1" Maximum="8" SmallChange="1" LargeChange="2" HasPopup="True" PickerKind="Default" />
</grids:PropertyModel>
</sampleBrowser:SampleOptionsPropertyGrid>
</Expander>

Expand All @@ -22,7 +26,9 @@
<editor:SyntaxEditor x:Name="editor" WordWrapMode="Word" AreWordWrapGlyphsVisible="True" IsOutliningMarginVisible="False">
<editor:EditorDocument xml:space="preserve"><![CDATA[SyntaxEditor has complete word wrap support. When long lines are word-wrapped, the text content that would normally be off of the visible view area is wrapped to a new a display line. The horizontal scrollbar also disappears when in word wrap mode since it is no longer necessary.
An option is available to determine whether wrapped lines display glyphs. The glyphs make it plainly visible to the end user which lines were wrapped.
- An option is available to determine whether wrapped lines display glyphs. The glyphs make it plainly visible to the end user which lines were wrapped.
- By default, wrapped lines are indented by a configurable amount, relative to their primary line's indentation. This feature can also be turned off if desired, causing wrapped lines to align to the view's left edge.
]]></editor:EditorDocument>
</editor:SyntaxEditor>

Expand Down
4 changes: 2 additions & 2 deletions Samples/SampleBrowser/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("22.1.2.0")]
[assembly: AssemblyInformationalVersion("22.1.2.0 - 20220315")]
[assembly: AssemblyVersion("22.1.3.0")]
[assembly: AssemblyInformationalVersion("22.1.3.0 - 20220527")]
2 changes: 1 addition & 1 deletion Samples/SampleBrowser/Properties/Licenses.licx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.Wpf, Version=22.1.2.0, Culture=neutral, PublicKeyToken=36ff2196ab5654b9
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.Wpf, Version=22.1.3.0, Culture=neutral, PublicKeyToken=36ff2196ab5654b9
Loading

0 comments on commit d2f4f1c

Please sign in to comment.