Click here to Skip to main content
15,885,216 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Mouse Down event Pin
Abhinav S26-Oct-13 1:19
Abhinav S26-Oct-13 1:19 
GeneralRe: Mouse Down event Pin
Ashfaque Hussain26-Oct-13 7:44
Ashfaque Hussain26-Oct-13 7:44 
AnswerRe: Mouse Down event Pin
Abhinav S26-Oct-13 18:13
Abhinav S26-Oct-13 18:13 
AnswerRe: Mouse Down event Pin
_Maxxx_27-Oct-13 19:11
professional_Maxxx_27-Oct-13 19:11 
GeneralRe: Mouse Down event Pin
Mycroft Holmes27-Oct-13 19:21
professionalMycroft Holmes27-Oct-13 19:21 
GeneralRe: Mouse Down event Pin
_Maxxx_27-Oct-13 20:50
professional_Maxxx_27-Oct-13 20:50 
GeneralRe: Mouse Down event Pin
Pete O'Hanlon28-Oct-13 0:23
mvePete O'Hanlon28-Oct-13 0:23 
AnswerRe: Mouse Down event Pin
Meshack Musundi27-Oct-13 20:16
professionalMeshack Musundi27-Oct-13 20:16 
You could use interaction triggers;
XML
<Window x:Class="MainWindow"    
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions">
...
  <Button Name="DeleteButton" Content="Delete" Height="25" Width="60">
      <i:Interaction.Triggers>               
          <i:EventTrigger EventName="MouseDown">
              <ei:CallMethodAction MethodName="Delete" TargetObject="{Binding}"/>
          </i:EventTrigger>
      </i:Interaction.Triggers>
  </Button>
...

In the ViewModel;
C#
public class MainWindowViewModel
{
  public void Delete()
  {
    //Do something
  }
}

"As beings of finite lifespan, our contributions to the sum of human knowledge is one of the greatest endeavors we can undertake and one of the defining characteristics of humanity itself"

GeneralRe: Mouse Down event Pin
Ashfaque Hussain27-Oct-13 21:35
Ashfaque Hussain27-Oct-13 21:35 
GeneralRe: Mouse Down event Pin
Ashfaque Hussain7-Nov-13 23:00
Ashfaque Hussain7-Nov-13 23:00 
QuestionHow to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
Deepak B V24-Oct-13 4:42
Deepak B V24-Oct-13 4:42 
AnswerRe: How to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
Pete O'Hanlon24-Oct-13 5:32
mvePete O'Hanlon24-Oct-13 5:32 
GeneralRe: How to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
SledgeHammer0124-Oct-13 7:20
SledgeHammer0124-Oct-13 7:20 
QuestionHow to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 4:01
Ashfaque Hussain24-Oct-13 4:01 
AnswerRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 4:08
mvePete O'Hanlon24-Oct-13 4:08 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 4:15
Ashfaque Hussain24-Oct-13 4:15 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 4:20
mvePete O'Hanlon24-Oct-13 4:20 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
SledgeHammer0124-Oct-13 4:55
SledgeHammer0124-Oct-13 4:55 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 5:00
mvePete O'Hanlon24-Oct-13 5:00 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
_Maxxx_27-Oct-13 19:14
professional_Maxxx_27-Oct-13 19:14 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 19:29
Ashfaque Hussain24-Oct-13 19:29 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 22:09
mvePete O'Hanlon24-Oct-13 22:09 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain13-Nov-13 23:29
Ashfaque Hussain13-Nov-13 23:29 
QuestionSend content of button from View to ViewModel Pin
Ashfaque Hussain23-Oct-13 5:30
Ashfaque Hussain23-Oct-13 5:30 
AnswerRe: Send content of button from View to ViewModel Pin
Kenneth Haugland23-Oct-13 6:00
mvaKenneth Haugland23-Oct-13 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.