bonjour
j'utilise un dattemplate pour afficher dans une listbox dont le panel est un canvas, sa affiche comme il faut sauf quant je veux fair du Binding et mon programme s'arrete avec ce message sur visual studio :'l'application est en mode arret'
alors pour moi c'est à cause du binding de " OffsetX " car si j'utilise une valeure constante exemple " 1" pas de problème.
l'expression en question est :
par contre ce code ne provoque pas de problème :
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<Path x:Name="path1" Stroke="Green" Fill="Gray"> <Path.Data> <EllipseGeometry Center="{Binding Path=Location1, Mode=TwoWay}" RadiusX="25" RadiusY="25"/> </Path.Data> <Path.RenderTransform> <MatrixTransform> <MatrixTransform.Matrix> <Matrix OffsetX="{Binding Path=OffsetX}" OffsetY="0" M11="1" M12="0" M21="0" M22="1"/> </MatrixTransform.Matrix> </MatrixTransform> </Path.RenderTransform> </Path>
pas de problème sur le nom de ma propriété "OffsetX" puisque je l'ais utilisé ici juste pour voir :
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<Path x:Name="pathPuits" Stroke="Green" Fill="Gray"> <Path.Data> <EllipseGeometry Center="{Binding Path=Location1, Mode=TwoWay}" RadiusX="25" RadiusY="25"/> </Path.Data> <Path.RenderTransform> <MatrixTransform> <MatrixTransform.Matrix> <Matrix OffsetX="1" OffsetY="0" M11="1" M12="0" M21="0" M22="1"/> </MatrixTransform.Matrix> </MatrixTransform> </Path.RenderTransform> </Path>
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.... <Path.Data> <EllipseGeometry Center="{Binding Path=Location1, Mode=TwoWay}" RadiusX="{Binding Path=OffsetX}" RadiusY="25"/> </Path.Data> <Path.RenderTransform> <MatrixTransform> <MatrixTransform.Matrix> <Matrix OffsetX="1" OffsetY="0" M11="1" M12="0" M21="0" M22="1"/> </MatrixTransform.Matrix> </MatrixTransform> </Path.RenderTransform>
je ne vois pas ou est le problème!!






Répondre avec citation
Partager