WPF Rectangle.Fill VisualBrush Visual Binding to another control
<StackPanel Margin="40"> <TextBox x:Name="tbx" Height="100" FontSize="30" TextWrapping="Wrap" Background="LightCyan"/> <Rectangle Height="{Binding ElementName=tbx,Path=ActualHeight}" Width="{Binding ElementName=tbx,Path=ActualWidth}"> <Rectangle.Fill> <VisualBrush Visual="{Binding ElementName=tbx}"/> </Rectangle.Fill> <Rectangle.LayoutTransform> <ScaleTransform ScaleY="-0.75"/> </Rectangle.LayoutTransform> </Rectangle> </StackPanel>


浙公网安备 33010602011771号