Click here to Skip to main content
15,558,870 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Mouse Down event Pin
Abhinav S26-Oct-13 2:19
Abhinav S26-Oct-13 2:19 
GeneralRe: Mouse Down event Pin
Ashfaque Hussain26-Oct-13 8:44
Ashfaque Hussain26-Oct-13 8:44 
AnswerRe: Mouse Down event Pin
Abhinav S26-Oct-13 19:13
Abhinav S26-Oct-13 19:13 
AnswerRe: Mouse Down event Pin
_Maxxx_27-Oct-13 20:11
professional_Maxxx_27-Oct-13 20:11 
GeneralRe: Mouse Down event Pin
Mycroft Holmes27-Oct-13 20:21
professionalMycroft Holmes27-Oct-13 20:21 
GeneralRe: Mouse Down event Pin
_Maxxx_27-Oct-13 21:50
professional_Maxxx_27-Oct-13 21:50 
GeneralRe: Mouse Down event Pin
Pete O'Hanlon28-Oct-13 1:23
mvaPete O'Hanlon28-Oct-13 1:23 
AnswerRe: Mouse Down event Pin
Meshack Musundi27-Oct-13 21:16
professionalMeshack Musundi27-Oct-13 21: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 22:35
Ashfaque Hussain27-Oct-13 22:35 
GeneralRe: Mouse Down event Pin
Ashfaque Hussain8-Nov-13 0:00
Ashfaque Hussain8-Nov-13 0:00 
QuestionHow to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
Deepak B V24-Oct-13 5:42
Deepak B V24-Oct-13 5:42 
AnswerRe: How to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
Pete O'Hanlon24-Oct-13 6:32
mvaPete O'Hanlon24-Oct-13 6:32 
GeneralRe: How to set minwidth of GridViewColumnHeader while resizing column header in ListView Pin
SledgeHammer0124-Oct-13 8:20
SledgeHammer0124-Oct-13 8:20 
QuestionHow to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 5:01
Ashfaque Hussain24-Oct-13 5:01 
AnswerRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 5:08
mvaPete O'Hanlon24-Oct-13 5:08 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 5:15
Ashfaque Hussain24-Oct-13 5:15 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 5:20
mvaPete O'Hanlon24-Oct-13 5:20 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
SledgeHammer0124-Oct-13 5:55
SledgeHammer0124-Oct-13 5:55 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 6:00
mvaPete O'Hanlon24-Oct-13 6:00 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
_Maxxx_27-Oct-13 20:14
professional_Maxxx_27-Oct-13 20:14 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain24-Oct-13 20:29
Ashfaque Hussain24-Oct-13 20:29 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Pete O'Hanlon24-Oct-13 23:09
mvaPete O'Hanlon24-Oct-13 23:09 
GeneralRe: How to Show/Hide stack pannel from ViewModel?? Pin
Ashfaque Hussain14-Nov-13 0:29
Ashfaque Hussain14-Nov-13 0:29 
QuestionSend content of button from View to ViewModel Pin
Ashfaque Hussain23-Oct-13 6:30
Ashfaque Hussain23-Oct-13 6:30 
AnswerRe: Send content of button from View to ViewModel Pin
Kenneth Haugland23-Oct-13 7:00
mvaKenneth Haugland23-Oct-13 7: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.