Why the HyplinkButton are disabled?

1 posts, 0 answers
  1. redstar
    redstar avatar
    18 posts
    Member since:
    Feb 2011

    Posted 03 May 2011 Link to this post



    <UserControl.Resources>
            <common:MyCommands x:Key="MyCommands"/>
        </UserControl.Resources>

    <DataTemplate>
             <HyperlinkButton Content="{Binding Name}" Command="{Binding ClientDetailCommand, Source={StaticResource MyCommands}}" CommandParameter="{Binding Id}" Style="{StaticResource GridHyperLink}"/>
    </DataTemplate>

    public class MyCommands
        {
            private static RoutedUICommand clientDetailCommand;
     
            public static RoutedUICommand ClientDetailCommand
            {
                get
                {
                    if (clientDetailCommand == null)
                    {
                        clientDetailCommand = new RoutedUICommand("ClientDetailCommand", "ClientDetailCommand", typeof(MyCommands));
                    }
                    return clientDetailCommand;
                }
            }
        }
Back to Top