Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# wpf progressbar.RenderTransform在设计器中的窗口外_C#_Wpf - Fatal编程技术网

C# wpf progressbar.RenderTransform在设计器中的窗口外

C# wpf progressbar.RenderTransform在设计器中的窗口外,c#,wpf,C#,Wpf,当我将180度变换应用于进度条时,它会跳出窗口。以下是它在设计器中的外观。 我怎样才能让它在窗户里移动呢 这是我的密码: <Window x:Class="game.Player2Screen" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Ti

当我将180度变换应用于进度条时,它会跳出窗口。以下是它在设计器中的外观。

我怎样才能让它在窗户里移动呢

这是我的密码:

<Window x:Class="game.Player2Screen"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Player2Screen" Height="298" Width="310">

        <ProgressBar Name="ProgressBarTimer" Orientation="Vertical" Foreground="Blue" Background="Black" MouseLeftButtonDown="ProgressBarTimer_MouseLeftButtonDown"
Value="0" HorizontalAlignment="Center" Maximum="100" VerticalAlignment="Top" Height="250" Width="265" >
            <ProgressBar.RenderTransform>
                <RotateTransform Angle="180"/>
            </ProgressBar.RenderTransform>
        </ProgressBar>    
</Window>

您需要指定渲染变换原点


请参见

也许您希望使用
布局转换
而不是
渲染转换

WPF处理图形组件的方式是:

  • 布局转换
  • 安排
  • 渲染转换
  • 渲染
  • 听起来您希望在测量和排列组件之前进行转换,而不是之后