Coding Global Background
Coding Global

textBox Width property not changing with Storyboard DoubleAnimation

Archiviert 2 years ago
3 Nachrichten
0 Mitglieder
Erstellt 3 years ago
Aktualisiert 3 years ago
In Discord öffnen
P
pyx
XAML:
<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>

Antworten (3)