Using Expression Design to produce vector icons for WPF - wpf

I was toying with the idea of switching over to using XAML based icons instead of PNG-based icons, in a Visual Studio-based WPF project.
I can create reasonable and decent icons with Expression Design. but I don't get how the workflow from Expression Design to Visual Studio is supposed to work. I can export to a temporary file in WPF resource dictionary format, and then cut and paste into an actual resource dictionary in my project. I suppose. But that's getting really tedious.
How are you SUPPOSED to do this? (Export from Expression Design into a visual studio project).
fwiw, Expression Blend seems unusable for creating icons. It just doesn't play well with canvases. And Expression Design does have horrifying shortcomings and limitations. But I'd rather use a tool that's built to generate ARTWORK, rather than UI.
Is there a way to do this, and use use PACK URI's, since the project is currently heavily pack-uri based.
I think the piece I'm missing is there doesn't seem to be a standardized XAML format for image files.
Any tips appreciated.

Using Blend to create icons was always problem. I don't know how to make it simple but i could suggest a third party application for icons.. you can get it free here... It was Syncfusion's Metro studio where you get thousands of icons and you can export as well as png and xaml path... Its it a pre designed icons you can make use of it..

Related

How to Design a WPF Flow Document

Im making an wpf application and i need to generate reports and then to print them. I am using CodeReason.Reports library but it is very dificult to me to design the reports with out a designer.
Any one knows if there exist any Flow Document designer, or if there is any way to design it from blend?
Thanks
I don't know the library you are talking about, but I used WPF for creating some report, let's say a minimal report engine, so I think I can give some suggestion to you.
First, learn XAML. Visual studio has a good designer, but I use it just to see what's happening: writing XAML with the good Visual Studio intellisense is much more productive. I can't suggest how to operate with your lib, but with my strategy the document pages are wired by the engine in code, content are produced by user controls: they just live very well in VS designer. I also used an MVVM library to develop in a an code free view way.
So what I learn in y WPF experience: it is a great and powerful environment, you can present thing the way you want, but don't look for a cutting edge designer. The WPF designer is XAML, mastering it is necessary.
I used flow documents in a regex tool I created. I ended up creating a programmatic wrapper over the flow document library which once done was easy to use because it had my target look and feel.
No, AFAIK there is no design tool for flow documents nor does Blend support it. Create a document and provide a wrapper which speaks to that design is your best option if you use flow documents.

Is Expression Blend required when you have VS2010?

There have been posts on this site in the past that say that programming in WPF is difficult without Expression Blend?
Is this still the case with VS2010, or does this new IDE have features that make WPF a lot easier?
I am a developer, but there is no way I would develop XAML applications of any kind without Expression Blend. The value is far too great and not limited to just pretty graphics. Templates, data binding, resource management, layout, rapid design, visualization, etc. are all vastly superior experiences in Blend.
I really struggle with developer rejection of Blend. Aside from the fact that it isn't free or included with Visual Studio there are no compelling reasons to ignore such a powerful tool. Yes, it is different than Visual Studio, and yes, there is a learning curve, but once you know how to use it Blend is unquestionably the right choice.
I understand developers need help through that learning curve. I also understand that Blend is unlike other tools we have used in the past: believe me, I've been there! That's why I wrote the book "Expression Blend in Action: a developer's guide", to help developers over this hurdle. This isn't meant to be an advertisement so I'm not providing the link, but if you're interested you can find it at Manning.com.
I am not sure why people are comparing the development of WPF apps on Visual Studio and Expression. The Simple answer to this question is when you need to do vector designing for your application, Expression Blend is the resource for it. You can't design a control in WPF as per your requirement. Expression Blend supports the WPF text engine with advanced OpenType typography and ClearType, vector-based 2D widgets, and 3D widgets with hardware acceleration via DirectX.
In essence, it is a user interface design tool developed and sold by Microsoft for creating graphical interfaces for web and desktop applications that blend the features of these two types of applications. It is an interactive, WYSIWYG front-end for designing XAML-based interfaces for Windows Presentation Foundation and Silverlight applications.
Expression Blend supports developing Microsoft Silverlight browser-based Rich Internet Applications providing animation, vector graphics, interactivity and video playback capabilities
It depends what you are using WPF for.
If you are writing a line-of-business CRUD application, then there is no need for expression blend at all.
I've been programming in WPF for years, and was only introduced to Expression blend a month ago.
It definitely makes some things easier, in particular animations or vector graphics.
But, if you've become comfortable typing directly into the XAML editor (as most developers are), then it really isn't necessary to do your job.
The short answer is no, it's not required. But Expression Blend is a great UI design tool that can simplify your UI development. It's a tool, like any other, optimized for doing certain tasks. Developers pick tools based on what they do for us. Think about unit tests. Using a Unit Testing framework saves us a lot of time and effort, as the framework people have optimized their tool for the task.
For me, Blend is my goto tool for these features.
Animations and Timelines
Gradient Editing
Control Templates
Template PARTS
Visual State Manager
Resources and Resource Dictionaries
Styles
Sample Data, with DataBinding
Shape Combining
Paths, Layout Paths
Here is just one example. Setting up an multipart animation in Blend might be a two minute job. Writing the same Animation logic in Visual Studio XAML editor may take 5-10x longer. Plus Blend has an animation preview. In VS I have to compile and run my app to see if the animation works as intended. On big projects that build time eats into my productivity.
It is a bit yes and no, you can do Xaml development without Blend but for somethings Blend is a better solution. Personally I stick with VS2010 unless I know that I'm gonna be doing some custom styling or custom UI in general.
You mentioned programming in WPF so take it that you are not a UI designer. Go with Visual Studio, theres's nothing you cant to in Visual studio that you can do with Expression Blend.
Blend is not required for WPF or Silverlight. However, it makes some things a heck of a lot easier. Specifically:
Animations
Extracting control templates
Styling controls without having to build and run everything
You can do all of these things without Blend, but it's not as easy. For example, you can write a WPF program that extracts the default template for a control and then displays it as text. Or if you use Blend, you can click a button. I find that without Blend, I have to constantly do edit/build/run cycles and that takes time. ("Nope, that color isn't right. What if I just tweak it this way a little bit..." and then I'm off to get a cup of coffee as the whole thing builds and runs just so I can check a color.)
Blend saves me time and makes my life easier -- that's why I use it or any other tool.

First dabble in WPF using VS2010 and Expression

I am looking at using WPF for the GUI side of an upcoming project.
I know I have a huge decision to make on WPF vs. Win forms, but before I can make that decision I want to have a play around with a few simple WPF programs.
I have read a few posts online that say Visual Studio (2008 at the time of the post) lacked somewhat in editing the XAML and they recommended using MS Expression?
Questions are:-
I have VS2010, Has this fixed the lacklustre XAML editing present in VS2008?
Which product in Expression studio is used instead to edit the XAML?
Is the idea that you build the code side of the WPF in VS and Build up the XAML in Expression the copy the generated XAML into VS?
Any suggestions/tips on combining Expression and VS2010 would be appreciated.
Kind Regards
Ash
VS2010 has a much better enviroment for supporting XAML compared to VS2008 (in VS2008 it really was not the greatest experience) - so it would be possible to play around with some basic projects straight in VS2010...
Expression Blend really shows it power when you get into animations and transitions etc (Expression Blend to me would be the starting space in the Expression suite once you had covered the basics in VS2010).
The approach I would take is to get basic exposure in a tool/ide you are used to like VS2010, and then go through some of the Blend examples/tutorials that are available off the Expression Website to then take it to the next level.
The things that got me sold on WPF/Silverlight were databinding, separation of concerns using the MVVM pattern and commanding... it just seemed easier than what I was achieving in the winforms arena and cleaner... but it took a while before I was sold on it just because I was used to the winforms way of things and was trying to do WPF but with a Winforms approach.
For basic projects you could build the code and XAML all directly in VS2010. In fact for someone learning XAML for the first time who comes from a code centric perspective, coding XAML directly in VS2010 might be beneficial so that you get used to the basic syntax before you work in a tool like Expression Blend where that can be hidden from the developer.
use VS2010, it has much better intellisense support for XAML (and better support for large solutions >50 projects).
also you dont copy over files between Expression blend and VS2010, both open the same solution work on the same solution (Blend now has support for source contorl as well), you can flip to show the C# in Blend and vice versa in VS2010

WPF without Visual Studio?

Would it be practical to create WPF applications without ever touching Visual Studio (or any other IDEs)? As in, coding and compiling completely within Vim and the command-line? What resources would you recommend for someone trying to do so?
It would be possible, since basically WPF is based on XAML - a variant of XML - and C# or VB.NET or another .NET language as its backend language.
The question really is whether that's practical and if it makes sense - I highly doubt it. WPF is all about visual design, e.g. totally without a visual designer (either the built-in one in Visual Studio, preferably the 2010 version; or some other visual designer), it seems a bit silly to want to program WPF....
As for resources - well, a least a text editor is a must, then definitely a few good books on WPF, and you could leverage the C# or VB.NET compiler that comes with the .NET framework.
I have found myself writing XAML in Notepad on a number of occasions where I needed to create a quick UI but couldn't load an IDE. It is really quite trivial, and almost - but not quite - as fast as using an IDE. The main advantages of an IDE such as Blend or VS.NET are in quickly getting things like colors and animations to be "just right."
Another occasion when I frequently write XAML or C# in a text editor is here on Stack Overflow. I only fire up Visual Studio when I need to test something out.
My main recommendations for creating WPF applications without an IDE are:
First you should make proper use of WPF's layout system, using appropriate panels and "Auto" sizing wherever possible. For example, if you want a stack of buttons with some space between them, create a <StackPanel>, and on each button add Margin="4" or whatever. This is good design anyway. Most beginning WPF programmers treat it like WinForms with no layout capability, which is a shame. WPF has a very powerful layout engine and it should be used. If it is, there will never be any need for graph paper or measurements. In addition, your UI will automatically adjust its layout if you change font sizes or objects are larger than expected.
Second you should use msbuild for your project unless it is ultra-simple. msbuild is installed along with NET Framework so it is always available. The file format is very easy to edit with a text editor, and it is much better than a batch file with the appropriate "csc" command because it allows you to use code-behind and is less error-prone when adding new source files.
Third keep a PowerShell command line window open separate from your editor, with a command that runs "msbuild" and then executes your application. To run your app, then just Alt-Tab to this window and hit uparrow, Enter. Some text editors have the ability to execute user-defined commands directly from within the editor and see the output, in which case this second window is not necessary.
Fourth keep a copy of cordbg or mdbg handy. Although an IDE is the ideal place to do your debugging, any debugger is better than none at all. You will find your problems much faster if you stop at breakpoints and examine variables than if you just keep editing code and re-running.
Fifth, use "ColorPad" or a similar application to select your colors for use. Just guessing and entering your best guess in hexadecimal just doesn't work very well.
For resources, I recommend you get the book "WPF Unleashed" and work through the examples. I would also read a lot of other people's XAML, such as can be found on CodePlex.
Possible, Yes. Practical No.
For production work, I would consider Microsoft Expression Blend 3. Then copy the XAML and paste it into the editor of your choice and compile from the command line.
You could download KAXAML . It's a free, lightweight editor. I found it good for learning about XAML and seeing how minor changes and tweaks can impact on an overall design.
XAML is plain old text so find a free editor (KAXAML), use it, and if you must, paste into your editor.
If you really want to go down this route, I'd recommend getting some graph (squared) paper and a sharp pencil.
Draw out your designs on that, read off the positions and type them into your editor of choice.
One benefit of this is that you're going to have a paper prototype to show people ;)
As James Keesey points out in his comment on marc_s's answer, your edit-compile-test cycle is going to be painful.
It's definitely possible. I'd say it's not practical, though.
To be honest, I do professional WPF development and I do it with the visual designer closed. I'm much more comfortable editing the XAML by hand, just like I write HTML. However, the benefits of an IDE go far beyond the visual designer. There's IntelliSense, debugging and a whole host of other invaluable features.
Really, I must question your motives. What are you trying to gain? Visual Studio Express editions fully support WPF development, so it can't, or shouldn't, be a cost issue.
The newest version (3.0) now supports the wpf template.
Just download it from: https://dotnet.microsoft.com/
Just type in console:
dotnet new wpf -o wpfHello
cd wpfHello
code .
Greetings :-)

Is knowing blend required?

Do you expect your WPF developers to know expression blend?
Any good resources for learning more about Blend?
[UPDATE] Does knowing blend make you more productive?
I found Blend a great way to ease into XAML. Many of the common things you want to do are easy in Blend, especially databinding. Databinding has no intellisense and I found doing things in Blend a great way of discovering how do write the databinding syntax.
I now find myself mostly editing raw XAML buy hand.
The areas where blend is really handy:
Customizing templates.
Animation
Breaking the UI down into user controls
As a WPF developer I surely see the benifit of knowing Expression Blend for many of my previous projects. This help me to jump start on creating Usercontrols and Custom controls very effectively. And if we do in the conventional way of writing XAML from the scratch, it is gonna take a very long time of your development.
And also for creating DataTemplate,ControlTemplate,Styles and ItemsPanelTemplate - it is just a click away in Expression blend.
So I highly recommend Expression blend for a WPF programmer
I typically work in both blend and Visual Studio (2005) side by side when doing WPF development. (Although, granted, I typically do both design and c# coding).
The benefits of using Blend is that certain tasks are extremely fast there - things like picking colors/brushes, creating animations and layout fixes such as tweaking margins/paddings.
Another usage is to instantly see how your hand written XAML will look like without actually starting the app.
Blend has a bad habit of producing some weird XAML so I always have to clean it up in the VS text editor afterwards. I still find it to be a net win to use blend though.
So, to answer your question: Is Blend required? no, not really. But it will make your life easier for certain tasks and thus make you more productive.
Things like animation and gradient color definitions can really only be done effectively in Blend. Blend is also often extremely useful for generating some non-trivial custom visual elements, just so that you can view the generated Xaml and import a CLEANER version into your production code. Unfortunately, the point-and-click nature of Blend disguises the fact that huge volumes of very messy Xaml is being generated under the hood, and you'll want to REFACTOR that Xaml before using it in your production source. Fortunately, learning Blend is not that hard. The best tutorial I ever found was called the "Fabrikam" tutorial. There may be updated versions available, but one version of that tutorial is still available at the link below.
http://blogs.msdn.com/expression/articles/516589.aspx
Realistically, very few dev. shops have access to qualified "interactive designers" (its not somethiing a company can just re-task one of its junior Mar-Com people to perform), which means, at most places, developers will need to learn some amount of Blend if marketing wants to add the kind of fancy visuals that provide alot of the justification for using WPF in the first place.
As a developer, after working intensively with WPF for several months, you will find yourself becoming totally comfortable editing Xaml directly and, unlike with Windows Forms, you'll rarely rely on features in the VStudio designer. Not only is direct editing MUCH faster than scrolling through property lists, but VStudio does not have point-and-click support for many of the features you will use in production WPF applications (they just got around to adding an "event" tab in SP#1). Blend has more support for many of these items (it can generate a DataTemplate, for instance), but I usually only jump into Blend to create a quick animation or other visual effect, cut and paste a carefully-refactored version of the markup into my "official" VStudio project source, and move on.
I think at least the designers should start using the Expression Suite.
The developers should be somewhat familiar with the tools but just enough to enable them to communicate better with the designers.
Since there are not so many good WPF tools, knowing Blend is a pretty useful skill. However I wouldn't consider it as requirement. The whole idea of WPF is to distribute work between coders and designers. IMO developer is not required to know Blend throughout, but basic skills are required to understand designer's needs.
Video training for expression blend:
Total Training Expression Blend
http://expression.microsoft.com/en-us/cc136536.aspx
http://windowsclient.net/learn/videos_wpf.aspx
I (as a developer, not designer, soo not designer) tried to start learning WPF through Blend. While I could get stuff working, looking back at what I produced makes me shiver.
Now that I know my way around WPF pretty good, I still use Blend and Design every now and then, but my work is based in XAML (not designer view in VS, mind you, but XAML). In other words,
I know how to clean it up now.
I'm still wondering how I can get my Adobe-Flash, -Photoshop, -Illustrator design guru to work with me in WPF.
It fully depends on what you want to do. To answer your second question, would you really want to try editing an animation storyboard outside of Blend? If you're working with the actual Visuals of the application, Blend is best suited for this. If you want to hack around with databinding, validation and other things where you must swap back and forth with code. Obviously its more sense to work on the XAML in Visual Studio.
Lynda.com has some cool expression blend training available online...
Getting Started with Expression Blend by Lee Brimelow
Developers don't need to know Expression at all.
What you do need to know is XAML and not hide behind some tool, which would be the worst thing you could do as a WPF developer. Your tool of choice is yours to decide on. I used to use the XML editor in Visual Studio.
The only persons who need to know Blend are the ones in charge of the visual aspect of your WPF application. They have to be able to understand how to skin your application with templates, but other than that, they can keep to Blend exclusively.
In general, I think it's more important to for developers to understand XAML, as Blend is just a view on top of it. XAMLPad may be more useful for learning XAML in the first instance.
More specifically to this question though, I think if developers are working alongside designers using Blend, it could be very useful to know at least the basics. As well as allowing better communication (as mentioned by #kokos), it will let the developer perform minor edits (such as alignment etc.) in the same environment, and also understand the limitations and boundaries of the tool with respect to the code generation.
Historically, designer tools have had a few quirks that developers have had to work around, such as re-coding HTML in FrontPage, or generating font tags instead of using styles or classes. I'm sure Blend wouldn't do such things, but it might generate XAML that the developer would prefer to restructure or slim down, so knowing which features generate which styles of code could be very hand for the developer.
Would you require your HTML developers to use DreamWeaver?
All good WPF coders should know XAML by hand and only use tools like Blend for quick mockups, for doing animations or tweening, or for doing complicated gradients, etc.
Coding XAML by hand is a requirement for good WPF developers - Blend is a tool, not a substitute for knowing XAML.
Brennon Williams new book should also be good!!!
(source: pearsoned-ema.com)

Resources