Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.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旋转文本块看起来不清楚_C#_Wpf_Xaml_Visual Studio 2013 - Fatal编程技术网

C# WPF旋转文本块看起来不清楚

C# WPF旋转文本块看起来不清楚,c#,wpf,xaml,visual-studio-2013,C#,Wpf,Xaml,Visual Studio 2013,我有一个扩展器,头上有一个文本块。它旋转了90度。问题在于文本看起来不清楚: 正如你所看到的,“调试”并没有那么尖锐! 有办法解决吗 我的XAML代码是 <Window x:Class="Minecraft_Autocarafter.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx

我有一个扩展器,头上有一个文本块。它旋转了90度。问题在于文本看起来不清楚:

正如你所看到的,“调试”并没有那么尖锐! 有办法解决吗

我的XAML代码是

<Window x:Class="Minecraft_Autocarafter.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525">
<Grid Margin="10,10,10,10">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="220*"/>
        <ColumnDefinition Width="277*"/>
    </Grid.ColumnDefinitions>

    <Button Name="RunButton"  Content="Run Bot" Click="RunButton_Click" HorizontalAlignment="Left" Width="80" Height="23" VerticalAlignment="Top"/>
    <Button x:Name="StopButton"  Content="Stop Bot" Click="StopButton_Click" HorizontalAlignment="Left" Width="80" Height="23" VerticalAlignment="Top" Margin="0,28,0,0" IsEnabled="False"/>
    <ListBox x:Name="AblaufBox" Margin="100,0,0,0" HorizontalAlignment="Left" Width="100">
        <ListBoxItem Content="Started"/>
        <ListBoxItem Content="Checking Items"/>
        <!--<ListBoxItem Name="Start" Content="Started"/>
        <ListBoxItem Name="Start" Content="Started"/>-->
    </ListBox>



    <Expander Grid.Column="1" Margin="10,0,17,0" ExpandDirection="Right">
        <Expander.Header>
            <TextBlock Text="Debug">
                <TextBlock.RenderTransform>
                    <TransformGroup>
                        <RotateTransform Angle="90"/>
                        <TranslateTransform X="25"/>
                    </TransformGroup>
                </TextBlock.RenderTransform>
            </TextBlock>
        </Expander.Header>
        <Grid Grid.Column="1" Visibility="Visible">
            <ListBox Name="DebugListBox">
                <ListBoxItem Content="Test"/>
            </ListBox>
        </Grid>
    </Expander>
</Grid>

哦,我在一小时前就开始了WPF,所以请不要炒我鱿鱼:试试这个

 <Expander Grid.Column="1" Margin="10,0,17,0" ExpandDirection="Right">
        <Expander.Header>
            <TextBlock Text="Debug" TextOptions.TextFormattingMode="Display">
            </TextBlock>
        </Expander.Header>
 </Expander>

请参考此

尝试此

 <Expander Grid.Column="1" Margin="10,0,17,0" ExpandDirection="Right">
        <Expander.Header>
            <TextBlock Text="Debug" TextOptions.TextFormattingMode="Display">
            </TextBlock>
        </Expander.Header>
 </Expander>


请参阅此

尝试设置
TextBlock
的属性:

UseLayoutRounding="True" OR SnapsToDevicePixels="True" 
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"

尝试设置
TextBlock
的属性:

UseLayoutRounding="True" OR SnapsToDevicePixels="True" 
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"

您正在使用RenderTransform,该转换将文本块渲染为文本,并可以获得像素。必须使用“TextBlock.LayoutTransform”呈现布局,这将从TextBlock转换整个布局。这样会更好。问候语!您正在使用RenderTransform,该转换将文本块渲染为文本,并可以获得像素。必须使用“TextBlock.LayoutTransform”呈现布局,这将从TextBlock转换整个布局。这样会更好。你好+1用于指出
TextOptions.textformatingmode
TextOptions.texthingmode=“Animated”
可能也应该提到;+1用于指出
TextOptions.textformatingmode
TextOptions.texthingmode=“Animated”
可能也应该提到。