mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add cornerradius to progress bar
This commit is contained in:
parent
4d9c647edb
commit
611f2f1c91
@ -61,6 +61,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
|
|
||||||
private static object? GetPointFromXElement(XElement xmlElement, string attributeName) => GetTypeFromXElement(PointConverter, xmlElement, attributeName);
|
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 = null;
|
||||||
private static BrushConverter BrushConverter { get => _brushConverter ??= new BrushConverter(); }
|
private static BrushConverter BrushConverter { get => _brushConverter ??= new BrushConverter(); }
|
||||||
|
@ -738,7 +738,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
|
|
||||||
private static UIElement HandleXmlElement_ProgressBar(CustomDialog dialog, XElement xmlElement)
|
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);
|
HandleXmlElement_Control(dialog, progressBar, xmlElement);
|
||||||
|
|
||||||
progressBar.IsIndeterminate = ParseXmlAttribute<bool>(xmlElement, "IsIndeterminate", false);
|
progressBar.IsIndeterminate = ParseXmlAttribute<bool>(xmlElement, "IsIndeterminate", false);
|
||||||
@ -746,6 +746,14 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
progressBar.Value = ParseXmlAttribute<double>(xmlElement, "Value", 0);
|
progressBar.Value = ParseXmlAttribute<double>(xmlElement, "Value", 0);
|
||||||
progressBar.Maximum = ParseXmlAttribute<double>(xmlElement, "Maximum", 100);
|
progressBar.Maximum = ParseXmlAttribute<double>(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")
|
if (xmlElement.Attribute("Name")?.Value == "PrimaryProgressBar")
|
||||||
{
|
{
|
||||||
Binding isIndeterminateBinding = new Binding("ProgressIndeterminate") { Mode = BindingMode.OneWay };
|
Binding isIndeterminateBinding = new Binding("ProgressIndeterminate") { Mode = BindingMode.OneWay };
|
||||||
|
2
wpfui
2
wpfui
@ -1 +1 @@
|
|||||||
Subproject commit cdc5d6455ea313a19a048ae1d746b3825465f341
|
Subproject commit 05dad87af09d6bbf39f657a444128b1e814993a5
|
Loading…
Reference in New Issue
Block a user