This is a migrated thread and some comments may be shown as answers.

Why the HyplinkButton are disabled?

0 Answers 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
redstar
Top achievements
Rank 1
redstar asked on 04 May 2011, 03:34 AM


<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;
            }
        }
    }

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
redstar
Top achievements
Rank 1
Share this question
or