Click here to Skip to main content
12,403,295 members (73,010 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NET3.0 ASP.NET .NET WCF WPF , +
Hi All,

I am new in silverlight 3.0 ,I want to Command Property bind using MVVM Pattern in Silverlight 3.0.

I have found some solution in google as below
1.
a. add in xaml - xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
b.
<Button x:Name="Submit" Content="Submit"    ClickMode="Press" Grid.Row="4" >
           <i:Interaction.Triggers>
               <i:EventTrigger EventName="Click">
                   <i:InvokeCommandAction Command=""
                               CommandParameter="{Binding Click, ElementName=Submit}"/>
               </i:EventTrigger>
           </i:Interaction.Triggers>
           <!--</i:KeyTriggerFiredOn>
               <i:EventTrigger EventName="Click">
                   <ei:CallMethodAction   TargetObject="{Binding}" MethodName="ShowCustomer"/>
               </i:EventTrigger>
           </i:Interaction.Triggers>-->
       </Button>

2.

<Button x:Name="Submit" Content="Submit" ClickMode="Press" Command="Submit" Grid.Row="4" ></Button>

Above code is also not working. However Command Property is not in Silverlight 3.0


Can you please suggest me so that i can bind Command Property easily in Silverlight 3.0
Posted 1-Oct-12 2:10am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hello,

You should read this : Data and Command Bindings for Silverlight MVVM Applications[^]

Best regards,
Tarik
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 23 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100