Ok, that hole was painted on that wall

Posted on

It wasn’t a real hole – it was a well painted brick with great perspective – I’ll just walk around the wall.

The program which I was using unfortunately wasn’t spitting out the xaml for the entire thing that I was viewing. It had the perspectives and the object and its name, but none of the factors regarding angles, colors, shades, textures, or any of that.

So I resorted back to just using what Victor gives in his example on his website and have played around with that. Since I wasn’t able to create the objects, I figured I should at least work for it – right?

So I went through the xaml and hand-changes the aweful red/brown/pink color that his “WPF” was at. At least he’s going w/ the theme presented by the cover this time.

So I modified the “WPF” and turned it into a nice shiny blue but retained the gold hoop which is behind it.

Here’s the fun part – now that the 3D element has been created, I can modify it in Blend. The 2 objects can either be modified as a unit or individually, and that’s QUITE a lot of fun.

So I’m somewhat going outside the boundries of this chapter. Not by much, but a little. Its fun to see what “this button does”.

Anyway, when I have the entire exercise completed, I’ll camtasia it for all of you viewing the blog and put it up on youtube. 😀

Hello brick wall!

Posted on

Brick walls are nice.  Sturdy and thick.  The big bad wolf cannot blow them down.

I’m looking straight at one.  ZAM3D by Electric Rain is not available for download on a trial basis.  You have to fork over $200.00 for it.  Its neat that they make the tool available for download, but to continue within the scope of this book, I need to be able to export to XAML.

So I’d found a highly approved alternative – Blender3D with the codeplex plugin.  The export tool is great, but Blender3D requires Python, and not just any version of python.  It requires 2.5.2 or earlier.

Their download page for that isn’t linked to on their main page, so you have to find it by way of google.  So I find it, and the downloads which are available are for 64bit versions of windows installed, x86, or an entirely different operating system.  There is someone on source forge which has made available something related to a 32bit binary for us still running in 32bit and I’ve downloaded this, but it tells me that I am required to have an even earlier version of python – that earlier version doesn’t have the download for my lowly 32bit windows xp.

UGH!  So now I’m stuck.  Victor Gaudioso, author of the book that I’m going through on Blend 2 has examples available for download, so in light of my beautiful brick wall, I’ll just download his project, snatch up the XAML that his 3d object has, and work with that.

public Window1()
{

InitializeComponent();
mainWindow.Ariel += new Ariel(mainWindow_Ariel);

}

void mainWindow_Ariel (object sender, MouseButtonEventArgs e)
{
MessageBox.Show(“Ariel is Frustrated”);
}

Media Player – a YouTube video of it

Posted on

The media player which Victor’s book steps you through on chapter 6 is complete.  I customized it a bit and added a back button, which was coded essentially as an inverse of the next button.

As far as the user experience elements, the play button plays, stop button stops, and pause button pauses, however, the pause button was set up as a toggle, so if it is pressed while paused, it will resume play.

Cool part that I feel I should mention is that all of the visual elements are done in XAML. The buttons appear to have been done in photoshop or illustrator, but they’re not. They’re 100% XAML code.

The limitations which I’m seeing are as follows:

The logic behind the next and back buttons are limited.  If you hit next to get to the next video, that works, however, you hit it again, and it doesn’t toggle back to the original – it just replays the 2nd video.

The same goes for the back.  If its on the first video and its playing, and you hit the back button again, it restarts the first video.

The last bit which somewhat makes me internally twitch, is that at this point, these buttons are functional, but they don’t appear to interact with the user.  I know – we’ll likely get there further into the book, but at the very moment, I just have to take my knowledge that they do actually do something and pretend that the interaction with the buttons is there in a, “Perhaps I blinked?” sort of way.  We’re not far enough through the book to start making further interactions, but in the interest of my own sanity, I told all of my buttons to change the cursor to the “Hand” so as to make them somewhat appear as if they were more than pretty pictures on a gradient.

Below is the video:

Note: This is second published video which displays an example of what can be accomplished as you’re going through this book on Blend 2. To view the first video posted click here.

Closing textblocks inside open tags

Posted on

From my experience, I always kick myself every time I do something like the following:

<TextBlock Text="Bogus Text" />

The reason I kick myself is that I find by closing a tag like this, I’m essentially shooting myself in the foot before I get very far.  If I close a tag now, within the same line as I open it, I run the risk of having to break it out, and then do a </TextBlock> later.

Yes, this is just an additional step, but if I have a whole lot of conditions within this, I’ll find myself losing my place very quickly.  Instead, I’ll seperate the command – for just in case.  It sets up the markup for future additions.

Example:

<TextBlock Text="Bogus Text">
</TextBlock>

Preparing for the future saves you on time later.  Oh – reasons I mention this – again, from Victor’s book.  He’s having you create, just to test the application to verify that Visual Studios created it without flaws, a simple Text Block with “FOO” as the text.  Yes, it’s there just to test the application and verify that its functional.  However, if you’re in the habit of always always creating things for the future, you hardly ever have to think about what you’re doing when performing something as simple as the creation of a textblock.  Those habits tend to pay off in the long run.  If you do things “the lazy way” most of the time, and properly only when the time calls for it, you’re likely to accidentally slip into your lazy mode and have to correct yourself every single time you put the fingers to the keyboard.

Need I mention this “right way now” mindset applies to every other aspect of life?

HTML on coffee, monster energy drink, with lots of vegetables

Posted on

What is the title talking about?

XAML

There are many impressions of the experience from being a XHTML CSS Raster-based web designer to moving onward and upward to more User Experience technologies that I’ve skipped along the way.  Now that I have a blogging system in place that allows for more easy publication, I’m going to try to fill in the blanks.

So my first impression of XAML once I really got my feet wet was a strong familiarity.  XAML is like someone took HTML and fed it lots and lots of vegetables, gave it training on the track, music lessons, and then packed it full of coffee and monster energy drinks.  By the end of the day, you have the result of something more akin to Hal Milton, the hyperactive thoroughly intense, highly sarcastic and witty guy who works at the Sony Online Entertainment office leading the team creating the new PS3/PC game, The Agency.

Yes, I’m comparing XAML to Hal.

For those who have no clue what I’m talking about, but do know coding and markup enough to be reading this blog – I want you to take HTML, couple the base of HTML with some AJAX and wrap in lovely lovely CSS, and move back to the world of pretty formating, and you have XAML – sort of.  You could also say that its like flash only way slicker and easier.

For the HTML CSS markup designer, your wrist was slapped for using capitol letters.  Your elbow was flicked REALLY hard for using the enter key too often for spacing, and the back of your head popped for tabbing each child element out to make it easier to see… all in the name of quicker load times and most likely a UNIX based server.

XAML is going to – at first – appear to be fingernails on a chalkboard after these web standards have been beaten into you.

CamelCase naming (capitolizations, no spaces, no underscores unless creating an alt command, no numbers… what?!) schemes, tabbing to indicate parent and children (if you don’t, it won’t even run – and I mean run as in the application form of “run”) – aka ORGANIZATION and the app.xaml being your friend for those who are comfortable with CSS.

Moving backwards so we can move forward – you start out with Page.xaml as your root and App.xaml for sharable elements.  They may not be shared w/ anything else, but for organizational purposes, the same way that you would have your html set up as “index.html” and “style.css” – XAML brings you “Page.xaml” and “App.xaml”.  So you put your structures in place within your Page.xaml and tell the structure to look at some name which has the visual atributes defined within App.xaml.

The awesome part about xaml is that you are able to do a whole heck of a lot more.  We’re not working with raster-based (bitmap/pixel based) images (unless you want to).  We’re working with vector based shapes.  This gives a whole lot more flexibility in the visual attributes, what they do, how opaque they are, gradient scales, their x-y coordinate placing, and also allows one to do key frame animations.

Much like Flash, the versatility of silverlight utilizing XAML is only hindered by your abilities to be creative.

Puts me in a warm happy place.

Purpose and direction

Posted on

The plan was to release everything along with this blog in conjunction with a spiffy purely xaml based site and the site was designed by me and made “alive” by my good friend David – but the last few years I’ve done a whole lot of consultation work, and not a lot of original pieces – and that is leaving the portfolio section bare in a very extreme way.

So until I have more content to put there – it isn’t going up. It stinks and will likely drive David up the wall while he waits for it to go up, but sometimes life happens and things just don’t go according to plan.

So in the mean time, I’m going to use this blog as sort of a catalogue for myself to quick reference as well as possibly help others who are diving head-first into using the expression tools. For someone like me, who has known the world of design and UI through notepad and photoshop – there are a lot of things that some people take for granted who are already “in the world” that I’m poking my head into, so if you’re already there and I’m blogging about things that you do in your sleep, its quite possible that this blog is not targeted at you.