Silverlight MVVM - Button Enable & Visibility properties
So I'm working in MVVM application & I'm starting to put some of the shine & polish on the functionality. 

On the left side of my page, I am displaying these values:

    DateActivated
    DateCompleted
    DateTrialClosed
    DateAccountingClosed

If there's a date in the DB, I'm displaying it in a textblock. If there's not, I'm displaying a button to the user, saying "Activate Work Order", "Complete Work Order", etc...

I'm binding the visibility of each of these 8 (4 textblock, 4 button) controls to a unique property in my ViewModel of type Windows.Visibility. In my setter of the SelectedWorkOrder, I evaluate the current value of the SelectedWorkOrder.DateActivated property (for example) and set the visibility properties accordingly. This is slightly verbose for me, but it's working as expected.

My next step is to disable any visible buttons after the first one (logic is simple... can't click button 2 until button 1 has been clicked. Can't click button 3 until both 1 & 2 have been clicked). I'm not sure what the best way to implement this is. As an FYI on this, I have a boolToVisibility value converter already in my project... I'm just not sure that implementing it would be any different than I am doing now (see VM code below). 

Currently I have this for my XAML: 

    <TextBlock Text="Proposed:" />
    <TextBlock Text="Activated:" />
    <TextBlock Text="Eng Completed:" />
    <TextBlock Text="Trial Close:" />
    <TextBlock Text="Accounting Close:" />
    <TextBlock Text="{Binding SelectedWorkOrder.EstimatedStartDate}" Visibility="{Binding ProposedVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateActivated}" Visibility="{Binding ActivatedTextBlockVisibility}" />
    <Button Content="Activate Work Order" Visibility="{Binding ActivatedButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateCompleted}" Visibility="{Binding EngineeringCompletedTextBlockVisibility}" />
    <Button Content="Work Order Eng Complete" Visibility="{Binding EngineeringCompletedButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateClosed}" Visibility="{Binding TrialCloseTextBlockVisibility}" />
    <Button Content="Close Work Order (Trial)" Visibility="{Binding TrialCloseButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateClosed}" Visibility="{Binding AccountingCloseTextBlockVisibility}" />
    <Button Content="Close Work Order (Actual)" Visibility="{Binding AccountingCloseButtonVisibility}" />

VM Code:

    if (_SelectedWorkOrder.DateActivated.ToShortDateString() != "1/1/0001")
    {
        ActivatedTextBlockVisibility = Visibility.Visible;
        ActivatedButtonVisibility = Visibility.Collapsed;
    }
    else
    {
        ActivatedTextBlockVisibility = Visibility.Collapsed;
        ActivatedButtonVisibility = Visibility.Visible;
    }

(The date is set to 1/1/0001 in my database access layer as I'm instantiating a new DateTime if "Is DBNull.Value  = true")

Cheers,

SS
Silverlight MVVM - Button Enable & Visibility properties
===

So I'm working in MVVM application & I'm starting to put some of the shine & polish on the functionality. 

On the left side of my page, I am displaying these values:

    DateActivated
    DateCompleted
    DateTrialClosed
    DateAccountingClosed

If there's a date in the DB, I'm displaying it in a textblock. If there's not, I'm displaying a button to the user, saying "Activate Work Order", "Complete Work Order", etc...

I'm binding the visibility of each of these 8 (4 textblock, 4 button) controls to a unique property in my ViewModel of type Windows.Visibility. In my setter of the SelectedWorkOrder, I evaluate the current value of the SelectedWorkOrder.DateActivated property (for example) and set the visibility properties accordingly. This is slightly verbose for me, but it's working as expected.

My next step is to disable any visible buttons after the first one (logic is simple... can't click button 2 until button 1 has been clicked. Can't click button 3 until both 1 & 2 have been clicked). I'm not sure what the best way to implement this is. As an FYI on this, I have a boolToVisibility value converter already in my project... I'm just not sure that implementing it would be any different than I am doing now (see VM code below). 

Currently I have this for my XAML: 

    <TextBlock Text="Proposed:" />
    <TextBlock Text="Activated:" />
    <TextBlock Text="Eng Completed:" />
    <TextBlock Text="Trial Close:" />
    <TextBlock Text="Accounting Close:" />
    <TextBlock Text="{Binding SelectedWorkOrder.EstimatedStartDate}" Visibility="{Binding ProposedVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateActivated}" Visibility="{Binding ActivatedTextBlockVisibility}" />
    <Button Content="Activate Work Order" Visibility="{Binding ActivatedButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateCompleted}" Visibility="{Binding EngineeringCompletedTextBlockVisibility}" />
    <Button Content="Work Order Eng Complete" Visibility="{Binding EngineeringCompletedButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateClosed}" Visibility="{Binding TrialCloseTextBlockVisibility}" />
    <Button Content="Close Work Order (Trial)" Visibility="{Binding TrialCloseButtonVisibility}" />
    <TextBlock Text="{Binding SelectedWorkOrder.DateClosed}" Visibility="{Binding AccountingCloseTextBlockVisibility}" />
    <Button Content="Close Work Order (Actual)" Visibility="{Binding AccountingCloseButtonVisibility}" />

VM Code:

    if (_SelectedWorkOrder.DateActivated.ToShortDateString() != "1/1/0001")
    {
        ActivatedTextBlockVisibility = Visibility.Visible;
        ActivatedButtonVisibility = Visibility.Collapsed;
    }
    else
    {
        ActivatedTextBlockVisibility = Visibility.Collapsed;
        ActivatedButtonVisibility = Visibility.Visible;
    }

(The date is set to 1/1/0001 in my database access layer as I'm instantiating a new DateTime if "Is DBNull.Value  = true")

Cheers,

SS