Click here to Skip to main content
15,907,328 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Databinding driving me crazy! Pin
ColinM1238-Oct-08 12:32
ColinM1238-Oct-08 12:32 
AnswerRe: Databinding driving me crazy! Pin
esjq9-Oct-08 10:25
esjq9-Oct-08 10:25 
GeneralRe: Databinding driving me crazy! Pin
Pete O'Hanlon9-Oct-08 22:01
mvePete O'Hanlon9-Oct-08 22:01 
QuestionMoXAML Power Toys 2 just released. Pin
Pete O'Hanlon7-Oct-08 12:11
mvePete O'Hanlon7-Oct-08 12:11 
AnswerRe: MoXAML Power Toys 2 just released. Pin
Mark Salsbery8-Oct-08 13:03
Mark Salsbery8-Oct-08 13:03 
GeneralRe: MoXAML Power Toys 2 just released. Pin
Pete O'Hanlon8-Oct-08 21:44
mvePete O'Hanlon8-Oct-08 21:44 
GeneralRe: MoXAML Power Toys 2 just released. Pin
User 27100910-Oct-08 0:40
User 27100910-Oct-08 0:40 
QuestionUIElement and InotifyPropertyChanged Pin
ezazazel7-Oct-08 2:07
ezazazel7-Oct-08 2:07 
Greetings!
I have a class which derives from UIElement (I thought I keep it slim)
which has two DependencyProperties.
What I want to do is, that I can hook up to the event when one of those dp values changed.
Can't get it done because INotifyPropertyChanged does not allow the Implementation set static.

Background is, that when one of the n Melements changes it's PositionXValue, different Methods have to be called

 class MElement :UIElement, INotifyPropertyChanged
    {
 public static readonly DependencyProperty PositionXProperty = DependencyProperty.Register(
            "PositionX",
            typeof(int),
            typeof(MElement),
            new FrameworkPropertyMetadata(
            new PropertyChangedCallback(OnPositionChanged))
            );

        public int PositionX
        {
            get { return (int)this.GetValue(PositionXProperty); }
            set { this.SetValue(PositionXProperty, value); }
        }

public event PropertyChangedEventHandler PropertyChanged;

private static void OnPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (PropertyChanged !=null) //this won't work, which makes sense - but doens' allow to be declared static
               {
                  // fire PropertyChanged event
               }
        }
}


Maybe I misunderstood the concept of this, but isn't this the way it was meant to be?
AnswerRe: UIElement and InotifyPropertyChanged Pin
Insincere Dave7-Oct-08 6:48
Insincere Dave7-Oct-08 6:48 
GeneralRe: UIElement and InotifyPropertyChanged Pin
ezazazel7-Oct-08 7:08
ezazazel7-Oct-08 7:08 
GeneralControl in ItemTemplate can't bind to owner control dependency property? [modified] Pin
Zvorko7-Oct-08 1:31
Zvorko7-Oct-08 1:31 
AnswerRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 0:45
User 27100910-Oct-08 0:45 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 0:52
Zvorko10-Oct-08 0:52 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 0:54
User 27100910-Oct-08 0:54 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 1:27
Zvorko10-Oct-08 1:27 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 1:33
User 27100910-Oct-08 1:33 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 1:43
Zvorko10-Oct-08 1:43 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 1:46
User 27100910-Oct-08 1:46 
GeneralReg:Voicechat application Integration Pin
Member 45820567-Oct-08 0:53
Member 45820567-Oct-08 0:53 
GeneralRe: Reg:Voicechat application Integration Pin
Pete O'Hanlon7-Oct-08 1:59
mvePete O'Hanlon7-Oct-08 1:59 
QuestionHow to update tabindex Pin
Cari796-Oct-08 2:23
Cari796-Oct-08 2:23 
AnswerRe: How to update tabindex Pin
Cari797-Oct-08 22:10
Cari797-Oct-08 22:10 
QuestionError while running WPF, DirectShowNet application in Vista Pin
Vishaal K. Menon6-Oct-08 0:07
Vishaal K. Menon6-Oct-08 0:07 
QuestionXAML Power Toys 3.1.0.2 Has Silverlight 2 Support! Pin
User 2710095-Oct-08 12:56
User 2710095-Oct-08 12:56 
AnswerRe: XAML Power Toys 3.1.0.2 Has Silverlight 2 Support! Pin
Syed Mehroz Alam8-Oct-08 19:02
Syed Mehroz Alam8-Oct-08 19: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.