Bonjour,
Comment peut-on faire un binding sur une couleur ?
Je stocke dans un XML une couleur comme ceci : <Color>16711680</Color>
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <DataTemplate x:Key="listBoxTemplate"> <StackPanel Margin="3"> <DockPanel > <TextBlock FontWeight="Bold" Text="URL:" DockPanel.Dock="Left" Margin="5,0,10,0"/> <TextBlock Text=" " /> <TextBlock Text="{Binding Caption}" Foreground="{Binding Color}" FontWeight="Bold" /> <TextBlock Text=", " /> <TextBlock Text="{Binding URL}" Foreground="Green" /> </DockPanel> </StackPanel> </DataTemplate>
Mais comment faire pour que cet int passe dans le Foreground ?
Merci
christophe





Répondre avec citation



Partager