textBox Width property not changing with Storyboard DoubleAnimation
Archived 2 years ago
P
pyx
XAML:
```xml
<Window x:Class="WPFTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFTest"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid Background="#FF232323">
<TextBox x:Name="textBox" TextWrapping="Wrap" Text="TextBox" AcceptsReturn="True" AcceptsTab="True" FontFamily="Consolas" FontSize="14" Background="#FF1E1E1E" Foreground="White" BorderThickness="0.5,0.5,0.5,0.5" Margin="0,0,200,45" CaretBrush="White"/>
<TextBox x:Name="previewBox" HorizontalAlignment="Right" TextWrapping="Wrap" Text="preview" AcceptsReturn="True" AcceptsTab="True" FontFamily="Consolas" FontSize="14" Background="#FF1E1E1E" Foreground="White" BorderThickness="0.5,0.5,0.5,0.5" Margin="0,0,0,45" IsReadOnly="True" IsReadOnlyCaretVisible="True" Width="200"/>
<Button x:Name="hidePreviewBtn" Content="Hide Preview" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="180" Background="#FF1E1E1E" Foreground="White" BorderThickness="0.5,0.5,0.5,0.5" Height="25" HorizontalAlignment="Right" Click="hidePreviewBtn_Click"/>
</Grid>
</Window>
```
