mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-06-23 23:00:23 -07:00
only set statustext binding in textblock
This commit is contained in:
parent
074c049dee
commit
88be992176
@ -558,12 +558,6 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
object? padding = GetThicknessFromXElement(xmlElement, "Padding");
|
||||
if (padding != null)
|
||||
textBlock.Padding = (Thickness)padding;
|
||||
|
||||
if (xmlElement.Attribute("Name")?.Value == "StatusText")
|
||||
{
|
||||
Binding textBinding = new Binding("Message") { Mode = BindingMode.OneWay };
|
||||
BindingOperations.SetBinding(textBlock, TextBlock.TextProperty, textBinding);
|
||||
}
|
||||
}
|
||||
|
||||
private static UIElement HandleXmlElement_TextBlock(CustomDialog dialog, XElement xmlElement)
|
||||
@ -573,6 +567,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
textBlock.Text = GetTranslatedText(xmlElement.Attribute("Text")?.Value);
|
||||
|
||||
if (xmlElement.Attribute("Name")?.Value == "StatusText")
|
||||
{
|
||||
Binding textBinding = new Binding("Message") { Mode = BindingMode.OneWay };
|
||||
BindingOperations.SetBinding(textBlock, TextBlock.TextProperty, textBinding);
|
||||
}
|
||||
|
||||
return textBlock;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user