Represent a raw path with no transformation. Uses the coordinate system from the octicon/svg files which are all drawn on a 1024px high canvas with variable width. If you're just after the shape this control can be used with Stretch=Uniform. If you're looking for an accurately scaled octicon correctly position you'll have to explicitly set the height of the path to 1024 and wrap it in a viewbox to scale it down to the size you want.
Inheritance: System.Windows.Shapes.Shape
 public OcticonLinkButton()
 {
     this.SetValue(Path.DataProperty, OcticonPath.GetGeometryForIcon(Icon));
 }
 static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     d.SetValue(Path.DataProperty, OcticonPath.GetGeometryForIcon((Octicon)e.NewValue));
 }
Beispiel #3
0
 static void OnIconPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e,
                                   DependencyProperty destinationPathProperty)
 {
     d.SetValue(destinationPathProperty, OcticonPath.GetGeometryForIcon((Octicon)e.NewValue));
 }