PSD to WPF XAML: Import is messed up

我的梦境 提交于 2020-01-23 12:48:15

问题


I'm having a Designer come up with some elements in Photoshop, which I then plan to use to build an app in Visual Studio. When I try to import the PSD file into Blend, it's a nightmare though.

Having made most elements using clipping masks, I can either merge them and have it look the same in XAML, but then I lose all the editing options as it's just one big block. If I don't merge the layers, I have the elements imported without the clipping mask which just looks horrible.

I know the import doesn't actually support clipping masks (seriously...?), so what's the best approach here? I'm sure I'm not the first one with this problem, however I can't seem to find ANYTHING on the web regarding a solution.

Should the PSD be changed or is the a way to change something during import?

Thanks a lot, Chris


回答1:


If your designer is making your assets in Photoshop than you're going to run into all sorts of issues especially once you start dealing in the varying possible resolutions etc, which you'll end up trying to counter with things like embedding the image files into ViewBox etc. There's not as much flexibility in usability with that route.

My suggestion, would be unless it's really necessary to use Photoshop assets in your work, create your assets in Illustrator instead and use an export to Actual Pure XAML converter like Mike Swansons AI to XAML tool (which is quite handy) then you'll be dealing with real XAML and vectors so you can take those assets and do a lot more with them in regards to things like Transforms, Storyboards, Property changes, etc. Plus it will all be vectored art so you can play with sizes /shapes to your hearts content and not lose the crisp lines and resolution.

Hope this helps.



来源:https://stackoverflow.com/questions/19728121/psd-to-wpf-xaml-import-is-messed-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!