Bonjour,
Je viens vous écrire pour vous demander de l'aide.
Je dispose d'une application développée en C#, WPF pour un os XP.
Cette application devra être migrée sous Seven. Malheureusement j'ai un problème récurrent niveau graphique comme le montre les deux photos :
La première image est sous XP, sans aucun soucis graphique.
La seconde image est sous Seven, avec déformation graphique lié notamment au focus et à la sélection de la listview.
Les composants posant problèmes sont des listviews.
Ci-dessous un bout de code concernant une des listviews
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60 <ListView x:Name="ListePrioritaires" Margin="5,5,5,0" BorderThickness="0,0,0,2" BorderBrush="AntiqueWhite" Background="Transparent" FlowDirection="LeftToRight"> <ListView.Resources> <Style TargetType="ListViewItem"> <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter> </Style> </ListView.Resources> <ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style> <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/> </Style> </GridView.ColumnHeaderContainerStyle> <GridView.Columns> <GridViewColumn CellTemplate="{StaticResource colVoiePrioritaireTemplate}"/> <GridViewColumn CellTemplate="{StaticResource colLettreTemplateInvisible}" /> <GridViewColumn CellTemplate="{StaticResource colCptTemplate}"/> </GridView.Columns> </GridView> </ListView.View> <ListView.ContextMenu> <ctl:RotateContextMenu x:Name="MenuLP" FlowDirection="LeftToRight"> <ctl:RotateContextMenu.Items> <ctl:RotateCommandGroup> <ctl:RotateCommand Header="{local:Localize ReservoirProperties}" Command="{x:Static local:CommandHandler.GestionVoieCommand}"> <ctl:RotateCommand.Icon> <Image Stretch="Uniform" Height="24" Width="24" Source="..\Images\Proprietes.png"/> </ctl:RotateCommand.Icon> </ctl:RotateCommand> <ctl:RotateCommand Header="{local:Localize ReservoirClear}" Command="{x:Static local:CommandHandler.RemoveAllVehCommand}"> <ctl:RotateCommand.Icon> <Image Stretch="Uniform" Height="24" Width="24" Source="..\Images\clear.png"/> </ctl:RotateCommand.Icon> </ctl:RotateCommand> <ctl:RotateCommand Header="{local:Localize ReservoirAddVehicule}" Command="{x:Static local:CommandHandler.UpdateVehicleNumberDDCommand}"> <ctl:RotateCommand.Icon> <Image Stretch="Uniform" Height="24" Width="24" Source="..\Images\Add.png"/> </ctl:RotateCommand.Icon> </ctl:RotateCommand> </ctl:RotateCommandGroup> <ctl:RotateCommandGroup> <ctl:RotateCommand Header="Affectation" Command="{x:Static local:CommandHandler.AffectationDDCommand}"> <ctl:RotateCommand.Icon> <Image Stretch="Uniform" Height="24" Width="24" Source="..\Images\Affectation.png"/> </ctl:RotateCommand.Icon> </ctl:RotateCommand> </ctl:RotateCommandGroup> </ctl:RotateContextMenu.Items> </ctl:RotateContextMenu> </ListView.ContextMenu> </ListView>
J'ai tenté de modifier les ResourceDictionary, sans succès.
J'ai tenté également de changé les SolidColorBrush...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/PresentationFramework.Classic;component/themes/classic.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
Si quelqu'un a une idée, je suis preneur!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" /> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
Merci par avance
Partager