LimitedTextBlock.xaml 1.5 KB

12345678910111213141516171819202122232425262728
  1. <UserControl x:Class="Курсовой_проект_3._1.UserControls.LimitedTextBlock"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Курсовой_проект_3._1.UserControls"
  7. mc:Ignorable="d"
  8. d:DesignHeight="100" d:DesignWidth="250">
  9. <Grid Background="White">
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="Auto" />
  12. <RowDefinition Height="*" />
  13. </Grid.RowDefinitions>
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="*" />
  16. <ColumnDefinition Width="Auto" />
  17. </Grid.ColumnDefinitions>
  18. <Label Content="{Binding Title}" FontSize="{Binding TitleFontSize}"/>
  19. <Label Grid.Column="1">
  20. <StackPanel Orientation="Horizontal">
  21. <TextBlock Text="{Binding ElementName=txtLimitedInput, Path=Text.Length}" />
  22. <TextBlock Text="/"/>
  23. <TextBlock Text="{Binding MaxLength}" />
  24. </StackPanel>
  25. </Label>
  26. <TextBox MaxLength="{Binding MaxLength}" Grid.Row="1" Grid.ColumnSpan="2" Name="txtLimitedInput" ScrollViewer.VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" />
  27. </Grid>
  28. </UserControl>