DEV Community

Cover image for One SVG edit, two apps: React and WPF
Axialis Software
Axialis Software

Posted on

One SVG edit, two apps: React and WPF

The Folder icon in a React app and a Windows WPF app started out with the same shape. Could we change the tab in one SVG and get the same update in both apps?

What we changed

  1. We opened folder.svg in IconVectors 2.30 on Windows and moved a path node to reshape the folder tab.
  2. We saved that SVG and generated two outputs from it, a React TypeScript component and XAML for WPF.
  3. We integrated the new outputs, refreshed the React app in the browser, and relaunched the native WPF app.

Both apps showed the same reshaped tab. The cover image shows the two results side by side.

What each app needed

  • React: We adapted the generated JSX syntax to fit the demo component.
  • WPF: We resolved the SVG's currentColor to a WPF brush.

Those adjustments preserved the exported path geometry. For the next shape change, edit folder.svg, regenerate both outputs, and check the icon in each running app.

React TypeScript export guide ยท XAML export guide for WPF

Disclosure: we build IconVectors at Axialis.

Top comments (0)