Skip to content

Commit

Permalink
Updates for v23.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
billhenn committed Nov 2, 2023
1 parent 1dc8343 commit a21b27a
Show file tree
Hide file tree
Showing 49 changed files with 1,451 additions and 126 deletions.
8 changes: 8 additions & 0 deletions Documentation/api-filter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
apiRules:

# Include EditorBrowsableState.Never in Actipro namespaces (excluded by default)
- include:
uidRegex: ^ActiproSoftware\.
hasAttribute:
uid: System.ComponentModel.EditorBrowsableAttribute
ctorArguments:
- System.ComponentModel.EditorBrowsableState.Never

# Exclude compatibility and core product code
- exclude:
uidRegex: ^ActiproSoftware\.Compatibility$
Expand Down
2 changes: 1 addition & 1 deletion Documentation/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"src": [
{
"src": "../../Source/bin/Release/net6.0",
"src": "../../Deploy/Build/AssembliesDocFX",
"files": [
// Actipro assemblies
"ActiproSoftware.*.dll"
Expand Down
2 changes: 2 additions & 0 deletions Documentation/topics/conversion/.toc-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: "Conversion Notes"
order: 42
24 changes: 24 additions & 0 deletions Documentation/topics/conversion/converting-to-v23-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "Converting to v23.1"
page-title: "Converting to v23.1 - Conversion Notes"
order: 10
---
# Converting to v23.1

While v23.1.0 was the first public release version, some updates were made in maintenance releases that are described below.

## User Interface Density Changes

v23.1.1 introduced the concept of user interface density, a configurable way to set how spacious a user interface layout should appear. v23.1.0 shipped with what is effectively now the `Spacious` density option, which is very touch friendly. v23.1.1 has updated the default to be the `Normal` density option, resulting in a slightly more compact layout out of the box.

The [User Interface Density](../themes/user-interface-density.md) topic discusses the density feature in detail and how to change it both initially and at any point later at run-time. Use code in that topic to adjust the density if you prefer the old `Spacious` density option or the even more dense desktop-oriented `Compact` density option for your application.

## Theme Definition Changes

### ScrollBar Thumbs

v23.1.0 used to have a `ScrollBarThumbMargin` property on [ThemeDefinition](xref:@ActiproUIRoot.Themes.Generation.ThemeDefinition) that would keep the thumb ascent relative to the containing scrollbar track size. Scrollbar thumb sizing has been refactored in v23.1.1 and is much more flexible. The new design allows for fixed thumb thicknesses, or alternatively having the thumb size relative to the containing track size. Thumbs now default to a slightly thinner fixed `4.0` thickness instead of the previous effective value of `6.0`. Set both the [ScrollBarThumbMinAscent](xref:@ActiproUIRoot.Themes.Generation.ThemeDefinition.ScrollBarThumbMinAscent) and [ScrollBarThumbMaxAscent](xref:@ActiproUIRoot.Themes.Generation.ThemeDefinition.ScrollBarThumbMaxAscent) properties to `6.0` if the previous appearance is desired.

### MenuItem Padding

v23.1.0 used to have a `MenuItemPadding` property on [ThemeDefinition](xref:@ActiproUIRoot.Themes.Generation.ThemeDefinition), but that property was removed in v23.1.1 since the padding applied to menu items now automatically scales based on UI density.
12 changes: 12 additions & 0 deletions Documentation/topics/conversion/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Overview"
page-title: "Conversion Notes"
order: 1
---
# Overview

Occasionally during large updates to a product, some breaking changes are necessary to either add enhanced functionality or improve the overall design of the various products.

Read the following topics that are appropriate for your scenario if you are converting from an older version to the latest version.

- [Converting to v23.1](converting-to-v23-1.md)
72 changes: 71 additions & 1 deletion Documentation/topics/fundamentals/user-prompt/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,24 @@ When either the [HeaderBackground](xref:@ActiproUIRoot.Controls.UserPromptContro

## Images

@if (avalonia) {
Any `IImage` can be set to the [StatusImage](xref:@ActiproUIRoot.Controls.UserPromptControl.StatusImage) or [FooterImage](xref:@ActiproUIRoot.Controls.UserPromptControl.FooterImage) properties for a custom look. When using the [builder pattern](builder-pattern.md), set the `IImage` using [WithStatusImage](xref:@ActiproUIRoot.Controls.UserPromptBuilder.WithStatusImage*) or [WithFooterImage](xref:@ActiproUIRoot.Controls.UserPromptBuilder.WithFooterImage*).

The images used by [MessageBoxImage](xref:@ActiproUIRoot.Controls.MessageBoxImage) can also be customized by assigning a custom [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider) to the [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider).[Default](xref:@ActiproUIRoot.Media.ImageProvider.Default) property. Each value for [MessageBoxImage](xref:@ActiproUIRoot.Controls.MessageBoxImage) corresponds to a key of the same name defined by [SharedImageKeys](xref:@ActiproUIRoot.Media.SharedImageKeys). For example, the image [MessageBoxImage](xref:@ActiproUIRoot.Controls.MessageBoxImage).[Warning](xref:@ActiproUIRoot.Controls.MessageBoxImage.Warning) corresponds to the key [SharedImageKeys](xref:@ActiproUIRoot.Media.SharedImageKeys).[Warning](xref:@ActiproUIRoot.Media.SharedImageKeys.Warning). A custom class which derives from [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider) can override the [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider).[GetImageSource](xref:@ActiproUIRoot.Media.ImageProvider.GetImageSource*) method to return a custom `IImage` for one or more of those keys.
}
@if (wpf) {
Any `ImageSource` can be set to the [StatusImageSource](xref:@ActiproUIRoot.Controls.UserPromptControl.StatusImageSource) or [FooterImageSource](xref:@ActiproUIRoot.Controls.UserPromptControl.FooterImageSource) properties for a custom look. When using the [builder pattern](builder-pattern.md), set the `ImageSource` using [WithStatusImage](xref:@ActiproUIRoot.Controls.UserPromptBuilder.WithStatusImage*) or [WithFooterImage](xref:@ActiproUIRoot.Controls.UserPromptBuilder.WithFooterImage*).

The images used by [UserPromptStandardImage](xref:@ActiproUIRoot.Controls.UserPromptStandardImage) can also be customized by assigning a custom [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider) to the [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider).[Default](xref:@ActiproUIRoot.Media.ImageProvider.Default) property. Each value for [UserPromptStandardImage](xref:@ActiproUIRoot.Controls.UserPromptStandardImage) corresponds to a key of the same name defined by [SharedImageKeys](xref:@ActiproUIRoot.Media.SharedImageSourceKeys). For example, the image [UserPromptStandardImage](xref:@ActiproUIRoot.Controls.UserPromptStandardImage).[Warning](xref:@ActiproUIRoot.Controls.UserPromptStandardImage.Warning) corresponds to the key [SharedImageSourceKeys](xref:@ActiproUIRoot.Media.SharedImageSourceKeys).[Warning](xref:@ActiproUIRoot.Media.SharedImageSourceKeys.Warning). A custom class which derives from [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider) can override the [ImageProvider](xref:@ActiproUIRoot.Media.ImageProvider).[GetImageSource](xref:@ActiproUIRoot.Media.ImageProvider.GetImageSource*) method to return a custom `ImageSource` for one or more of those keys.
}

## Customize UserPromptWindow

The [UserPromptWindow](xref:@ActiproUIRoot.Controls.UserPromptWindow) does not have a public constructor and is only created by the [UserPromptWindow](xref:@ActiproUIRoot.Controls.UserPromptWindow).[ShowDialog](xref:@ActiproUIRoot.Controls.UserPromptWindow.ShowDialog*) method. One of the arguments for [ShowDialog](xref:@ActiproUIRoot.Controls.UserPromptWindow.ShowDialog*) allows you to pass an `Action<UserPromptWindow>` which is invoked with a reference to the [UserPromptWindow](xref:@ActiproUIRoot.Controls.UserPromptWindow) after it is configured, but before it is shown. This callback allows the [UserPromptWindow](xref:@ActiproUIRoot.Controls.UserPromptWindow) to be customized.

The following code demonstrates using the callback to customize the flow direction of the window:

@if (avalonia) {
```csharp
var userPromptControl = new UserPromptControl() { ... };
Window owner = null; // Use default
Expand All @@ -39,9 +47,25 @@ await UserPromptWindow.ShowDialog(
window.FlowDirection = FlowDirection.RightToLeft;
});
```
}
@if (wpf) {
```csharp
var userPromptControl = new UserPromptControl() { ... };
Window owner = null; // Use default
UserPromptWindow.ShowDialog(
userPromptControl,
"Window Title",
owner,
window => {
window.FlowDirection = FlowDirection.RightToLeft;
});
```
}

The [builder pattern](builder-pattern.md) exposes the same customization using the [AfterInitializeWindow](xref:@ActiproUIRoot.Controls.UserPromptBuilder.AfterInitializeWindow*) callback as shown in the following example:

@if (avalonia) {
```csharp
await UserPromptBuilder.Configure()
// ... other configuration options here
Expand All @@ -50,7 +74,19 @@ await UserPromptBuilder.Configure()
})
.Show();
```
}
@if (wpf) {
```csharp
UserPromptBuilder.Configure()
// ... other configuration options here
.AfterInitializeWindow(window => {
window.FlowDirection = FlowDirection.RightToLeft;
})
.Show();
```
}

@if (avalonia) {
Finally, an advanced configuration of [MessageBox](message-box.md) also allows access to the [builder pattern](builder-pattern.md) as shown below:

```csharp
Expand All @@ -61,4 +97,38 @@ await MessageBox.Show(
window.FlowDirection = FlowDirection.RightToLeft;
})
);
```
```
}
@if (wpf) {
Finally, an advanced configuration of [ThemedMessageBox](message-box.md) also allows access to the [builder pattern](builder-pattern.md) as shown below:

```csharp
ThemedMessageBox.Show(
"Use the optional 'configure' parameter to access the UserPromptBuilder."
configure: builder => builder
.AfterInitializeWindow(window => {
window.FlowDirection = FlowDirection.RightToLeft;
})
);
```
}

@if (wpf) {
## Theme Assets

See the [Theme Reusable Assets](../../../themes/reusable-assets.md) topic for more details on using and customizing theme assets. The following reusable assets are used by [UserPromptControl](xref:@ActiproUIRoot.Controls.UserPromptControl):

| Asset Resource Key | Description |
|-----|-----|
| [ContainerForegroundLowestNormalBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerForegroundLowestNormalBrushKey) | Assigned to the following properties: `Foreground`. |
| [ContainerBackgroundLowestBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerBackgroundLowestBrushKey) | Assigned to the following properties: `Background`. |
| [ContainerForegroundLowNormalBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerForegroundLowNormalBrushKey) | Assigned to the following properties: [TrayForeground](xref:@ActiproUIRoot.Controls.UserPromptControl.TrayForeground). |
| [ContainerBackgroundLowBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerBackgroundLowBrushKey) | Assigned to the following properties: [TrayBackground](xref:@ActiproUIRoot.Controls.UserPromptControl.TrayBackground). |
| [ContainerBorderLowBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerBorderLowBrushKey) | Assigned to the following properties: `BorderBrush`. |
| [PrimaryAccentForegroundLowestNormalBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.PrimaryAccentForegroundLowestNormalBrushKey) | Assigned to the following properties: [HeaderForeground](xref:@ActiproUIRoot.Controls.UserPromptControl.HeaderForeground). |
| [ExtraLargeFontSizeDoubleKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ExtraLargeFontSizeDoubleKey) | Assigned to the following properties: [HeaderFontSize](xref:@ActiproUIRoot.Controls.UserPromptControl.HeaderFontSize). |
| [ContainerForegroundLowDisabledBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerForegroundLowDisabledBrushKey) | Used for the focus rectangle of the **Expanded Information** toggle. |
| [ButtonForegroundHoverBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ButtonForegroundHoverBrushKey) | Assigned to the following properties of the **Expanded Information** toggle when the mouse is over the control: `Foreground`. |
| [ButtonForegroundPressedBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ButtonForegroundPressedBrushKey) | Assigned to the following properties of the **Expanded Information** toggle when pressed: `Foreground`. |
| [ContainerForegroundLowDisabledBrushKey](xref:@ActiproUIRoot.Themes.AssetResourceKeys.ContainerForegroundLowDisabledBrushKey) | Assigned to the following properties of the **Expanded Information** toggle when disabled: `Foreground`. |
}
Loading

0 comments on commit a21b27a

Please sign in to comment.