I’m 3 chapters from the end, was working on my laptop and decided that I wanted more breathing room so I relocated to my PC to receive a message from blend:
*shakes head*
Back to the laptop :-/
As blogged about earlier, ZAM3D is no longer available for trial download. Bummer – but the author has provided the XAML for us readers so that we may continue through this section.
If you’re following along in the book with me, that’ll be helpful.
Also, the Silverlight chapters (14 and 15) have revisions – sort of.
A quote from his… other blog other than the blog on his official book’s webpage:
It has been brought to my attention by some readers that the Silverilght chapters (13 and 14) are not compiling with Silverlight 2.0. So, I have written two new articles (complete with source code) to accomplish the same goals (a paging system and a media player). The paging system chapter is replaced with an article on how to use Silverlight 2.0’s new VSM (Visual State Manager) and Blend 2.5’s new State panel to make an Image Viewer. The Media Player chapter is replaced by an article on how to create a very sleek Silverlight 2.0 media player with amazing mouse enter and mouse leave effects. These articles will be part of the upcoming book update but you can get them now by emailing me at wpfauthor at gmail dot com.
Already through chapter 12 – I may end up having to skip chapter 13 as it has me delve into using Zam3D again which as mentioned before, is no longer available for trial download.
So the last part of chapter 12 takes the exercise from the end of chapter 9 and then increases what you’re doing by having 3 different views.
So quick view of the final product is what many would consider to be a photo album. It has a drop-down menu which contains photos that you have statically assigned through C# custom class, 3 radial buttons which change the view, with the 3 views being a typical view of the images, a 3D skewed perspective of the images, and a 3D Cube which spins, all of which paint whichever image you’ve chosen over the chosen medium.
Its pretty dang cool.
I think I’m going to skip ahead to the 2 last chapters which deal with Silverlight, and then come back to chapter 13.
There was quite the high level of frustration.
Chapter 12, after the section regarding Dependency Properties, you go over a case study which is… exactly the same exercise which was done at the tail end of chapter 9.
The part which I ended up skipping over as I could not get my new class to even show when clicking to add a CLR object – the actual project itself wasn’t showing at all, just the system resource classes.
The first time we did this, at the end of Chapter 9, I spent a good 2+ hours trying to discover the source of the issue – why wasn’t it showing?! I downloaded the example provided on the book’s website and compared the C# from that with my code and they appeared to have no differences. I knew that this would likely be something that I would either spend more hours looking at and be a case-study for einsteins theory on insanity (doing the same thing over and over again expecting different results) or if I was smart, I’d just move on and come back to it.
Well chapter 12 has us coming back to it and I experienced the same issue. 3DImageProject was not showing even as an asset to be searched in the “Add CLR Object Data Source” menu. The only items showing were the system and presentation resources.
Oh man. My heart sank very low. I thought for sure this time it would work and that I’d just have to do the prevous one over again – but nope. This one didn’t work. Which told me 2 things. 1) The first time through I very well may have done it completely right, and 2) There might be an additional step which I need to take between the switch from Visual Studio and trying to add the CLR through Blend.
I started looking around and a thought came to mind. Sometimes when I’m working between various documents within Visual Studio where the documents reference each other, Visual Studio won’t notice the existance of the link properly until after hitting F6 to build. Then the notification squiglies discontinue their plague and I can continue on without issue.
Now, just before moving from Visual Studio to Blend, I did build the application, but perhaps Blend itself wasn’t associating everything. So I decided to use Blend’s “Build Solution” (ctrl+shift+B) and try from there to add a new CLR and guess what… IT WORKED!!!
I’m going through chapter 11 of Victor Gaudioso’s book on Expression Blend 2, and he is stepping his readers through the creation of a glassy button.
I’ll summarize what we’ve done so far.
First, we created a rectangle with beveled edges. He directs his readers to use the visual controls to create the curve. I prefer to have a bit more control over it, and so I enter into the properties pane in the RadiusX and RadiusY. Either way works.
He then instructs the readers to duplication this – or in Blend 2 terminology, its a simple copy-paste (Photoshop! Get out of my brain!), shrink the size of the rectangle, set both gradient stops to white (#FFFFFFFF) then turn the right-most gradient stop’s Alpha channel to 0%.
I’ve seen people do this in 3 ways. Either by clicking and moving the mouse up/down or left/right (its somewhat like a dial – click and drag will increase or decrease the percentage), type directly in the 100% field to the prefered modifier, or by programming it directly in the color code.
A bit on that last option, you may notice that the color code has 2 more characters than usual. I promise, that is not a typo. The addition of the 2 are specifically related to the Alpha chanel, and those are placed as the first 2. Most colors will remain solid. So if you’re modifying color hex by hand, just pay attention to the last 6 and ignore the first 2. If you’re wanting to adjust the alpha and change it to 0%, just replace the first to FFs with zeroes. The result will be this: #00FFFFFF
This will often help when you’re neck-deep in XAML and don’t want to switch to design view.
The last thing I wanted to mention was the use of the white gradient – to – 0% alpha. This is a commonly used thing for designers who work in photoshop or illustrator with one exception – the “layers” are exactly the opposite. Instead of the top item being “on top” its more like painting – you start with the backing and for each additional color, you add to the existing one. I had to “reprogram” the way I thought about these orders and because I move between photoshop and blend, it continues to throw me off.
In blend, the bottom-most object is the one in the forefront.
So the shiny button, I’ve described the first 2 layers – the base gradient, and the shine which has been shrunk and has had half of the gradient modified to being transparent. The 3rd step is to take the resized 2nd layer, duplicate it (copy-paste) and then flip it.
Victor (the author) has you go into the properties pane to the bottom and transform it by rotating by 360º. I prefer using the last tab which will exactly flip it either vertical or horizontal. This being so similar to a tool that I use QUITE frequently in photoshop – this is much more comfortable for me to use than a full 360º rotation. From there, you just need to hit the down arrow a few times to make this 3rd rectangle closer to the bottom.
The result is something like this:
Not too bad – working with Blend is really not all that different than working with Illustrator or Photoshop, but the differences can be tough to overcome at first. Blend is a whole lot more like Illustrator than photoshop in the matter that you’re dealing with vector based images and can modify things like the bevel radius on the fly – after its been put onto the canvas. In photoshop, its not really much trouble, but you do often end up having to just delete a layer or an object and add it back on if the radius on a vector(path) based image isn’t quite right.
I just completed Chapter 10 and am thinking back a bit.
Just a few days ago, I was not exactly uncomfortable with tinkering with the C# but I very much was not anywhere close to the level of comfort that I have now, and like a battle scare that one is proud of, I’m proud of something I’m already noticing that I do incidentally that I kick myself over – a bad habit beginning to form. Habits only begin to form when you’re used to doing something over and over again.
The bad habit? Putting quotations where I know they need to be there. Now why is that bad? Because Visual studio does it for me, so I end up having something that looks like this:
Height=””28″”
I then have to stop in my train of thought, backtrack, and fix it.
Ahh… progress.
On a personal note, the only reason I’m even able to scream through this book as quickly as I am is because the last day of 2008, our water heater broke. Someone has to be here for those who are far more capable of taking care of that situation than me – which means I’m home from work and instead of sitting on my hands or picking my nose, I decided to finally start going through this book – one which has been begging me to go through it for months.
Tomorrow, they fix the water heater. I wonder if I’ll actually get through to chapter 15 by the end of tomorrow? I’m just now starting chapter 11 and… its 3:30am.