WPF在WIN XP上渲染故障

时间:2011-07-15 10:48:04

标签: wpf windows-xp

enter image description here

例如,这个按钮圆角有时变得像这样!并非总是......

Windows XP上的WPF与3.5sp1 ... 任何解决方案? 在我的机器上工作正常WIN7。我在XP上尝试过安装驱动程序时出现透明问题一点都没有问题。
在XP的另一台计算机也没有问题报告...只有一台计算机有问题,但我不知道它的配置,因为它不是我的..

<Style x:Key="ResultsButton" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
            <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
            <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>

                            <Rectangle Stroke="Black" RadiusX="7" RadiusY="9" StrokeThickness="0">
                                <Rectangle.Effect>
                                    <DropShadowEffect Direction="281" Color="#FF5A5252" ShadowDepth="4"/>
                                </Rectangle.Effect>
                                <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                    <GradientStop Color="#FFE5B210" Offset="1"/>
                                    <GradientStop Color="#FFE5B210" Offset="0.49"/>
                                    <GradientStop Color="#FFF18200" Offset="0.51"/>
                                    <GradientStop Color="#FFF18200"/>
                                </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>                


                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>                 


                        <ControlTemplate.Triggers>
                            <Trigger Property="IsKeyboardFocused" Value="true">

                            </Trigger>
                            <Trigger Property="ToggleButton.IsChecked" Value="true">

                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="#ADADAD"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

开启

0 个答案:

没有答案