Created
February 17, 2022 15:03
-
-
Save bbenetskyy/3bdcb3f84fafa656c3bfffba085f633b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override double Convert(double value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if (value > 0) | |
{ | |
var result = value * (double)parameter; | |
return result; | |
} | |
return value; | |
} | |
<x:Double x:Key="HalfScreenButtonFontConverterValue">0.1</x:Double> | |
<Grid Grid.Row="2" | |
ColumnDefinitions="*, *" | |
ColumnSpacing="10" | |
Padding="15" | |
BackgroundColor="{StaticResource MainBackground}"> | |
<Button x:Name="LeftButton" | |
FontSize="{ | |
Binding Source={x:Reference LeftButton}, | |
Path=Width, | |
Converter={StaticResource DimensChangeConverter}, | |
ConverterParameter={StaticResource HalfScreenButtonFontConverterValue}}" /> | |
<Button Grid.Column="1" | |
FontSize="{ | |
Binding Source={x:Reference LeftButton}, | |
Path=Width, | |
Converter={StaticResource DimensChangeConverter}, | |
ConverterParameter={StaticResource HalfScreenButtonFontConverterValue}}" /> | |
</Grid> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment