Mike's Picture Mike Uttech
Adventures in Life

Long time, no type

June 23, 2008 11:57 PM by Mike

Holy cow.  It's been a while.  Almost a month in-fact.

It's been a crazy month!  Drew is now over a month old, and it's crazy learning his personality and seeing him grow before our eyes.

Here are the pictures I promised in my last post!

 

As for work stuff, I've been swamped with the new member of our family, and haven't had an enormous amount of time to spend on Silverlight projects.  I did get the chance to throw together an entire site in a weekend for work, so that was good fun!


Tags:
Categories: Personal
Actions: Permalink | Comments (0) |

Drew is here!

May 25, 2008 12:08 PM by Mike

Friday at 4:13AM Drew made his entrance to the world!  He was 8 lbs 15 oz and 21 inches long.  He is healthy and we are at home now!  Crissy scared me pretty good losing atleast 2.6 liters of blood but she claims she never felt light headed or dizzy from it.  A team of about 10 doctors and nurses worked on her for over an hour and were finally able to get her blood pressure back and her pulse back to normal.  It was definately a crazy morning.

It's also been a crazy few days since, and I am working as hard as I can to catch up on the sleep I didn't have since Wednesday.

I will post pictures later!


Tags:
Categories: Personal
Actions: Permalink | Comments (0) |

We're having a baby!

May 21, 2008 9:26 PM by Mike
We're at the hospital and Crissy is being induced!  They expect it to be 1-2 days for Drew to make his appearance!  And, the hospital has WiFi which is awesome.  Only thing is it is blocking my VPN into work.  Oh well, guess I have an excuse to not work!
Tags:
Categories: Personal
Actions: Permalink | Comments (0) |

You learn something new every day!

May 12, 2008 4:14 PM by Mike

I really thought I had found a magical solution that would eliminate all of my resizing code, but after experimenting with it, I don't think it's as good as I originally thought.

Using a Grid with a ratio of sizes set will automatically resize all non-absolute sized objects within it, which is exactly what I want.  The problem is, that for the layout I am doing, there's more than a few Rows and Columns needed, and some content needs to span all rows/columns (the background image) and some content needs to align within specific rows/columns.

To demonstrate what my layout looks like, and how items need to float, I put together a super creative looking diagram:

Maybe I am just missing something with the Grid control, but I think (for now atleast) I am going to stick to resizing/moving items on my own by subscribing to the SizeChanged event...


Tags:
Categories: Work
Actions: Permalink | Comments (0) |

Interesting technique for navigating between XAML files

May 9, 2008 11:50 PM by Mike

I was looking for a way to seperate out different "pages" within a Silverlight app, and stumbled upon a method to do just that at:

http://www.flawlesscode.com/post/2008/03/Silverlight-2-Navigating-Between-Xaml-Pages.aspx

It's a pretty simple, yet effective, concept.  On Application_Startup instead of setting the RootVisual to a new instance of Page, you set it to a new Grid control, and add a new Page as a child control of the Grid. 

In my case, I wanted to maintain a UI XAML that contains my elements that need to be repeated on each "page" (master page type XAML?)  To do so, I simply added another child control (my "page" XAML) and then I don't remove the initial Page reference from the RootVisual controls.

root = Application.Current.RootVisual as Grid;

UserControl oldPage = root.Children[0] as UserControl;root.Children.Add(

new Home());

//root.Children.Remove(oldPage); // This is where I don't unload the "oldPage" which in my case is my repeatable UI XAML.


Tags: ,
Categories: Work
Actions: Permalink | Comments (0) |

Silverlight and scaling to the browser dimensions

May 9, 2008 12:35 AM by Mike

I had a nice long post typed out, and while attempting to make a small change to the code I was going to paste in, I ended up killing the debug process that I had the post opened in a new tab, so as much as I remember will have to be retyped:

Recently our Flash projects have been given a requirement that they resize to the browser.  In the past, someone would pick a resolution (often times neglecting to account for the browser chrome) and the flash was done as a fixed width/height element.  The last 2 projects I've worked with have been required to scale with the browser.

One such project is the same one that I've decided to prototype in Silverlight.  It's the Donor Garden that we worked on for the National Marrow Donor Program® (which is a great organization, and you should really think about joining the registry and potentially saving someone's life!)

I really have taken for granted in the past 8 or so years that the browsers HTML rendering engine handles the repositioning of elements on a browser resize.  I really haven't had to think about this problem since my VB 4/5/6 days and developing Windows apps.  So tonight was a fun little stroll back down memory lane.

It's pretty straight forward, subscribe to the Canvas's SizeChanged event, and reposition/resize elements based on the new size.  The SizeChangedEventArgs contains both the new size and the old size, although I am currently only using the NewSize to get the Width and Height.

Here's the start of my code:

private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e)

{

if (e.NewSize.Width < 778 || e.NewSize.Height < 450)

{

status.Text = "Elements need resized.";

}

if (e.NewSize.Width > GrassImage.Width)

{

GrassImage.Width = e.NewSize.Width;

}

GrassImage.SetValue(Canvas.TopProperty, e.NewSize.Height - GrassImage.Height - 32);

HeaderCanvas.Width = e.NewSize.Width;

FooterCanvas.SetValue(Canvas.TopProperty, e.NewSize.Height - 32);

FooterCanvas.Width = e.NewSize.Width;

}


Tags:
Categories: Work
Actions: Permalink | Comments (0) |

Finding projects to prototype

May 7, 2008 11:57 PM by Mike

Whenever I am trying to learn a new technology, I find myself needing to learn by example to actually understand how it all works.  My biggest problem with this is finding a good project that I can prototype/experiment with. 

Trying to learn more about Silverlight and what I can all do with it, I've been struggling to come up with a perfect application to develop.  I think I am going to take one of the projects we've done previously in Flash, and replicate the solution in Silverlight.  This should give me some good feedback on the development time difference (taking into account the learning curve for me to learn exactly what I am doing) and also give me a good side-by-side comparison when completed.

I hope to really demonstrate the strengths of Silverlight versus Flash development, especially from an agency standpoint.


Tags:
Categories: Work
Actions: Permalink | Comments (0) |

New Blog Engine

May 7, 2008 11:17 PM by Mike

I've finally broke down, and decided to stop using my homemade solution for a blog engine.

It started out as many other personal projects of mine have.  I had grand visions of creating a great custom solution that would do everything I wanted.  I got a good starting point one night, and got enough functionality to live with it until I had more time to revise it.  Fast forward exactly 6 months, and here we are.  I never got around to finishing my homemade solution, and tonight decided to install BlogEngine.net and so far it seems to have some of the features I never got to implementing!

 One of the features I especially was looking for is Categories and Tagging.  I've found myself mixing personal and work blogging, and frankly, I don't have enough content to warrant two blogs (it may not even be enough to warrant one blog.)  So, this way, people in my personal life who don't care about my work ramblings can filter them out, and those who only want to read about my work bloggings can.

Editing is another nice feature that I never got around to implementing in my homemade blog engine.  Oh, this is nice to be able to edit posts! 


Tags:
Categories: Other
Actions: Permalink | Comments (0) |