Controls: Add UnitTextBox

This commit is contained in:
lorenz.stechauner committed 2023-11-04 21:59:59 +01:00
1 parent 12226c3d0f
commit 6435a649b4
12 files changed
+118 -57

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<UserControl x:Class="Elwig.Controls.UnitTextBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="25">
<TextBox x:Name="TextBox" TextAlignment="Right" FontSize="14" VerticalAlignment="Stretch"
Padding="{Binding ElementName=UnitBlock, Path=ActualWidth, Converter={StaticResource WidthToPaddingConverter}}"
Text="{Binding Path=Text, Mode=TwoWay}" TextChanged="TextBox_TextChanged"/>
<TextBlock x:Name="UnitBlock" Text="{Binding Path=Unit}" Margin="0,0,4,4" FontSize="10"
HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
</Grid>
</UserControl>