Skip to content

Commit

Permalink
Merge branch 'release/v24.2.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
billhenn committed Jul 23, 2024
2 parents e907173 + a8e5766 commit 536d06b
Show file tree
Hide file tree
Showing 31 changed files with 431 additions and 280 deletions.
2 changes: 1 addition & 1 deletion Documentation/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"_docsCopyrightYears": "2021-2024",
"_docsProductHref": "https://www.actiprosoftware.com/products/controls/avalonia",
"_docsProductName": "Avalonia UI",
"_docsProductVersion": "24.1",
"_docsProductVersion": "24.2",
"_disableContribution": true,
"_enableNewTab": true,
"_gitContribute": {
Expand Down
20 changes: 20 additions & 0 deletions Documentation/topics/conversion/converting-to-v24-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "Converting to v24.2"
page-title: "Converting to v24.2 - Conversion Notes"
order: 98
---
# Converting to v24.2

## Avalonia UI Dependency

Updated the minimum Avalonia UI dependency from v11.0.7 to v11.1.0.

## MenuItem Toggle Support

Avalonia v11.1.0 adds built-in toggle support for menu items using either a checkbox or radio button. Previously, a `CheckBox` or `RadioButton` control had to be assigned as content for the `MenuItem.Icon` property to reflect the toggle state.

Actipro Themes provided the [CheckBoxMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxMenuIndicator) and [RadioButtonMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonMenuIndicator) themes specifically for the purpose of using `CheckBox` or `RadioButton` as icons. Actipro's native themes have been updated to support the new `MenuItem` toggle capabilities, and developers should migrate their code to use the new features as well. The [CheckBoxMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxMenuIndicator) and [RadioButtonMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonMenuIndicator) themes are no longer necessary and will be removed in a future release.

## Removed Control Themes

Avalonia v11.1.0 defines a default control theme for `ContentControl` (including derived `UserControl`) and `NativeMenuBar`, so Actipro Themes no longer needs to provide a default control theme. These control themes and their corresponding entires in [ControlThemeKind](xref:@ActiproUIRoot.Themes.ControlThemeKind) have been removed.
1 change: 1 addition & 0 deletions Documentation/topics/conversion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Occasionally during large updates to a product, some breaking changes are necess

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

- [Converting to v24.2](converting-to-v24-2.md)
- [Converting to v24.1](converting-to-v24-1.md)
- [Converting to v23.1](converting-to-v23-1.md)
56 changes: 55 additions & 1 deletion Documentation/topics/fundamentals/controls/settings-expander.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
...
<views:SettingsExpanderHeader="Setting name" ... >
<views:SettingsExpander Header="Setting name" ... >

<views:SettingsExpander.ItemContainerStyle>
<Style TargetType="views:SettingsCard" BasedOn="{StaticResource {x:Static themes:ViewsResourceKeys.SettingsCardSettingsExpanderItemStyleKey}}">
Expand All @@ -271,6 +271,60 @@ xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
```
}

### Working with MVVM

All children of [SettingsExpander](xref:@ActiproUIRoot.Controls.SettingsExpander) must be instances of [SettingsCard](settings-card.md). When binding `ItemsSource` to a collection of view models, each view model will automatically be wrapped in a [SettingsCard](settings-card.md) container with the `DataContext` set to the view model.

@if (avalonia) {
Properties on the view model can be bound to properties on the [SettingsCard](settings-card.md) by assigning an `ItemContainerTheme` like shown in the following example:

```xaml
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
...
<actipro:SettingsExpander Header="Setting name" ... >

<actipro:SettingsExpander.ItemContainerTheme>
<ControlTheme
TargetType="actipro:SettingsCard"
BasedOn="{actipro:ControlTheme SettingsCardSettingsExpanderItem}"
x:DataType="custom:MyViewModelType">

<!-- Bind to view model properties -->
<Setter Property="Header" Value="{Binding Header}" />
<Setter Property="Description" Value="{Binding Description}" />

</ControlTheme>
</actipro:SettingsExpander.ItemContainerTheme>

</actipro:SettingsExpander>
```
}
@if (wpf) {
Properties on the view model can be bound to properties on the [SettingsCard](settings-card.md) by assigning an `ItemContainerStyle` like shown in the following example:

```xaml
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
...
<views:SettingsExpander Header="Setting name" ... >

<views:SettingsExpander.ItemContainerStyle>
<Style TargetType="views:SettingsCard" BasedOn="{StaticResource {x:Static themes:ViewsResourceKeys.SettingsCardSettingsExpanderItemStyleKey}}">

<!-- Bind to view model properties -->
<Setter Property="Header" Value="{Binding Header}" />
<Setter Property="Description" Value="{Binding Description}" />

</Style>
</views:SettingsExpander.ItemContainerStyle>

<!-- Define child settings here -->

</views:SettingsExpander>
```
}

## Items Header and Footer

![Screenshot](../images/settings-expander-header-footer.png)
Expand Down
46 changes: 45 additions & 1 deletion Documentation/topics/supported-technologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,55 @@ The products have assemblies available for multiple runtime frameworks, includin

- .NET 6 or later

The assemblies have the following dependencies on UI frameworks:
### Avalonia UI Support Matrix

The assemblies have dependencies on the Avalonia UI framework as follows:

<table>
<thead>

<tr>
<th>Actipro Controls Versions</th>
<th>Avalonia UI Support</th>
</tr>

</thead>
<tbody>

<tr>
<td>Actipro Controls v24.2</td>
<td>

- Avalonia UI v11.1.0 or later
- Native themes compatible up to Avalonia UI v11.1.0
- *Minor updates to Avalonia UI are expected to be supported and will be verified as they are released*

</td>
</tr>

<tr>
<td>Actipro Controls v24.1</td>
<td>

- Avalonia UI v11.0.7 or later
- Native themes compatible up to Avalonia UI v11.0.11

</td>
</tr>

<tr>
<td>Actipro Controls v23.1</td>
<td>

- Avalonia UI v11.0.5 or later
- Native themes compatible up to Avalonia UI v11.0.7

</td>
</tr>

</tbody>
</table>

> [!NOTE]
> While they do not change frequently, native themes must be kept in sync with Avalonia control updates and may not work with untested releases. If you encounter any issues with native themes, please contact [Support](support.md).
Expand Down
23 changes: 13 additions & 10 deletions Documentation/topics/themes/native-control-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This example shows how to render a solid accented button:

### Button Controls

All button control themes support the `accent`, `success`, `warning`, and `danger` style class names for semantic color variants.
Most button control themes support the `accent`, `success`, `warning`, and `danger` style class names for semantic color variants.

![Screenshot](images/semantic-colors-button.png)

Expand All @@ -87,7 +87,7 @@ All button control themes support the `accent`, `success`, `warning`, and `dange

- [ButtonBase](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonBase) - Base control theme used by several others.
- [ButtonInvisible](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonInvisible) (`theme-invisible`) - Completely transparent but can be clicked.
- [ButtonLink](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonLink) (`theme-link`) - Has a link-like appearance.
- [ButtonLink](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonLink) (`theme-link`) - Has a link-like appearance (unrelated to `HyperlinkButton` control).
- [ButtonOutline](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonOutline) (`theme-outline`) - Has an outline appearance.
- [ButtonSoft](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonSoft) (`theme-soft`) - Has a soft fill appearance.
- [ButtonSolid](xref:@ActiproUIRoot.Themes.ControlThemeKind.ButtonSolid) (`theme-solid`) - Has a solid appearance.
Expand All @@ -107,6 +107,12 @@ All button control themes support the `accent`, `success`, `warning`, and `dange
- [DropDownButtonSolid](xref:@ActiproUIRoot.Themes.ControlThemeKind.DropDownButtonSolid) (`theme-solid`) - Has a solid appearance.
- [DropDownButtonSubtle](xref:@ActiproUIRoot.Themes.ControlThemeKind.DropDownButtonSubtle) (`theme-subtle`) - Has a subtle fill appearance, only on pointer over.

#### HyperlinkButton Type

`HyperlinkButton` is a special button with a link-like appearance that can show alternate colors if a link has already been visited and open a URI when clicked. Due to the specific nature of this control and the base need for two distinct colors (visited and un-visited), this button type **does not** support the control themes discussed in the "Button Type" section or semantic color variants.

If theme and semantic color variant capabilities are desired, an alternative to `HyperlinkButton` is to use a standard `Button` with the `theme-link` theme. This will achieve a similar appearance as `HyperlinkButton`, although without URI navigation or distinct color options for visited links.

#### RepeatButton Type

`RepeatButton` uses the same control themes as `Button`. See the "Button Type" section for details.
Expand Down Expand Up @@ -347,16 +353,14 @@ The following additional control theme is used by the default control theme:
#### MenuFlyoutPresenter Type

- [MenuFlyoutPresenter](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuFlyoutPresenter) - Default control theme.
- [MenuFlyoutPresenterHorizontal](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuFlyoutPresenterHorizontal) - Control theme used for horizontal flyout menus.

#### MenuItem Type

- [MenuItem](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuItem) - Default control theme.
- [MenuItemHeading](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuItemHeading) (`theme-menuitem-heading`) - Bold heading that is a disabled menu item.
- [MenuItemTopLevel](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuItemTopLevel) - A menu item directly within a menu bar.

#### NativeMenuBar Type

- [NativeMenuBar](xref:@ActiproUIRoot.Themes.ControlThemeKind.NativeMenuBar) - Default control theme.
- [MenuItemHorizontal](xref:@ActiproUIRoot.Themes.ControlThemeKind.MenuItemHorizontal) - A menu item used within a horizontal flyout menu.

#### Separator Type

Expand Down Expand Up @@ -423,7 +427,7 @@ The `CheckBox`, `RadioButton`, and `ToggleSwitch` control type themes automatica
- [CheckBoxBase](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxBase) - Base control theme used by several others.
- [CheckBoxOutline](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxOutline) (`theme-outline`) - Has an outline appearance.
- [CheckBoxSolid](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxSolid) (`theme-solid`) - Has a solid appearance.
- [CheckBoxMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxMenuIndicator) - Used within `MenuItem.Icon` to indicate checked state.
- [CheckBoxMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.CheckBoxMenuIndicator) - (Deprecated) Used within `MenuItem.Icon` to indicate checked state. This theme is no longer necessary since `MenuItem` added built-in support for toggle indicators.

#### RadioButton Type

Expand All @@ -434,7 +438,7 @@ The `CheckBox`, `RadioButton`, and `ToggleSwitch` control type themes automatica
- [RadioButtonBase](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonBase) - Base control theme used by several others.
- [RadioButtonOutline](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonOutline) (`theme-outline`) - Has an outline appearance.
- [RadioButtonSolid](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonSolid) (`theme-solid`) - Has a solid appearance.
- [RadioButtonMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonMenuIndicator) - Used within `MenuItem.Icon` to indicate checked state.
- [RadioButtonMenuIndicator](xref:@ActiproUIRoot.Themes.ControlThemeKind.RadioButtonMenuIndicator) - (Deprecated) Used within `MenuItem.Icon` to indicate checked state. This theme is no longer necessary since `MenuItem` added built-in support for toggle indicators.

#### Slider Type

Expand Down Expand Up @@ -593,10 +597,10 @@ The following default control themes are defined for their respective control ty

- [AdornerLayer](xref:@ActiproUIRoot.Themes.ControlThemeKind.AdornerLayer)
- [Carousel](xref:@ActiproUIRoot.Themes.ControlThemeKind.Carousel)
- [ContentControl](xref:@ActiproUIRoot.Themes.ControlThemeKind.ContentControl)
- [EmbeddableControlRoot](xref:@ActiproUIRoot.Themes.ControlThemeKind.EmbeddableControlRoot)
- [EmbeddableCoFlyoutPresenterntrolRoot](xref:@ActiproUIRoot.Themes.ControlThemeKind.FlyoutPresenter)
- [GridSplitter](xref:@ActiproUIRoot.Themes.ControlThemeKind.GridSplitter)
- [HeaderedContentControl](xref:@ActiproUIRoot.Themes.ControlThemeKind.HeaderedContentControl)
- [ManagedFileChooser](xref:@ActiproUIRoot.Themes.ControlThemeKind.ManagedFileChooser)
- [OverlayPopupHost](xref:@ActiproUIRoot.Themes.ControlThemeKind.OverlayPopupHost)
- [PathIcon](xref:@ActiproUIRoot.Themes.ControlThemeKind.PathIcon)
Expand All @@ -608,7 +612,6 @@ The following default control themes are defined for their respective control ty
- [TitleBar](xref:@ActiproUIRoot.Themes.ControlThemeKind.TitleBar)
- [ToolTip](xref:@ActiproUIRoot.Themes.ControlThemeKind.ToolTip)
- [TransitioningContentControl](xref:@ActiproUIRoot.Themes.ControlThemeKind.TransitioningContentControl)
- [UserControl](xref:@ActiproUIRoot.Themes.ControlThemeKind.UserControl)
- [Window](xref:@ActiproUIRoot.Themes.ControlThemeKind.Window)
- [WindowNotificationManager](xref:@ActiproUIRoot.Themes.ControlThemeKind.WindowNotificationManager)

Expand Down
2 changes: 2 additions & 0 deletions Documentation/topics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ items:
items:
- name: "Overview"
href: conversion/index.md
- name: "Converting to v24.2"
href: conversion/converting-to-v24-2.md
- name: "Converting to v24.1"
href: conversion/converting-to-v24-1.md
- name: "Converting to v23.1"
Expand Down
4 changes: 2 additions & 2 deletions Samples/SampleBrowser/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<Nullable>enable</Nullable>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

<Version>24.1.1.0</Version>
<InformationalVersion>24.1.1.0 - 20240722</InformationalVersion>
<Version>24.2.0.0</Version>
<InformationalVersion>24.2.0.0 - 20240723</InformationalVersion>

<Product>Actipro Avalonia UI Controls Sample Browser</Product>
<Title>$(Product)</Title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>

<PropertyGroup>
<ActiproVersion>24.1.1</ActiproVersion>
<ActiproVersion>24.2.0</ActiproVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/SampleBrowser/References/Avalonia.References.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>

<PropertyGroup>
<AvaloniaVersion>11.0.7</AvaloniaVersion>
<AvaloniaVersion>11.1.0</AvaloniaVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
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 @@ -13,6 +13,9 @@
<sampleBrowser:ControlExampleLinkItem Title="HyperlinkTextBlock" Url="https://www.actiprosoftware.com/docs/controls/avalonia/shared/controls/hyperlink-textblock" />
</sampleBrowser:ControlExampleItemsControl.Documentation>

<sampleBrowser:ControlExampleItemsControl.RelatedSamples>
<sampleBrowser:ControlExampleLinkItem Title="HyperlinkButton" Url="/ProductSamples/ThemesSamples/NativeControls/HyperlinkButtonSamples" />
</sampleBrowser:ControlExampleItemsControl.RelatedSamples>

<sampleBrowser:ControlExample
Header="Basic usage"
Expand Down
Loading

0 comments on commit 536d06b

Please sign in to comment.