diff --git a/.github/image-content/fundamentals-welcome.png b/.github/image-content/fundamentals-welcome.png index 2683ab3..206fba6 100644 Binary files a/.github/image-content/fundamentals-welcome.png and b/.github/image-content/fundamentals-welcome.png differ diff --git a/.github/image-content/themes-welcome.png b/.github/image-content/themes-welcome.png index e073cd2..7ce2dc0 100644 Binary files a/.github/image-content/themes-welcome.png and b/.github/image-content/themes-welcome.png differ diff --git a/Documentation/docfx.json b/Documentation/docfx.json index c9fd1b3..314d605 100644 --- a/Documentation/docfx.json +++ b/Documentation/docfx.json @@ -58,7 +58,7 @@ "_docsCopyrightYears": "2021-2024", "_docsProductHref": "https://www.actiprosoftware.com/products/controls/avalonia", "_docsProductName": "Avalonia UI", - "_docsProductVersion": "23.1", + "_docsProductVersion": "24.1", "_disableContribution": true, "_enableNewTab": true, "_gitContribute": { diff --git a/Documentation/topics/conversion/converting-to-v23-1.md b/Documentation/topics/conversion/converting-to-v23-1.md index 76a424f..74a9c42 100644 --- a/Documentation/topics/conversion/converting-to-v23-1.md +++ b/Documentation/topics/conversion/converting-to-v23-1.md @@ -1,7 +1,7 @@ --- title: "Converting to v23.1" page-title: "Converting to v23.1 - Conversion Notes" -order: 10 +order: 100 --- # Converting to v23.1 diff --git a/Documentation/topics/conversion/converting-to-v24-1.md b/Documentation/topics/conversion/converting-to-v24-1.md new file mode 100644 index 0000000..d451587 --- /dev/null +++ b/Documentation/topics/conversion/converting-to-v24-1.md @@ -0,0 +1,37 @@ +--- +title: "Converting to v24.1" +page-title: "Converting to v24.1 - Conversion Notes" +order: 99 +--- +# Converting to v24.1 + +## Avalonia UI Dependency + +Updated the minimum Avalonia UI dependency from v11.0.5 to v11.0.7. + +## RingSlice + +The [Ring Slice](../shared/shapes/ring-slice.md) shape was added in v23.1 and is a very handy primitive for controls that need to render an arc shape. When integrating the shape into some other controls, we found that the design needed to be slightly refactored for ease of use and to better support animation. + +These API changes were made: +- The [StartAngle](xref:@ActiproUIRoot.Controls.Shapes.RingSlice.StartAngle) property is now a `Double` instead of an [Angle](xref:ActiproSoftware.Angle). +- The former `EndAngle` property is now a `Double` instead of an [Angle](xref:ActiproSoftware.Angle) and specified via the [SweepAngle](xref:@ActiproUIRoot.Controls.Shapes.RingSlice.SweepAngle) property instead. The resolved end angle is now calculated by adding the sweep angle to the start angle. + +The end result is that if a ring slice previously specified `StartAngle="90" EndAngle="270"`, the same slice after the updates would be specified `StartAngle="90" SweepAngle="180"`. + +## Some Image-Based Identifiers Renamed + +Some properties and types related to `IImage` were renamed from "Image" to "ImageSource" as part of a new naming convention. Some other image-related types were also impacted. The following breaking changes were made: + +- [UserPromptControl](xref:@ActiproUIRoot.Controls.UserPromptControl).`FooterImage` renamed as `FooterImageSource`. +- [UserPromptControl](xref:@ActiproUIRoot.Controls.UserPromptControl).`StatusImage` renamed as `StatusImageSource`. +- `ActiproSoftware.UI.Avalonia.Controls.Converters.ImageKeyToImageConverter` type renamed as [ImageKeyToImageSourceConverter](xref:@ActiproUIRoot.Controls.Converters.ImageKeyToImageSourceConverter) +- `ActiproSoftware.UI.Avalonia.Media.SharedImageKeys` type renamed as [SharedImageSourceKeys](xref:@ActiproUIRoot.Media.SharedImageSourceKeys). + +## ButtonCard Theme Removed + +Previous builds contained a `ButtonCard` theme (`theme-card` style class name) for native `Button` control instances. With the introduction of the new [Card](../fundamentals/controls/card.md) control, the older `ButtonCard` theme has been removed. Those who used the old theme can use the [Card](../fundamentals/controls/card.md) control instead. + +## Theme Resource Renamed + +For naming consistency, the [ThemeResourceKind](xref:@ActiproUIRoot.Themes.ThemeResourceKind) enum value `NotificationBorderBrushInfo` was renamed to `NotificationBorderBrushInformation`. \ No newline at end of file diff --git a/Documentation/topics/conversion/index.md b/Documentation/topics/conversion/index.md index f15b8a8..210e392 100644 --- a/Documentation/topics/conversion/index.md +++ b/Documentation/topics/conversion/index.md @@ -9,4 +9,5 @@ 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.1](converting-to-v24-1.md) - [Converting to v23.1](converting-to-v23-1.md) diff --git a/Documentation/topics/customizing-string-resources.md b/Documentation/topics/customizing-string-resources.md index ed6b7e3..df74e8a 100644 --- a/Documentation/topics/customizing-string-resources.md +++ b/Documentation/topics/customizing-string-resources.md @@ -81,7 +81,7 @@ xmlns:actiproPropertiesShared="using:ActiproSoftware.Properties.Shared" Now lets use the `UITextBoxButtonShowPasswordText` resource's text as a `Button`'s tooltip content: ```xaml - + Resume Sync + + + + + + + + Is open + + + + Button + Hyperlink + + + + + + Short + Long + + + + + + + + + + + $(ButtonDefinition)$(HyperlinkDefinition) + + + + ]]> + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + Short + Long + + + + + + + + + 6 + + + + + + ]]> + + + + + + + + + + + + + + + + Is open + Cancel close button click + Cancel programmatic close + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + Is open + Handle click event + + + + + + ]]> + + + ( + async (param) => { + if (param is InfoBar infoBar) { + var result = await MessageBox.Show($"Are you sure you want to close the '{infoBar.Title}' info bar?", + button: MessageBoxButtons.YesNo, + image: MessageBoxImage.Question); + + if (result == MessageBoxResult.Yes) { + // Close the info bar + infoBar.IsOpen = false; + } + } + }); + ]]> + + + + + + + + + + + + + The InfoBar is displayed above this area and will animate into position while opening and closing. + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/InfoBarIntro/MainControl.axaml.cs b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/InfoBarIntro/MainControl.axaml.cs new file mode 100644 index 0000000..2913115 --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/InfoBarIntro/MainControl.axaml.cs @@ -0,0 +1,78 @@ +using ActiproSoftware.SampleBrowser; +using ActiproSoftware.UI.Avalonia.Controls; +using ActiproSoftware.UI.Avalonia.Input; +using Avalonia.Controls; +using System.Windows.Input; + +namespace ActiproSoftware.ProductSamples.FundamentalsSamples.Controls.InfoBarIntro { + + public partial class MainControl : UserControl { + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // OBJECT + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + public MainControl() { + InitializeComponent(); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // NON-PUBLIC PROCEDURES + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + private void OnInfoBarCloseButtonClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e) { + // If the click event is handled, the CloseButtonCommand will not be invoked and the defautl behavior + // will be ignored (i.e. the InfoBar will remain open). + e.Handled = (closeCommandHandleClickCheckBox.IsChecked == true); + + if (e.Handled) + ApplicationViewModel.Instance.MessageService?.ShowMessage("Setting 'RoutedEventArgs.Handled = true' from 'CloseButtonClick' event so the 'CloseButtonCommand' is not executed.", "Click Handled", Avalonia.Controls.Notifications.NotificationType.Warning); + } + + private void OnInfoBarClosing(object? sender, InfoBarClosingEventArgs e) { + if ((e.Reason == InfoBarCloseReason.CloseButton) && (cancelCloseButtonCheckBox.IsChecked == true) + || (e.Reason == InfoBarCloseReason.Programmatic) && (cancelProgrammaticCloseCheckBox.IsChecked == true)) { + + ApplicationViewModel.Instance.MessageService?.ShowMessage($"Closing of the info bar for reason '{e.Reason}' canceled within the 'Closing' event.", "InfoBar Close Canceled", Avalonia.Controls.Notifications.NotificationType.Warning); + + // Prevent the info bar from closing + e.Cancel = true; + } + else { + ApplicationViewModel.Instance.MessageService?.ShowMessage($"Info bar allowed to close for reason '{e.Reason}'.", "InfoBar Close Allowed", Avalonia.Controls.Notifications.NotificationType.Success); + } + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // PUBLIC PROCEDURES + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + public ICommand ActionCommand { get; } = new DelegateCommand( + _ => { + ApplicationViewModel.Instance.MessageService?.ShowMessage("Processing of a custom action was requested by an info bar.", "InfoBar Action Requested"); + }); + + public ICommand CloseButtonCommand { get; } = new DelegateCommand( + async (param) => { + if (param is InfoBar infoBar) { + var result = await MessageBox.Show($"Are you sure you want to close the '{infoBar.Title}' info bar?", + "Close Info Bar?", + button: MessageBoxButtons.YesNo, + image: MessageBoxImage.Question); + + if (result == MessageBoxResult.Yes) { + // Close the info bar + infoBar.IsOpen = false; + } + } + }); + + public ICommand NoCloseCommand { get; } = new DelegateCommand( + _ => { + // The info bar will stay open unless the InfoBar.IsOpen property is set to false + ApplicationViewModel.Instance.MessageService?.ShowMessage("This sample shows the InfoBar close button for illustration purposes only and will keep the info bar open.", "InfoBar Demo"); + }); + + } + +} diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/MessageBoxIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/MessageBoxIntro/MainControl.axaml index 9f46561..e969d68 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/MessageBoxIntro/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/MessageBoxIntro/MainControl.axaml @@ -27,6 +27,7 @@ + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/ProgressSpinners/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/ProgressSpinners/MainControl.axaml index a5511ef..c48ede2 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/ProgressSpinners/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/ProgressSpinners/MainControl.axaml @@ -18,6 +18,12 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Daily + Weekly + Monthly + Quarterly + Yearly + + + + + + + + + + + + + + + + + + + Is animation enabled + Is enabled + + + + + + + Daily + Weekly + Monthly + Quarterly + Yearly + + ]]> + + + + + + + + + + + + + + + + + + + + + Elevated + 2 + 3 + + + + Outline + 2 + 3 + + + + Solid + 2 + 3 + + + + Soft + 2 + 3 + + + + Subtle + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + Elevated + 2 + 3 + + + + Outline + 2 + 3 + + + + Solid + 2 + 3 + + + + Soft + 2 + 3 + + + + Subtle + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + Elevated + 2 + 3 + + + + Outline + 2 + 3 + + + + Solid + 2 + 3 + + + + Soft + 2 + 3 + + + + Subtle + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + Elevated + 2 + 3 + + + + Outline + 2 + 3 + + + + Solid + 2 + 3 + + + + Soft + 2 + 3 + + + + Subtle + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + Elevated + 2 + 3 + + + + Outline + 2 + 3 + + + + Solid + 2 + 3 + + + + Soft + 2 + 3 + + + + Subtle + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + Disabled + 2 + 3 + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Daily + Weekly + Monthly + Quarterly + Yearly + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Daily + Weekly + Monthly + Quarterly + Yearly + + + ]]> + + + + + + + + + + + + M0 128h2048v128H0zm256 384h1536v128H256zm0 768h1536v128H256zM0 1792v-128h2048v128zm0-768V896h2048v128z + M2048 128v128H0V128zM0 1664h2048v128H0zm0-768h2048v128H0zm0-384h2048v128H0zm0 768h2048v128H0z + M2048 128v128H0V128zm0 1664H0v-128h2048zm0-768H0V896h2048zm-512-384H0V512h1536zm0 768H0v-128h1536z + M0 128h2048v128H0zm0 1664v-128h2048v128zm0-768V896h2048v128zm512-384V512h1536v128zm0 768v-128h1536v128z + + + + + + + + + + + + + + + ... + ... + ... + ... + + + + + + + + + ]]> + + + + + + + + + + + + + Item 0 + Item 1 + Item 2 + Item 3 + Item 4 + Item 5 + Item 6 + Item 7 + Item 8 + Item 9 + + + + + + + + + + + + + + + Is animation enabled + Is enabled + + + + + + + + + + + + + + + + + + + + + First Item + 2nd + 3rd + 4th + Last Item + + + + + + + + + + + + + + + + + + + + First Item + 2nd + 3rd + 4th + Last Item + + + ]]> + + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml new file mode 100644 index 0000000..16f1d8c --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml @@ -0,0 +1,945 @@ + + + + + + 20 + M384 0h1408v2048H384q-53 0-99-20t-82-55t-55-81t-20-100V256q0-53 20-99t55-82t81-55T384 0m1280 1920v-256H384q-27 0-50 10t-40 27t-28 41t-10 50q0 27 10 50t27 40t41 28t50 10zm0-384V128H384q-27 0-50 10t-40 27t-28 41t-10 50v1314q60-34 128-34zm-768-256V640h128v640zm0-768V384h128v128z + M1024 0q141 0 272 36t245 103t207 160t160 208t103 245t37 272q0 141-36 272t-103 245t-160 207t-208 160t-245 103t-272 37q-53 0-99-20t-81-55t-55-81t-21-100q0-49 9-85t24-67t31-56t31-52t23-56t10-68q0-52-20-99t-55-81t-82-55t-99-21q-38 0-67 9t-56 24t-53 31t-56 31t-67 23t-85 10q-53 0-99-20t-81-55t-55-81t-21-100q0-141 36-272t103-245t160-207t208-160T751 37t273-37m0 1920q123 0 237-32t214-90t182-141t140-181t91-214t32-238q0-123-32-237t-90-214t-141-182t-181-140t-214-91t-238-32q-123 0-237 32t-214 90t-182 141t-140 181t-91 214t-32 238q0 27 10 50t27 40t41 28t50 10q38 0 67-9t56-24t52-31t55-31t67-23t87-10q80 0 150 30t122 82t82 122t30 150q0 49-9 86t-24 67t-31 55t-31 52t-23 56t-10 68q0 27 10 50t27 40t41 28t50 10M512 640q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m384-256q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m512 384q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10m128 256q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m-256 384q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10 + M765 1024H387l-85 256H167L509 256h134l268 802l-81 162zm-43-128L576 458L430 896zm982 679q17 41 31 73t35 54t50 34t78 12v44h-449v-44h37q20 0 39-3t30-17t12-37q0-14-6-39t-16-54t-21-59t-22-58t-19-46t-11-27h-448q-3 8-12 27t-20 46t-24 57t-23 58t-17 54t-7 40q0 24 12 35t31 16t38 5t37 2v44H662v-44q49-9 76-21t44-32t30-52t33-79l392-924h82zm-291-295l-177-381l-169 381z + m448 102l365 365l-90 90l-211-210v549H384V347L173 557l-90-90zm275 1389l90 90l-365 365l-365-365l90-90l211 210v-549h128v549zM2048 384v128H1024V384zM1024 768h1024v128H1024zm0 384h1024v128H1024zm0 384h1024v128H1024z + M704 1536q-40 0-75-15t-61-41t-41-61t-15-75V192q0-40 15-75t41-61t61-41t75-15h512q40 0 75 15t61 41t41 61t15 75v834q-34 11-66 25t-62 34V192q0-26-19-45t-45-19H704q-26 0-45 19t-19 45v1152q0 26 19 45t45 19h322q-2 2-2 20t-1 41t0 42t1 25zm896-384q93 0 174 35t143 96t96 142t35 175q0 93-35 174t-96 143t-142 96t-175 35q-93 0-174-35t-143-96t-96-142t-35-175q0-93 35-174t96-143t142-96t175-35m-320 448q0 66 25 124t68 102t102 69t125 25q47 0 92-13t84-40l-443-443q-26 39-39 84t-14 92m587 176q26-39 39-84t14-92q0-66-25-124t-69-101t-102-69t-124-26q-47 0-92 13t-84 40zm-782 144q45 71 107 128H640v-128h256v-128H662q-84 0-158-32t-129-87t-87-129t-32-158v-362h128v362q0 57 22 108t59 88t89 60t108 22h362v256z + M704 1536q-40 0-75-15t-61-41t-41-61t-15-75V192q0-40 15-75t41-61t61-41t75-15h512q40 0 75 15t61 41t41 61t15 75v1152q0 40-15 75t-41 61t-61 41t-75 15zm-64-192q0 26 19 45t45 19h512q26 0 45-19t19-45V192q0-26-19-45t-45-19H704q-26 0-45 19t-19 45zm1024-320v362q0 84-32 158t-87 129t-129 87t-158 32h-234v128h256v128H640v-128h256v-128H662q-84 0-158-32t-129-87t-87-129t-32-158v-362h128v362q0 57 22 108t59 88t89 60t108 22h596q57 0 108-22t88-59t60-89t22-108v-362z + M1783 988v18q0 9 1 18v18q0 9-1 18l259 161l-159 383l-297-68q-24 26-50 50l68 297l-383 159l-161-259h-18q-9 0-18 1h-18q-9 0-18-1l-161 259l-383-159l68-297q-26-24-50-50l-297 68L6 1221l259-161v-18q0-9-1-18v-18q0-9 1-18L6 827l159-383l297 68q24-26 50-50l-68-297L827 6l161 259h18q9 0 18-1h18q9 0 18 1L1221 6l383 159l-68 297q26 24 50 50l297-68l159 383zm-117 130q2-24 4-47t2-48q0-23-2-47t-4-47l236-147l-86-208l-271 63q-31-38-63-70t-71-64l63-271l-208-86l-148 236q-23-2-47-4t-47-2q-24 0-47 2t-48 4L782 146l-208 86l63 271q-38 31-70 63t-64 71l-271-63l-86 208l236 148q-2 24-4 47t-2 48q0 23 2 47t4 47l-236 147l86 208l271-63q31 38 63 70t71 64l-63 271l208 86l148-236q23 2 47 4t47 2q24 0 47-2t48-4l147 236l208-86l-63-271q38-31 70-63t64-71l271 63l86-208zm-642-470q78 0 146 29t120 81t80 119t30 147q0 78-29 146t-81 120t-119 80t-147 30q-78 0-146-29t-120-81t-80-119t-30-147q0-78 29-146t81-120t119-80t147-30m0 640q55 0 103-20t84-57t56-84t21-103q0-55-20-103t-57-84t-84-56t-103-21q-55 0-103 20t-84 57t-56 84t-21 103q0 55 20 103t57 84t84 56t103 21 + M1408 512h640v1152H0V512h640V256h768zM768 384v128h512V384zm1152 256H128v256h384V768h128v128h768V768h128v128h384zM128 1536h1792v-512h-384v128h-128v-128H640v128H512v-128H128z + M1024 0q141 0 272 36t245 103t207 160t160 208t103 245t37 272q0 141-36 272t-103 245t-160 207t-208 160t-245 103t-272 37q-172 0-330-55t-289-154t-226-238t-141-304l123-34q40 145 123 265t198 208t253 135t289 49q123 0 237-32t214-90t182-141t140-181t91-214t32-238q0-123-32-237t-90-214t-141-182t-181-140t-214-91t-238-32q-129 0-251 36T546 267T355 428T215 640h297v128H0V256h128v274q67-123 163-221t212-166T752 37t272-37 + M1673 119q90 90 160 195t117 220t73 239t25 251q0 128-25 251t-72 239t-118 220t-160 195l-91-91q81-81 144-175t106-198t65-215t22-226t-22-226t-65-214t-106-198t-144-176zm-9 905q0 180-68 343t-194 291l-91-91q109-109 167-249t58-294t-58-294t-167-249l91-91q126 128 194 291t68 343m-534-362q73 73 111 166t39 196q0 103-38 196t-112 166l-90-90q54-54 83-124t29-148q0-77-29-147t-83-125zM677 256h91v1536h-90l-385-384H0V640h293zm-37 219L347 768H128v512h219l293 293z + M1472 896q119 0 224 45t183 124t123 183t46 224q0 119-45 224t-124 183t-183 123t-224 46q-119 0-224-45t-183-124t-123-183t-46-224q0-119 45-224t124-183t183-123t224-46m0 1024q93 0 174-35t142-96t96-142t36-175q0-93-35-174t-96-142t-142-96t-175-36q-93 0-174 35t-142 96t-96 142t-36 175q0 93 35 174t96 142t142 96t175 36M640 768v512h122q-8 32-14 64t-9 64H512V640h293l384-384h91v506q-67 18-128 48V475L858 768zm1069 557l-147 147l147 147l-90 90l-147-146l-147 146l-90-90l146-147l-146-147l90-90l147 147l147-147z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Light + Dark + System default + + + + + + + + + + + + + + + + + + + + + + + Arial + Calibri + Consolas + Tahoma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Is wrapped + + + + + + + + + Item 1 + Item 2 + Item 3 + + + + + + First option + Second option + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + Optional Setting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Optional Setting + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + Item 1 + Item 2 + Item 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + ... + + + +]]> + + + + + + + + + + + + + + + + + + + + + + Light + Dark + System default + + + + + + + + + + + + + + + + + + + + Light + Dark + System default + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml.cs b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml.cs new file mode 100644 index 0000000..dfe5b62 --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/SettingsIntro/MainControl.axaml.cs @@ -0,0 +1,32 @@ +using ActiproSoftware.UI.Avalonia.Controls; +using ActiproSoftware.UI.Avalonia.Input; +using Avalonia.Controls; + +namespace ActiproSoftware.ProductSamples.FundamentalsSamples.Controls.SettingsIntro { + + public partial class MainControl : UserControl { + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // OBJECT + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + public MainControl() { + InitializeComponent(); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////// + // PUBLIC PROCEDURES + ///////////////////////////////////////////////////////////////////////////////////////////////////// + + private void OnSettingClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e) { + // Make sure the source of the Click is a SettingsCard since some Click events can bubble up from content hosted on the card (like a CheckBox) + if ((e.Source is SettingsCard) && (!e.Handled)) + MessageBox.Show("Handle the 'Click' event for a setting as an alternative to using a 'Command'.", "Setting Click", MessageBoxButtons.OK, MessageBoxImage.Information); + } + + public DelegateCommand SettingClickedCommand { get; } + = new DelegateCommand(p => MessageBox.Show($"The setting for '{p}' was clicked.", "Setting Click", MessageBoxButtons.OK, MessageBoxImage.Information)); + + } + +} diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml index 1c0b831..aa006ac 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml @@ -14,7 +14,7 @@ - + @@ -83,6 +83,7 @@ + @@ -346,7 +347,7 @@ var result = await UserPromptBuilder.Configure() Header="Footer usage" Content="Optionally define a footer for additional content with or without an associated image." Footer="Any content can be hosted here" - FooterImage="{Binding #sampleRootControl.BasicFooterSampleImage}" + FooterImageSource="{Binding #sampleRootControl.BasicFooterSampleImage}" Responding="OnUserPromptControlRespondingShowFeedback" /> @@ -358,12 +359,12 @@ var result = await UserPromptBuilder.Configure() ]]> - + @@ -433,7 +434,7 @@ var result = await UserPromptBuilder.Configure() @@ -464,7 +465,7 @@ var result = await UserPromptBuilder.Configure() @@ -541,7 +542,7 @@ IImage? GetImage(string relPath) { > @@ -564,7 +565,7 @@ IImage? GetImage(string relPath) { @@ -599,7 +600,7 @@ var result = await UserPromptBuilder.Configure() new Run(" for more information") } }) - .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageKeys.Question)) + .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageSourceKeys.Question)) .WithButton(MessageBoxResult.OK) .Show(); ]]> @@ -1186,7 +1187,7 @@ var result = await UserPromptBuilder.Configure() StandardButtons="YesNoCancel" Footer="Click 'Show Sample as Dialog' button and then press copy shortcut" FooterClipboardText="The 'Content' property is auto-converted to clipboard text, but the footer is configured to use this custom text instead." - FooterImage="{Binding Source={x:Static actipro:SharedImageKeys.Question}, Converter={StaticResource ImageKeyToImageConverter}}" + FooterImageSource="{Binding Source={x:Static actipro:SharedImageSourceKeys.Question}, Converter={StaticResource ImageKeyToImageSourceConverter}}" ExpandedInformationCollapsedHeaderText="Show more" ExpandedInformationExpandedHeaderText="Show less" ExpandedInformationContent="Clipboard text can be customized for 'Header', 'Content', 'Footer', 'ButtonItems', 'ExpandedInformationContent', and 'CheckBoxContent'." @@ -1405,25 +1406,25 @@ var result = await UserPromptBuilder.Configure() diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml.cs b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml.cs index d183086..fe25b8a 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml.cs +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Controls/UserPromptIntro/MainControl.axaml.cs @@ -185,7 +185,7 @@ await ConfigureUserPrompt() .WithCheckBox("This checked state is reflected on the clipboard", isChecked: true) .WithFooterContent("Click 'Show Sample as Dialog' button and then press copy shortcut") .WithFooterClipboardText($"The '{nameof(UserPromptControl.Footer)}' property is auto-converted to clipboard text, but the footer of this instance is configured to use this custom text instead.") - .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageKeys.Question)) + .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageSourceKeys.Question)) .WithExpandedInformationHeaderText("Show more", "Show less") .WithExpandedInformationContent($"Clipboard text can be customized for '{nameof(UserPromptControl.Header)}', '{nameof(UserPromptControl.Content)}', '{nameof(UserPromptControl.Footer)}', '{nameof(UserPromptControl.ButtonItems)}', '{nameof(UserPromptControl.ExpandedInformationContent)}', and '{nameof(UserPromptControl.CheckBoxContent)}'.") .WithExpandedInformationContentClipboardText($"Use the '{nameof(UserPromptControl.HeaderClipboardText)}', '{nameof(UserPromptControl.ContentClipboardText)}', '{nameof(UserPromptControl.FooterClipboardText)}', '{nameof(UserPromptControl.ButtonItemsClipboardText)}', '{nameof(UserPromptControl.ExpandedInformationContentClipboardText)}', and '{nameof(UserPromptControl.CheckBoxContentClipboardText)}' properties to explicitly set clipboard text.") @@ -324,7 +324,7 @@ await ConfigureUserPrompt() new Run(" for more information") } }) - .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageKeys.Question)) + .WithFooterImage(ImageProvider.Default.GetImageSource(SharedImageSourceKeys.Question)) .WithButton(MessageBoxResult.OK) .Show(); } diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Overview.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Overview.axaml index 2d36b5a..856c05f 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Overview.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/FundamentalsSamples/Overview.axaml @@ -7,6 +7,17 @@ xmlns:sampleBrowser="using:ActiproSoftware.SampleBrowser" xmlns:sampleData="using:ActiproSoftware.SampleBrowser.SampleData" > + + + 20 + M384 0h1408v2048H384q-53 0-99-20t-82-55t-55-81t-20-100V256q0-53 20-99t55-82t81-55T384 0m1280 1920v-256H384q-27 0-50 10t-40 27t-28 41t-10 50q0 27 10 50t27 40t41 28t50 10zm0-384V128H384q-27 0-50 10t-40 27t-28 41t-10 50v1314q60-34 128-34zm-768-256V640h128v640zm0-768V384h128v128z + M1024 0q141 0 272 36t245 103t207 160t160 208t103 245t37 272q0 141-36 272t-103 245t-160 207t-208 160t-245 103t-272 37q-53 0-99-20t-81-55t-55-81t-21-100q0-49 9-85t24-67t31-56t31-52t23-56t10-68q0-52-20-99t-55-81t-82-55t-99-21q-38 0-67 9t-56 24t-53 31t-56 31t-67 23t-85 10q-53 0-99-20t-81-55t-55-81t-21-100q0-141 36-272t103-245t160-207t208-160T751 37t273-37m0 1920q123 0 237-32t214-90t182-141t140-181t91-214t32-238q0-123-32-237t-90-214t-141-182t-181-140t-214-91t-238-32q-123 0-237 32t-214 90t-182 141t-140 181t-91 214t-32 238q0 27 10 50t27 40t41 28t50 10q38 0 67-9t56-24t52-31t55-31t67-23t87-10q80 0 150 30t122 82t82 122t30 150q0 49-9 86t-24 67t-31 55t-31 52t-23 56t-10 68q0 27 10 50t27 40t41 28t50 10M512 640q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m384-256q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m512 384q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10m128 256q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10m-256 384q27 0 50 10t40 27t28 41t10 50q0 27-10 50t-27 40t-41 28t-50 10q-27 0-50-10t-40-27t-28-41t-10-50q0-27 10-50t27-40t41-28t50-10 + M765 1024H387l-85 256H167L509 256h134l268 802l-81 162zm-43-128L576 458L430 896zm982 679q17 41 31 73t35 54t50 34t78 12v44h-449v-44h37q20 0 39-3t30-17t12-37q0-14-6-39t-16-54t-21-59t-22-58t-19-46t-11-27h-448q-3 8-12 27t-20 46t-24 57t-23 58t-17 54t-7 40q0 24 12 35t31 16t38 5t37 2v44H662v-44q49-9 76-21t44-32t30-52t33-79l392-924h82zm-291-295l-177-381l-169 381z + @@ -18,57 +29,188 @@ - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + + Never + Daily + Weekly + Montly + Quarterly + Annually + + + + + + + + + + + + + + + + + + + + + + + + + + Light + Dark + System default + + + + + + + + + + + + + + + + Restart now + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/HyperlinkTextBlockIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/HyperlinkTextBlockIntro/MainControl.axaml index 474fe9f..cc2ca32 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/HyperlinkTextBlockIntro/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/HyperlinkTextBlockIntro/MainControl.axaml @@ -118,5 +118,34 @@ private void OnHyperlinkTextBlockClicked(object? sender, RoutedEventArgs e) { + + + + + + + + + + + + + + + + + + + ]]> + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ScrollableOverflowPresenterIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ScrollableOverflowPresenterIntro/MainControl.axaml new file mode 100644 index 0000000..f179bee --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ScrollableOverflowPresenterIntro/MainControl.axaml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ShadowChromeIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ShadowChromeIntro/MainControl.axaml index 8a7e9dd..cdcc060 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ShadowChromeIntro/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Controls/ShadowChromeIntro/MainControl.axaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui" xmlns:sampleBrowser="using:ActiproSoftware.SampleBrowser" - xmlns:system="clr-namespace:System;assembly=System.Runtime" + xmlns:system="using:System" > diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Overview.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Overview.axaml index d7e2ba1..6c85c46 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Overview.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Overview.axaml @@ -24,17 +24,19 @@ - - - - - - + + + + + + + - - - - + + + + + @@ -53,37 +55,52 @@ - - + + - - + + - - + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/AngleToDecimalConverter.cs b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/AngleToDecimalConverter.cs deleted file mode 100644 index 5a68f40..0000000 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/AngleToDecimalConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using ActiproSoftware.Extensions; -using Avalonia.Data.Converters; -using System; -using System.Globalization; - -namespace ActiproSoftware.ProductSamples.SharedSamples.Shapes.RingSliceIntro { - - /// - /// A value converter that converts a to an . - /// - public class AngleToDecimalConverter : IValueConverter { - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - // PUBLIC PROCEDURES - ///////////////////////////////////////////////////////////////////////////////////////////////////// - - /// - public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) { - if (value is Angle angle) - return (decimal)angle.Degrees; - else - return (decimal)0.0; - } - - /// - public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) { - if (value.TryConvertToDouble(out var doubleValue)) - return Angle.FromDegrees(doubleValue); - else - return Angle.FromDegrees(0.0); - } - - } - -} diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/MainControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/MainControl.axaml index 52d0b47..b619ae6 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/MainControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/SharedSamples/Shapes/RingSliceIntro/MainControl.axaml @@ -8,18 +8,21 @@ > - + Header="The RingSlice shape renders a portion (or the entire circle) of a ring shape. Its start and sweep angles, radius, thickness, and other stroke properties can be set."> + + + + - + - - + + @@ -57,12 +60,12 @@ ]]> - - + + @@ -79,10 +82,10 @@ > - - - - + + + + @@ -90,10 +93,10 @@ - - - - + + + + ]]> @@ -110,7 +113,7 @@ - + @@ -123,7 +126,7 @@ + StrokeThickness="20" Radius="55" SweepAngle="160" /> @@ -155,12 +158,12 @@ HorizontalContentAlignment="Center" > - + + ]]> @@ -172,12 +175,12 @@ HorizontalContentAlignment="Center" > - + + ]]> @@ -189,12 +192,12 @@ HorizontalContentAlignment="Center" > - + + ]]> @@ -206,12 +209,12 @@ HorizontalContentAlignment="Center" > - + + ]]> @@ -223,12 +226,12 @@ HorizontalContentAlignment="Center" > - + + ]]> @@ -242,7 +245,7 @@ - + @@ -251,7 +254,7 @@ - + ]]> diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ListBoxSamples.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ListBoxSamples.axaml index cb731fe..6230d5f 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ListBoxSamples.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ListBoxSamples.axaml @@ -21,6 +21,7 @@ + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ProgressBarSamples.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ProgressBarSamples.axaml index 2eb8a6e..f61b438 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ProgressBarSamples.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ProgressBarSamples.axaml @@ -19,6 +19,10 @@ + + + + + Value="{Binding ProgressTextFormat, StringFormat=' ProgressTextFormat="{{}}{0}"'}" /> diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ToggleSwitchSamples.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ToggleSwitchSamples.axaml index 3a1175e..866c3b4 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ToggleSwitchSamples.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/NativeControls/ToggleSwitchSamples.axaml @@ -55,6 +55,7 @@ + Has far affinity Checked Enabled @@ -62,7 +63,7 @@ $(Content) @@ -74,6 +75,9 @@ + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Overview.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Overview.axaml index 148e48f..637d871 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Overview.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Overview.axaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui" xmlns:sampleBrowser="using:ActiproSoftware.SampleBrowser" - xmlns:system="clr-namespace:System;assembly=System.Runtime" + xmlns:system="using:System" > diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml index f2ba332..3b2536a 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml @@ -52,11 +52,9 @@ - - - - - + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml.cs b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml.cs index 17f0489..2844354 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml.cs +++ b/Samples/SampleBrowser/SampleBrowser.Common/ProductSamples/ThemesSamples/Styling/UserInterfaceDensitySamples.axaml.cs @@ -1,7 +1,7 @@ +using ActiproSoftware.SampleBrowser; using ActiproSoftware.UI.Avalonia.Themes; using ActiproSoftware.UI.Avalonia.Themes.Generation; using Avalonia.Controls; -using System.Linq; namespace ActiproSoftware.ProductSamples.ThemeSamples.Styling { @@ -32,28 +32,17 @@ private void OnThemeDefinitionPropertyChanged(object? sender, System.ComponentMo UpdateUserInterfaceDensityState(sender as ThemeDefinition); } } + private void OnUiDensitySelectionChanged(object? sender, SelectionChangedEventArgs e) { + if (uiDensityBar?.SelectedItem is UserInterfaceDensity density) + ApplicationViewModel.Instance.SetUserInterfaceDensityCommand.Execute(density); + } private void UpdateUserInterfaceDensityState(ThemeDefinition? definition) { if (definition is not null) { - var density = definition.UserInterfaceDensity; - - var compactDensityButtons = new[] { compactDensityButton1 }; - var normalDensityButtons = new[] { normalDensityButton1 }; - var spaciousDensityButtons = new[] { spaciousDensityButton1 }; - - foreach (var button in compactDensityButtons) - button.IsChecked = (density == UserInterfaceDensity.Compact); - foreach (var button in normalDensityButtons) - button.IsChecked = (density == UserInterfaceDensity.Normal); - foreach (var button in spaciousDensityButtons) - button.IsChecked = (density == UserInterfaceDensity.Spacious); - - foreach (var button in compactDensityButtons.Concat(normalDensityButtons).Concat(spaciousDensityButtons)) - button.Classes.Set("accent", button.IsChecked == true); + uiDensityBar.SelectedItem = definition.UserInterfaceDensity; } } - } } diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/ControlExample.cs b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/ControlExample.cs index 3f90f87..565211b 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/ControlExample.cs +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/ControlExample.cs @@ -14,6 +14,7 @@ namespace ActiproSoftware.SampleBrowser { /// Displays a sample with a header and optional footer and code sections. /// [TemplatePart(CodeExamplePanelPartName, typeof(Panel))] + [PseudoClasses(pcOptions)] [PseudoClasses(pcWide)] public class ControlExample : HeaderedContentControl { @@ -72,6 +73,7 @@ public static readonly StyledProperty OptionsTemplateProperty private const string CodeExamplePanelPartName = "PART_CodeExamplePanel"; // Pseudo classes + private const string pcOptions = ":options"; private const string pcWide = ":wide"; ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -80,6 +82,7 @@ public static readonly StyledProperty OptionsTemplateProperty static ControlExample() { IsCodeExpandedProperty.Changed.AddClassHandler((x, e) => x.OnIsCodeExpandedPropertyValueChanged(e)); + OptionsProperty.Changed.AddClassHandler((x, _) => x.UpdatePseudoClasses()); } public ControlExample() { @@ -128,8 +131,10 @@ private void OnIsCodeExpandedPropertyValueChanged(AvaloniaPropertyChangedEventAr private void UpdateHasCode() => HasCode = (this.CodeExamples.Any(x => x is not null)); - private void UpdatePseudoClasses() - => PseudoClasses.Set(pcWide, _isWideMeasure); + private void UpdatePseudoClasses() { + PseudoClasses.Set(pcOptions, Options is not null); + PseudoClasses.Set(pcWide, _isWideMeasure); + } ///////////////////////////////////////////////////////////////////////////////////////////////////// // PUBLIC PROCEDURES diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/CopyColorButton.cs b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/CopyColorButton.cs new file mode 100644 index 0000000..92ea9b7 --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/CopyColorButton.cs @@ -0,0 +1,11 @@ +using ActiproSoftware.UI.Avalonia.Controls; +using ActiproSoftware.UI.Avalonia.Media; + +namespace ActiproSoftware.SampleBrowser { + + /// + /// Copies a color value specified as content. + /// + public class CopyColorButton : CopyButton { } + +} diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/All.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/All.axaml index c7c4321..b19eb09 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/All.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/All.axaml @@ -7,7 +7,9 @@ + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/BlurbBadgeTemplate.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/BlurbBadgeTemplate.axaml new file mode 100644 index 0000000..6ce81c8 --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/BlurbBadgeTemplate.axaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ControlExample.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ControlExample.axaml index 26f4545..b94a5ad 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ControlExample.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ControlExample.axaml @@ -139,10 +139,10 @@ - - + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/FeaturedSampleItemsControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/FeaturedSampleItemsControl.axaml index 005fc1b..e40de8f 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/FeaturedSampleItemsControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/FeaturedSampleItemsControl.axaml @@ -20,36 +20,25 @@ - + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ProductFamilyItemsControl.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ProductFamilyItemsControl.axaml index 59ee31a..21a061c 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ProductFamilyItemsControl.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Controls/Themes/ProductFamilyItemsControl.axaml @@ -17,66 +17,59 @@ + + + + + - + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Documents/ReleaseHistories/v24.1.md b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Documents/ReleaseHistories/v24.1.md new file mode 100644 index 0000000..c4dc051 --- /dev/null +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Documents/ReleaseHistories/v24.1.md @@ -0,0 +1,33 @@ +# 5/6/2024 - v24.1.0 + +## Fundamentals +- Added the Card control, which displayed grouped information for a single subject. +- Added the CircularProgressBar control, which renders a progress percentage in a ring shape using fluent animations, and also supports an indeterminate state. +- Added the InfoBar control, which displays essential information to a user without disrupting the user flow. +- Added the SegmentedBar control, which can be used to select a single item with fluent animations. +- Added the SettingsCard, SettingsExpander, and SettingsGroup controls, which can be used to organize and present configurable settings. +- Added UserPromptBuilder.Tag property and WithTag method for storing arbitrary data. +- Updated Avatar control styles to prevent button-related style class names (e.g., 'theme-solid', 'theme-link') from changing the Avatar theme. +- Updated BadgeAdorner to automatically bind Badge.DataContext to the adorned element's DataContext when Badge.DataContext is null. +- Updated BadgeAdorner to enable clipping when the Badge is within the bounds of the adorned element and disable clipping when outside the bounds. +- Renamed UserPromptControl's FooterImage and StatusImage properties as FooterImageSource and StatusImageSource. +- Fixed a possible exception when assinging the owner of a UserPromptWindow if the explicit owner was undefined and the coerced owner was invalid. +## Themes +- Added the ThemeProperties.ToggleSwitchHasFarAffinityProperty attached property with updated ToggleSwitch theme to allow the knob/track of a ToggleSwitch to be arranged on the right side of the control instead of the left. +- Updated native control themes with changes in Avalonia through v11.0.10. +- Adjusted the default font size ratios for smaller sizes. +## Shared Library +- Added the ScrollableOverflowPresenter control that displays scroll buttons when its content overflows the available space. +- Added ShadowChrome.IsAnimationEnabled property which can be used to enable or disable animated property transitions. +- Added the ImageControlConverter value converter that can create an Image control for an IImage source. +- Updated DegreeAngleAnimator to be registered as a custom animator in ModernTheme's static constructor. +- Updated DynamicImage.DisabledOpacity so that it is relative to the control's opacity. +- Updated HyperlinkTextBlock to support 'size-*' style classes. +- Updated MeshGradientPresenter to work with Avalonia v11.1 API changes. +- Updated ImageProvider's cloning of RadialGradientBrush instances to work with Avalonia v11.1 API changes. +- Renamed ActiproSoftware.UI.Avalonia.Controls.Converters.ImageKeyToImageConverter as ImageKeyToImageSourceConverter. +- Renamed ActiproSoftware.UI.Avalonia.Media.SharedImageKeys as SharedImageSourceKeys. +## All +- Updated the minimum Avalonia UI dependency from v11.0.5 to v11.0.7. + +--- diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Models/ProductData.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Models/ProductData.axaml index cf555e2..27fab5d 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Models/ProductData.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Models/ProductData.axaml @@ -20,7 +20,8 @@ - + + @@ -46,9 +47,8 @@ - + - @@ -112,8 +112,7 @@ - - + @@ -132,10 +131,12 @@ + + @@ -154,17 +155,19 @@ - - - + + + + - + + User prompt for displaying messages and task dialogs - Responsive multi-column panel - Avatar, badge, and spinner controls + Settings controls for organizing and presenting configurable settings + Avatar, badge, card, info bar, segmented bar, progress, and spinner controls More coming soon @@ -174,8 +177,13 @@ + + + + + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/ColorPalette/ColorPaletteView.axaml b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/ColorPalette/ColorPaletteView.axaml index 58f1a5d..9b3af6a 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/ColorPalette/ColorPaletteView.axaml +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/ColorPalette/ColorPaletteView.axaml @@ -48,7 +48,7 @@ - + @@ -58,6 +58,7 @@ + diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/StringResourceBrowser/StringResourceBrowserViewModel.cs b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/StringResourceBrowser/StringResourceBrowserViewModel.cs index e2815be..f2997ef 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/StringResourceBrowser/StringResourceBrowserViewModel.cs +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/Utilities/StringResourceBrowser/StringResourceBrowserViewModel.cs @@ -33,8 +33,7 @@ public StringResourceBrowserViewModel() { public IEnumerable All { get { return new AssemblyStringResourcesModel[] { - // Empty right now so temporarily excluding - // new AssemblyStringResourcesModel(typeof(AP.Fundamentals.SR), typeof(AP.Fundamentals.SRName)), + new AssemblyStringResourcesModel(typeof(AP.Fundamentals.SR), typeof(AP.Fundamentals.SRName)), new AssemblyStringResourcesModel(typeof(AP.Shared.SR), typeof(AP.Shared.SRName)), }; } diff --git a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/ViewModels/ApplicationViewModel.cs b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/ViewModels/ApplicationViewModel.cs index e1b76df..2905f58 100644 --- a/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/ViewModels/ApplicationViewModel.cs +++ b/Samples/SampleBrowser/SampleBrowser.Common/SampleBrowser/ViewModels/ApplicationViewModel.cs @@ -45,7 +45,7 @@ public partial class ApplicationViewModel : ObservableObjectBase { private const string DefaultSampleUri = null; //private const string DefaultSampleUri = "https://ActiproSoftware/SampleBrowser/Utilities/ColorPalette/ColorPaletteView"; - //private const string DefaultSampleUri = "https://ActiproSoftware/ProductSamples/SharedSamples/Shapes/RingSliceIntro/MainControl"; + //private const string DefaultSampleUri = "https://ActiproSoftware/ProductSamples/FundamentalsSamples/Controls/CircularProgressBarIntro/MainControl"; ///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT