diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs index 63eb89c..9e1abe1 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs @@ -61,6 +61,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static object? GetPointFromXElement(XElement xmlElement, string attributeName) => GetTypeFromXElement(PointConverter, xmlElement, attributeName); + private static CornerRadiusConverter? _cornerRadiusConverter = null; + public static CornerRadiusConverter CornerRadiusConverter { get => _cornerRadiusConverter ??= new CornerRadiusConverter(); } + + private static object? GetCornerRadiusFromXElement(XElement xmlElement, string attributeName) => GetTypeFromXElement(CornerRadiusConverter, xmlElement, attributeName); + private static BrushConverter? _brushConverter = null; private static BrushConverter BrushConverter { get => _brushConverter ??= new BrushConverter(); } diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 96f3fed..4a5cf3a 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -738,7 +738,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static UIElement HandleXmlElement_ProgressBar(CustomDialog dialog, XElement xmlElement) { - var progressBar = new ProgressBar(); + var progressBar = new Wpf.Ui.Controls.ProgressBar(); HandleXmlElement_Control(dialog, progressBar, xmlElement); progressBar.IsIndeterminate = ParseXmlAttribute(xmlElement, "IsIndeterminate", false); @@ -746,6 +746,14 @@ namespace Bloxstrap.UI.Elements.Bootstrapper progressBar.Value = ParseXmlAttribute(xmlElement, "Value", 0); progressBar.Maximum = ParseXmlAttribute(xmlElement, "Maximum", 100); + object? cornerRadius = GetCornerRadiusFromXElement(xmlElement, "CornerRadius"); + if (cornerRadius != null) + progressBar.CornerRadius = (CornerRadius)cornerRadius; + + object? indicatorCornerRadius = GetCornerRadiusFromXElement(xmlElement, "IndicatorCornerRadius"); + if (indicatorCornerRadius != null) + progressBar.IndicatorCornerRadius = (CornerRadius)indicatorCornerRadius; + if (xmlElement.Attribute("Name")?.Value == "PrimaryProgressBar") { Binding isIndeterminateBinding = new Binding("ProgressIndeterminate") { Mode = BindingMode.OneWay }; diff --git a/wpfui b/wpfui index cdc5d64..05dad87 160000 --- a/wpfui +++ b/wpfui @@ -1 +1 @@ -Subproject commit cdc5d6455ea313a19a048ae1d746b3825465f341 +Subproject commit 05dad87af09d6bbf39f657a444128b1e814993a5