Bonjour,
J'ai crée une animation générique sur un objet de type Rectangle.
1 2 3 4 5 6 7 8
| Rectangle myRectangle = new Rectangle();
myRectangle.Name = flowerName;
myRectangle.Width = 10;
myRectangle.Height = 10;
SolidColorBrush myBrush = new SolidColorBrush(Colors.Purple);
myRectangle.Fill = myBrush;
..... |
Cependant j'aimerais remplacer ce Rectangle (UIElement.Shapes.Rectangle) par une image crée sous Expression Design.
L'exportation de cette image en xaml me donne ceci :
<Path x:Name="Path" Stretch="Fill" Data="F1 M 287.287,451.884C 287.767,452.734 299.287,478.551 316.667,489.333C 316.667,489.333 424.842,543.107 531.954,483.218C 531.954,483.218 547.333,470.667 554,445.333C 554,445.333 555.811,369.589 562.889,166.555L 566.889,133.222L 568.667,130.667C 568.667,130.667 565,145.667 514.667,154.333C 514.667,154.333 449.667,165.667 386,162C 386,162 345.333,161 306.667,153C 306.667,153 262.333,144 261,130L 266.889,166.555C 266.889,166.555 272.255,270.922 287.287,451.884 Z " Margin="230.926,0,0,60.957" Width="58.258" Height="72.243" HorizontalAlignment="Left" VerticalAlignment="Bottom">
Comment faire pour recrée l'image via le Path et la proriété DATA en c# ?
1 2
| Path myPath = new Path();
myPath.Data = F1 M 287.287,451.884C 287.767,452.734 299.287,478.551 316.667,489.333C 316.667,489.333.... |

n'existe pas 
Merci de votre aide !
Partager