TextboxWithLabel.xaml 1.1 KB

12345678910111213141516171819
  1. <UserControl x:Class="CyberX8_Themes.UserControls.TextboxWithLabel"
  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:CyberX8_Themes.UserControls"
  7. mc:Ignorable="d" d:DesignWidth="80"
  8. x:Name="tblabel">
  9. <StackPanel>
  10. <TextBlock Text="{Binding ElementName=tblabel,Path=LabelValue}" TextWrapping="Wrap" Block.TextAlignment="Center"/>
  11. <TextBox x:Name="tb" Text="{Binding ElementName=tblabel,Path=TextBoxValue,UpdateSourceTrigger=PropertyChanged}"
  12. Foreground="Lime" FontSize="13" FontWeight="Bold" Width="80" Height="25"
  13. IsReadOnly="{Binding ElementName=tblabel,Path=IsReadOnly}" Background="{Binding ElementName=tblabel,Path=TextBoxColor}"
  14. VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
  15. </StackPanel>
  16. </UserControl>