WPF рендерит глюки на WIN XP - PullRequest
0 голосов
/ 15 июля 2011

enter image description here

Например, эта кнопка круглый прямоугольник иногда становится такой! не всегда ..

WPF на Windows XP с 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>

Вкл.

...