Skip to content

Commit

Permalink
Merge branch 'release/v22.1.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
billhenn committed May 27, 2022
2 parents 1ba80fa + 01b131f commit 9509bbd
Show file tree
Hide file tree
Showing 47 changed files with 1,089 additions and 273 deletions.
4 changes: 2 additions & 2 deletions Documentation/topics/conversion/converting-to-v22-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ order: 87
---
# Converting to v22.1

The 22.1 version made several minor API changes in the SyntaxEditor Python Language Add-on. A new [ToggleSwitch](../shared/windows-controls/toggle-switch.md) control (Shared Library) also resulted in renaming the existing ToggleSwitch (Guage) as [FlipSwitch](xref:@ActiproUIRoot.Controls.Gauge.FlipSwitch) to avoid ambiguity.
The 22.1 version made several minor API changes in the SyntaxEditor Python Language Add-on. A new [ToggleSwitch](../shared/windows-controls/toggle-switch.md) control (Shared Library) also resulted in renaming the existing ToggleSwitch (Gauge) as [FlipSwitch](xref:@ActiproUIRoot.Controls.Gauge.FlipSwitch) to avoid ambiguity.

## SyntaxEditor Drag and Drop Updates

Expand Down Expand Up @@ -42,7 +42,7 @@ The [RegexCompletionItemMatcherBase](xref:@ActiproUIRoot.Controls.SyntaxEditor.I

Any custom classes which derive from [RegexCompletionItemMatcherBase](xref:@ActiproUIRoot.Controls.SyntaxEditor.IntelliPrompt.Implementation.RegexCompletionItemMatcherBase) will need to add the additional argument and update the logic to only use capture groups (i.e., parenthesis) in the pattern when requested.

## ToggleSwitch Control (Guage Library) Renamed to FlipSwitch
## ToggleSwitch Control (Gauge Library) Renamed to FlipSwitch

To avoid ambiguity with a new [ToggleSwitch](../shared/windows-controls/toggle-switch.md) control (Shared Library), the existing Actipro Gauge `ToggleSwitch` control has been renamed to [FlipSwitch](xref:@ActiproUIRoot.Controls.Gauge.FlipSwitch). The following related types and members have also been renamed:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ For instance, if a tool window is floated, it will show up in a single [ToolWind

A floating dock host can have its icon and title set via the [DockSite](xref:@ActiproUIRoot.Controls.Docking.DockSite).[FloatingWindowIcon](xref:@ActiproUIRoot.Controls.Docking.DockSite.FloatingWindowIcon) and [FloatingWindowTitle](xref:@ActiproUIRoot.Controls.Docking.DockSite.FloatingWindowTitle) properties respectively. It's generally a good practice to use an application icon as the icon and the application title as the title.

The floating dock host's title will also combine with the dock host's primary document's title (if there is a document in the dock host), which gives better clarity as to its contents in the Windows taskbar and Alt+Tab screens. The primary document's title will appear before the [FloatingWindowTitle](xref:@ActiproUIRoot.Controls.Docking.DockSite.FloatingWindowTitle) value and will be delimited by the [FloatingWindowTitleDelimiter](xref:@ActiproUIRoot.Controls.Docking.DockSite.FloatingWindowTitleDelimiter) value when both are present.

The virtual [DockSite](xref:@ActiproUIRoot.Controls.Docking.DockSite).[GetFloatingDockHostTitle](xref:@ActiproUIRoot.Controls.Docking.DockSite.GetFloatingDockHostTitle*) method does the work of generating the resolved title text for the floating dock host and can be overridden if custom logic should be used instead.

## Using Drag Float Previews

By default, dragging a docking window will instantly float it, giving it more of a live feel. The [DockSite](xref:@ActiproUIRoot.Controls.Docking.DockSite).[UseDragFloatPreviews](xref:@ActiproUIRoot.Controls.Docking.DockSite.UseDragFloatPreviews) property, which defaults to `false`, can be set to `true` to prevent this behavior and only show a float preview highlight while dragging.
Expand Down
121 changes: 59 additions & 62 deletions Documentation/topics/docking/prism.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Documentation/topics/licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ There are two ways to apply licensing once you have purchased licenses for Actip
The first licensing option is to make a method call at app startup before any UI is referenced to register your license information. This option is quick and easy, and works best for scenarios where Actipro [NuGet packages](nuget.md) or build servers are used. See the "Licensing Via a RegisterLicense Call" section below for detailed information on this option.

The second licensing option is to provide licensing via a licenses.licx file. This is the classic style of implementing licensing in .NET Framework applications, and is what Actipro exclusively used prior to v2020.1. See the "Licensing Via a Licenses.licx File" section below for detailed information on this option.
The second licensing option is to provide licensing via a licenses.licx file. This option is only available for classic .NET Framework applications that have direct assembly references, and is what Actipro exclusively used prior to v20.1. See the "Licensing Via a Licenses.licx File" section below for detailed information on this option.

## Licensing Via a RegisterLicense Call

This licensing option is ideal when Actipro [NuGet packages](nuget.md) or build servers are used.
This licensing option is required when Actipro [NuGet packages](nuget.md) are used. It is also ideal when build servers are used for classic .NET Framework applications with direct assembly references.

In this licensing option, we make a single code-based call to the `ActiproLicenseManager.RegisterLicense` method at application startup, before any UI is referenced. This static call registers your license information globally throughout your application.

Expand All @@ -83,7 +83,7 @@ When using this licensing option, do NOT include any Actipro entries in your app
## Licensing Via a Licenses.licx File

This licensing option is the classic style of implementing licensing in .NET Framework applications, and is what Actipro exclusively used prior to v2020.1. Note that .NET Framework applications can either use this licensing option or the `RegisterLicense` call licensing option described above.
This licensing option is only available for classic .NET Framework applications, and is what Actipro exclusively used prior to v20.1. Note that .NET Framework applications with direct assembly references can either use this licensing option or the `RegisterLicense` call licensing option described above.

### Summary of Licenses.licx File Licensing Steps

Expand Down 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.1.0, Culture=neutral, PublicKeyToken=36ff2196ab5654b9
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.Wpf, Version=22.1.2.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.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.

## Updates for v22.1.1

- **Ribbon:** Updated the [RibbonWindow](ribbon/controls/ribbonwindow.md) topic with sample code for how to apply templates (e.g., custom title bar content) to the `WindowChrome` pre-installed with `RibbonWindow`.
Expand Down
13 changes: 13 additions & 0 deletions Documentation/topics/shared/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ A simple object that implements `IDisposable`.
<tr>
<td>

[EnvironmentHelper](xref:@ActiproUIRoot.EnvironmentHelper)

</td>
<td>

Provides helper methods for interacting with the environment and platform. For instance, its [IsWindowsMinimumRelease](xref:@ActiproUIRoot.EnvironmentHelper.IsWindowsMinimumRelease*) method returns whether the current operating system is a Windows operating system that is at least the specified [WindowsRelease](xref:@ActiproUIRoot.WindowsRelease).

</td>
</tr>

<tr>
<td>

[ILogicalParent](xref:@ActiproUIRoot.ILogicalParent)

</td>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/topics/themes/native-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Applies to `DocumentViewer` controls.
</td>
<td>

Applies to `Expander` controls.
Applies to `Expander` controls. Note that this style uses expand/collapse animation by default, which can lead to performance issues while expanding/collapsing when there are an enormous number of elements within the expanded content. Set the attached `ThemeProperties.IsAnimationEnabled` dependency property to `false` on the `Expander` to prevent animation.

</td>
</tr>
Expand Down
26 changes: 26 additions & 0 deletions Documentation/topics/themes/windowchrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Features include:
- Normal border, or single pixel-border with outer glow / drop shadow effects
- Outer glow / drop shadow areas support window resizing
- System-rendered rounded corner, border, and drop shadow support on Windows 11 or later
- System backdrop (Mica, Acrylic textures) support on recent Windows versions
- Snap layout menu support on Windows 11 or later
- Optionally extend the window content itself, or just the background, to render in the title bar area
- Full Aero-snap support
Expand Down Expand Up @@ -175,6 +176,25 @@ The `Square` value does not use the Windows system to round any corners, render
> [!NOTE]
> When on a Windows 10 or earlier system, the corner kind is coerced to `Square`, since the system rounded corner feature isn't available until Windows 11.
## System Backdrop (Mica, Acrylic) Rendering

The [BackdropKind](xref:@ActiproUIRoot.Themes.WindowChrome.BackdropKind) property allows for a system-rendered backdrop to be displayed anywhere there is a transparent portion of a `Window`.

Various backdrops have different Windows version support as listed below, and no backdrops are rendered in high-contrast mode:

- MainWindow - A background material rendered for main windows. On Windows 11 or later, this corresponds to the "Mica" material.
- TransientWindow - A background material rendered for transient (popup/menu) windows. On Windows 10 (May 2020 Update) or later, this corresponds to the "Acrylic" material.

When a backdrop is specified but the operating system doesn't support the backdrop, or high-contrast mode is active, no backdrop will be rendered and a default opaque window background will be used.

### Determining Backdrop Status

The attached `WindowChrome.IsBackdropActive` property (set on the `Window` instance) returns whether a backdrop is currently being rendered.

### Backdrop in the Title Bar

The attached `WindowChrome.IsTitleBarBackdropAllowed` property (set on the `Window` instance) determines if a backdrop can be rendered in the title bar area of a window. This attached property is set by the current theme, but can be overridden on the `Window` instance. While most themes allow backdrops to be rendered in the title bar, by default, themes with accented title bar backgrounds do not.

## Title Bar Text Display

The attached `WindowChrome.TitleBarHeader` property (set on the `Window` instance) is what renders content in the center of the title bar. By default, the `Window.Title` string value is bound to this attached property so that the window title appears in the title bar.
Expand Down Expand Up @@ -443,6 +463,12 @@ The overlay covers the entire window but does sit in z-order behind the title ba

It also allows any custom title bar controls to be accessible, which may or may not be desired. If a custom title bar control should not be accessible when an overlay is visible, it should be hidden or disabled. The attached `WindowChrome.IsOverlayVisible` property on the window can be bound to using an appropriate value converter, or you can update the custom title bar control states programmatically in an [IsOverlayVisibleChanged](xref:@ActiproUIRoot.Themes.WindowChrome.IsOverlayVisibleChanged) event handler.

### Focus Scope

Overlays are designed by default to be focus scopes (similar to menus/toolbars), where their content can only temporarily be focused and the owner window will track which element previously had focus before the overlay displayed. This allows for focus to be easily returned to the previous element.

The attached `WindowChrome.IsOverlayFocusScope` property can be set on a window to specify if its overlay is a focus scope or not. The default is `true`, but can be set to `false` when the overlay content should not be a separate focus scope.

## Using an Alternate Title Bar Style

Actipro Themes include resources for two sets of title bar styles, which affect both the title bar and its title bar buttons. Most of the time, the two sets are the same. However, when using a theme with an accented title bar (like in Office Colorful themes), the "alternate" title bar style renders in a non-accented appearance. This is commonly seen on Office-like Backstage overlays.
Expand Down
6 changes: 3 additions & 3 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.1.0</Version>
<Version>22.1.2.0</Version>

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

<ItemGroup>
<PackageReference Include="Prism.Unity" Version="7.2.0.1422" />
<PackageReference Include="Prism.Unity" Version="8.1.97" />
</ItemGroup>

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

</Project>
5 changes: 4 additions & 1 deletion Samples/PrismIntegration/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
This sample shows how to integrate Docking/MDI for WPF into a Prism application,
using Unity for inversion of control/dependency injection.

The project references Prism v7.2 and targets .NET 4.6.2.
The project targets a specific version of Prism and .NET Framework, but those versions
should not been seen as minimum or maximum requirements for the integration to be
successful. The Prism version and target framework can be changed to verify if the
sample code is compatible with your configuration needs.


ABOUT THIS SAMPLE
Expand Down
2 changes: 1 addition & 1 deletion Samples/PrismIntegration/Views/Shell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:prism="http://prismlibrary.com/"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:viewModels="clr-namespace:ActiproSoftware.Windows.PrismIntegration.ViewModels"
Title="Actipro Prism v7.2 (Unity) Integration Sample"
Title="Actipro Prism (Unity) Integration Sample"
Icon="/Actipro.ico"
Width="800" Height="600"
>
Expand Down
Binary file added Samples/SampleBrowser/Images/Icons/HomeMono16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<!-- DockSite -->
<docking:DockSite x:Name="dockSite" Grid.Row="1"
CanDocumentWindowsFloat="True" FloatingWindowTitle="Docking/MDI Simple IDE Demo" FloatingWindowIcon="/Images/Icons/Actipro.ico"
CanDocumentWindowsFloat="True" FloatingWindowTitle="Docking/MDI Demo" FloatingWindowIcon="/Images/Icons/Actipro.ico"
FloatingWindowOpening="OnDockSiteFloatingWindowOpening"
MdiKindChanged="OnDockSiteMdiKindChanged"
MenuOpening="OnDockSiteMenuOpening"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@

<StatusBarItem Grid.Column="2">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="linePanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="Ln 1" />
<TextBlock x:Name="columnPanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="Col 1" />
<TextBlock x:Name="characterPanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="Ch 1" />
<TextBlock x:Name="linePanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="{Binding ElementName=editor, Path=ActiveView.Selection.CaretPosition.DisplayLine, StringFormat='Ln {0}'}" />
<TextBlock x:Name="columnPanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="{Binding ElementName=editor, Path=ActiveView.Selection.CaretDisplayCharacterColumn, StringFormat='Col {0}'}" />
<TextBlock x:Name="characterPanel" MinWidth="40" Margin="7,0,7,0" VerticalAlignment="Center" Text="{Binding ElementName=editor, Path=ActiveView.Selection.CaretPosition.DisplayCharacter, StringFormat='Ch {0}'}" />
</StackPanel>
</StatusBarItem>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
Expand Down Expand Up @@ -645,10 +646,12 @@ private void OnSyntaxEditorViewSelectionChanged(object sender, EditorViewSelecti
if (!e.View.IsActive)
return;

// Update line, col, and character display
linePanel.Text = String.Format("Ln {0}", e.CaretPosition.DisplayLine);
columnPanel.Text = String.Format("Col {0}", e.CaretDisplayCharacterColumn);
characterPanel.Text = String.Format("Ch {0}", e.CaretPosition.DisplayCharacter);
// The line, col, and character display are updated using XAML bindings in the view, but the
// following could also be used to programatically update the status of the caret position:
Debug.WriteLineIf(false, string.Format("Ln {0} Col {1} Ch {2}",
e.CaretPosition.DisplayLine,
e.CaretDisplayCharacterColumn,
e.CaretPosition.DisplayCharacter));

// If token info should be displayed in the statusbar...
if (toggleTokenInfoMenuItem.IsChecked) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Actipro Syntax Language Definition (.langdef)
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<RegexPatternGroup TokenKey="CommentText" Pattern="[^*]" />
<RegexPatternGroup TokenKey="CommentText" Pattern="[^*]+" />
</State>
</DynamicLexer>
</LanguageDefinition.Lexer>
Expand Down
Loading

0 comments on commit 9509bbd

Please sign in to comment.