Tim Hibbard

Software Architect for EnGraph software


News





Add to Google



My Stats

  • Posts - 593
  • Comments - 353
  • Trackbacks - 507

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll


December 2007 Entries

Engaged!


Tim and Chelsea

After a couple years of dating and exactly one year of living together, Chelsea and I got engaged yesterday.  We are planning a small beach wedding off the North Carolina coast in March 2008.  She's always wanted a beach wedding, and well, that's all that counts.  Plus we found this really cool self proclaimed hippie beach bum to perform the ceremony.

This will be the third EnGraph wedding in as many years.  Kyle and Allie got married in 2006 and David married Becca last May.

After working at EnGraph for almost half a decade, I am very used to capitalizing the 'G' on words that begin with "eng".  Correctly typing "engaged" is going to require some training.  I'm sure Kyle will attest to the same thing.

Official website, date and location will be coming shortly.

posted @ Monday, December 31, 2007 12:32 PM | Feedback (7) |


Upgrading to TFS 2008 - Build server unavailable


After we upgraded our server to Team Foundation Server 2008, our builds were failing.  To be more specific, our builds were failing for lots of reasons, but the first problem was that the build server was unavailable.  

We needed to stop the Team Build Service - the build service for TFS 2005 (and set the startup type to manual), before starting the Visual Studio Team Foundation Build service - the build service for TFS 2008.

 

Technorati tags: , ,

posted @ Tuesday, December 18, 2007 1:36 PM | Feedback (1) | Filed Under [ TFS ]


Liberty Mutual 2007 Coach of the Year - Give Mangino some love


Mark Mangino

Rock chalk!

 

posted @ Tuesday, December 11, 2007 4:26 PM | Feedback (0) | Filed Under [ Sports ]


WPF - Show/Hide element based on CheckBox.Checked


A lot of times, I need to show or hide a textbox based the value of a checkbox. 

unchecked

checked

 

 

In WinForms 2.0.  This was easy:

 

myTextBox.Visible = myCheckBox.Checked;

With the new Visibility Enum in WPF, this becomes a bit trickier.  To accomplish this, you need to implement a converter that will accept a boolean value and return a visibility value.  The converter I used is here:

 

using System; using System.Collections.Generic; using System.Text; using System.Windows.Data; using System.Windows; namespace ParaPlan.Converters { public class BooleanToHiddenVisibility : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { Visibility rv = Visibility.Visible; try { var x = bool.Parse(value.ToString()); if (x) { rv = Visibility.Visible; } else { rv = Visibility.Collapsed; } } catch (Exception) { } return rv; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } } }

 

The XAML code to use this is below.  The important parts are:
xmlns:converters="clr-namespace:ParaPara.Converters"
converters:BooleanToHiddenVisibility x:Key="boolToVis"
TextBox ... Visibility={Binding Path=IsChecked, ElementName=checkViewTextBox...}"

 

<Window x:Class="ParaPlan.Windows.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" xmlns:converters="clr-namespace:ParaPlan.Converters"> <StackPanel Orientation="Vertical"> <StackPanel.Resources> <converters:BooleanToHiddenVisibility x:Key="boolToVis"/> </StackPanel.Resources> <CheckBox Content="Check to show text box below me" Name="checkViewTextBox"/> <TextBox Text="only seen when above checkbox is checked" Visibility="{Binding Path=IsChecked, ElementName=checkViewTextBox, Converter={StaticResource boolToVis}}"/> </StackPanel> </Window>

 

Now we can cleanly show or hide an element based on a checkbox using just XAML code.

 

Technorati tags: , ,

posted @ Monday, December 10, 2007 11:24 AM | Feedback (3) | Filed Under [ .NET WPF ]