Avoid Label.Text to be empty

This commit is contained in:
hishamco 2020-12-08 20:40:54 +03:00
parent 5ce7284a6b
commit 299e28abc4

View File

@ -43,16 +43,12 @@ else
_openLabel += ">"; _openLabel += ">";
if (IsLocalizable) var text = Localize("Text", String.Empty);
if (text != String.Empty)
{ {
var key = $"{ResourceKey}.Text"; ChildContent =@<text>@text</text>;
var value = Localize(key);
if (!value.Equals(key))
{
ChildContent =@<text>@value</text>;
} }
HelpText = Localize(nameof(HelpText), HelpText); HelpText = Localize(nameof(HelpText), HelpText);
} }
}
} }