diff --git a/src/Calculator/Controls/RadixButton.cs b/src/Calculator/Controls/RadixButton.cs index 42316e4d..be09d160 100644 --- a/src/Calculator/Controls/RadixButton.cs +++ b/src/Calculator/Controls/RadixButton.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using CalculatorApp.ViewModel.Common; +using Windows.UI.Xaml; namespace CalculatorApp { @@ -17,6 +18,15 @@ namespace CalculatorApp string radixContent = Content?.ToString(); return LocalizationSettings.GetInstance().RemoveGroupSeparators(radixContent); } + + public string Label + { + get => (string)GetValue(LabelProperty); + set => SetValue(LabelProperty, value); + } + + public static readonly DependencyProperty LabelProperty = + DependencyProperty.Register(nameof(Label), typeof(string), typeof(RadixButton), new PropertyMetadata(default(string))); } } } diff --git a/src/Calculator/Resources/en-US/Resources.resw b/src/Calculator/Resources/en-US/Resources.resw index 384e8096..342ac7ee 100644 --- a/src/Calculator/Resources/en-US/Resources.resw +++ b/src/Calculator/Resources/en-US/Resources.resw @@ -145,19 +145,19 @@ AppUpdate2 {Locked}This will Update Resources.pri File, Resource is not used in the app - + DEC {Locked}The Decimal button - + BIN {Locked}The Binary button - + HEX {Locked}The Hex button - + OCT {Locked}The Oct button diff --git a/src/Calculator/Views/CalculatorProgrammerOperators.xaml b/src/Calculator/Views/CalculatorProgrammerOperators.xaml index f88d408e..f2c3495d 100644 --- a/src/Calculator/Views/CalculatorProgrammerOperators.xaml +++ b/src/Calculator/Views/CalculatorProgrammerOperators.xaml @@ -17,7 +17,7 @@ - + TargetType="controls:RadixButton"/> + TargetType="controls:RadixButton"> @@ -214,7 +214,7 @@ Content="{x:Bind Model.HexDisplayValue, Mode=OneWay}" ContextFlyout="{StaticResource ProgrammerOperatorsContextMenu}" GroupName="BaseConversion" - Tag="{utils:ResourceString Name=hexButton/Tag}"/> + Label="{utils:ResourceString Name=hexButton/Label}"/> + Label="{utils:ResourceString Name=decimalButton/Label}"/> + Label="{utils:ResourceString Name=octButton/Label}"/> + Label="{utils:ResourceString Name=binaryButton/Label}"/>