Click here to Skip to main content
15,176,980 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Installer Project Problem Pin
Mycroft Holmes14-Mar-20 13:17
professionalMycroft Holmes14-Mar-20 13:17 
GeneralRe: Installer Project Problem Pin
Kevin Marois16-Mar-20 7:36
professionalKevin Marois16-Mar-20 7:36 
AnswerRe: Installer Project Problem Pin
Richard Deeming16-Mar-20 10:37
mveRichard Deeming16-Mar-20 10:37 
GeneralRe: Installer Project Problem Pin
Kevin Marois16-Mar-20 11:57
professionalKevin Marois16-Mar-20 11:57 
GeneralRe: Installer Project Problem Pin
Mycroft Holmes16-Mar-20 12:05
professionalMycroft Holmes16-Mar-20 12:05 
QuestionAForge VideoSourcePlayer Pin
Kevin Marois11-Mar-20 14:56
professionalKevin Marois11-Mar-20 14:56 
QuestionTextBox DynamicResource Not Working Pin
Kevin Marois19-Feb-20 9:39
professionalKevin Marois19-Feb-20 9:39 
QuestionDock DataGrid's column to the right Pin
Mc_Topaz9-Feb-20 22:46
MemberMc_Topaz9-Feb-20 22:46 
AnswerRe: Dock DataGrid's column to the right Pin
Gerry Schmitz10-Feb-20 3:33
mveGerry Schmitz10-Feb-20 3:33 
AnswerRe: Dock DataGrid's column to the right Pin
Richard Deeming10-Feb-20 9:55
mveRichard Deeming10-Feb-20 9:55 
GeneralRe: Dock DataGrid's column to the right Pin
Mc_Topaz10-Feb-20 22:24
MemberMc_Topaz10-Feb-20 22:24 
Question[WPF] Datagrid With Dynamic column Pin
mjaniaut4-Feb-20 20:57
Membermjaniaut4-Feb-20 20:57 
AnswerRe: [WPF] Datagrid With Dynamic column Pin
Gerry Schmitz4-Feb-20 22:21
mveGerry Schmitz4-Feb-20 22:21 
AnswerRe: [WPF] Datagrid With Dynamic column Pin
Richard Deeming5-Feb-20 1:48
mveRichard Deeming5-Feb-20 1:48 
QuestionIm new bie help me fix 1 erorr on wpf, i cant do it? Pin
Member 1468037212-Jan-20 17:07
MemberMember 1468037212-Jan-20 17:07 
GeneralRe: Im new bie help me fix 1 erorr on wpf, i cant do it? Pin
Richard MacCutchan12-Jan-20 23:12
mveRichard MacCutchan12-Jan-20 23:12 
AnswerRe: Im new bie help me fix 1 erorr on wpf, i cant do it? Pin
ZurdoDev13-Jan-20 2:07
professionalZurdoDev13-Jan-20 2:07 
QuestionRoutedEvent Pass EventArg Pin
Kevin Marois11-Jan-20 17:42
professionalKevin Marois11-Jan-20 17:42 
I have added a Routed Event to a user control:
public static readonly RoutedEvent ItemChangedEvent =
            EventManager.RegisterRoutedEvent("ItemChanged",
            RoutingStrategy.Bubble,
            typeof(RoutedEventHandler),
            typeof(DropDownEntryView));

public event RoutedEventHandler ItemChanged
{
    add { AddHandler(ItemChangedEvent, value); }
    remove { RemoveHandler(ItemChangedEvent, value); }
}

private void RaiseItemChangedEvent(string newValue, string oldValue)
{
    var args = new ItemChangedEventArgs(ItemChangedEvent, newValue, oldValue);
    RaiseEvent(args);
}
Here is the ItemChangedEventArgs class:
public class ItemChangedEventArgs : RoutedEventArgs
{
    public string NewValue { get; private set; }

    public string OldValue { get; private set; }

    public ItemChangedEventArgs(RoutedEvent routedEvent, string newValue, string oldValue)
        : base(routedEvent)
    {
        NewValue = newValue;
        OldValue = OldValue;
    }
}
The XAML
<ctrls:DropDownEntryView Grid.Column="0" 
                            Items="{Binding DataContext.EmailItems, 
                                            ElementName=clientsView,  
                                            Mode=TwoWay, 
                                            UpdateSourceTrigger=PropertyChanged}" 
                            EditBarCaption="Edit Emails..."
                            ShowEditBar="True"
                            ItemCategoryKey="email_types"
                            HorizontalAlignment="Left"
                            Width="400"
                            Margin="5">

<pre>
<i:Interaction.Triggers>
    <i:EventTrigger EventName="ItemChanged">
        <i:InvokeCommandAction Command="{Binding ElementName=clientsView, Path=DataContext.EmailItemChangedCommand}" 
                                CommandParameter="{Binding}"/>
    </i:EventTrigger>
</i:Interaction.Triggers>



How do I pass the ItemChangedEventArgs in the XAML?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: RoutedEvent Pass EventArg Pin
Gerry Schmitz11-Jan-20 21:24
mveGerry Schmitz11-Jan-20 21:24 
GeneralRe: RoutedEvent Pass EventArg Pin
Kevin Marois12-Jan-20 11:05
professionalKevin Marois12-Jan-20 11:05 
GeneralRe: RoutedEvent Pass EventArg Pin
Gerry Schmitz13-Jan-20 14:23
mveGerry Schmitz13-Jan-20 14:23 
GeneralRe: RoutedEvent Pass EventArg Pin
Kevin Marois14-Jan-20 6:18
professionalKevin Marois14-Jan-20 6:18 
GeneralRe: RoutedEvent Pass EventArg Pin
Kevin Marois14-Jan-20 6:43
professionalKevin Marois14-Jan-20 6:43 
AnswerRe: RoutedEvent Pass EventArg Pin
Richard Deeming13-Jan-20 9:00
mveRichard Deeming13-Jan-20 9:00 
GeneralRe: RoutedEvent Pass EventArg Pin
Kevin Marois14-Jan-20 10:02
professionalKevin Marois14-Jan-20 10:02 

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.