Click here to Skip to main content
13,004,625 members (71,263 online)

Silverlight / WPF

 
Questionarrange elements inside wpf Pin
Remix Mixdox1-Feb-13 22:27
memberRemix Mixdox1-Feb-13 22:27 
AnswerRe: arrange elements inside wpf Pin
Abhinav S3-Feb-13 7:02
mvpAbhinav S3-Feb-13 7:02 
QuestionCustom Controls Pin
Sawyer19881-Feb-13 7:05
memberSawyer19881-Feb-13 7:05 
QuestionApplication Launcher Pin
Mycroft Holmes31-Jan-13 13:49
memberMycroft Holmes31-Jan-13 13:49 
AnswerRe: Application Launcher Pin
Abhinav S1-Feb-13 8:22
mvpAbhinav S1-Feb-13 8:22 
QuestionWPF controls refresh Pin
caradri31-Jan-13 1:50
membercaradri31-Jan-13 1:50 
AnswerRe: WPF controls refresh Pin
Pete O'Hanlon31-Jan-13 2:44
protectorPete O'Hanlon31-Jan-13 2:44 
GeneralRe: WPF controls refresh Pin
caradri31-Jan-13 10:20
membercaradri31-Jan-13 10:20 
GeneralRe: WPF controls refresh Pin
Richard Deeming31-Jan-13 11:25
memberRichard Deeming31-Jan-13 11:25 
GeneralRe: WPF controls refresh Pin
caradri2-Feb-13 17:59
membercaradri2-Feb-13 17:59 
GeneralRe: WPF controls refresh Pin
caradri3-Feb-13 20:16
membercaradri3-Feb-13 20:16 
QuestionRoutedEvent vs AttachedEvent Pin
devvvy29-Jan-13 22:30
memberdevvvy29-Jan-13 22:30 
AnswerRe: RoutedEvent vs AttachedEvent Pin
Pete O'Hanlon29-Jan-13 22:51
protectorPete O'Hanlon29-Jan-13 22:51 
GeneralRe: RoutedEvent vs AttachedEvent Pin
devvvy29-Jan-13 23:02
memberdevvvy29-Jan-13 23:02 
Pete O'Hanlon wrote:


So, what is an attached event? Well, basically, it's an event that can be attached to another element without the other element having to be aware that this capability is present. If you think about it as being like an attached property for events then it starts to make sense. So, why do we have this? Well, it allows you to extend WPF through composition rather than inheritance.


I understand perfect "Grid.Row" is an "Attached Property" that it's not a property of "TextBox" itself for instance. I understand analogy when this concept extended to "Events". However - what's confusing is the SYNTAX: you can define an event handler to a RoutedEvent the same way/syntax as you would with AttachedEvent.

But if you see the sample I gave in MainWindow.xaml, I can subscribe to "AttachedEvent" and "RoutedEvent" from xaml in same syntax - the syntax which does not require "Instance" of "GrandChild" (i.e. "MainWindow" does NOT implement event GrandChildRoutedEvClick itself, which is declared in "GrandChild")

From MainWindow.xaml, "RoutedEvent" handler setup like this:
<br />
   local:GrandChild.GrandChildRoutedEvClick="GrandChild_GrandChildRoutedEvClick"<br />


From MainWindow.xaml, "AttachedEvent" handler setup like this:
<br />
local:GrandChild.GrandChildAttachedEvClick="GrandChildAttachedEvClickHandler" <br />


Despite in "MiddleChild.xaml", I setup handler to "RoutedEvent" the "Propery way"... what's real diff between Routed/AttachedEvent besides phylosophical or syntactical ...?
<br />
[local:GrandChild x:Name="Junior" VerticalAlignment="Stretch" GrandChildRoutedEvClick="GrandChild_GrandChildRoutedEvClick"/]<br />


What I am saying is, you can define a DockStateChanged event with syntax of a "RoutedEvent" - not "AttachedEvent", and in some parent control couple layers up, setup event handler using syntax as you would consuming an "AttachedEvent"

dev


modified 30-Jan-13 5:11am.

GeneralRe: RoutedEvent vs AttachedEvent Pin
Pete O'Hanlon30-Jan-13 0:45
protectorPete O'Hanlon30-Jan-13 0:45 
GeneralRe: RoutedEvent vs AttachedEvent Pin
devvvy30-Jan-13 2:40
memberdevvvy30-Jan-13 2:40 
GeneralRe: RoutedEvent vs AttachedEvent Pin
Pete O'Hanlon30-Jan-13 2:44
protectorPete O'Hanlon30-Jan-13 2:44 
GeneralRe: RoutedEvent vs AttachedEvent Pin
devvvy30-Jan-13 3:08
memberdevvvy30-Jan-13 3:08 
QuestionWPF Tab Item Close Button Pin
Kevin Marois29-Jan-13 18:03
memberKevin Marois29-Jan-13 18:03 
AnswerRe: WPF Tab Item Close Button Pin
SledgeHammer0129-Jan-13 19:02
memberSledgeHammer0129-Jan-13 19:02 
GeneralRe: WPF Tab Item Close Button Pin
Kevin Marois2-Feb-13 15:33
memberKevin Marois2-Feb-13 15:33 
GeneralRe: WPF Tab Item Close Button Pin
SledgeHammer012-Feb-13 18:25
memberSledgeHammer012-Feb-13 18:25 
QuestionCustom Control Template for beginners Pin
jeffdavis870329-Jan-13 9:12
memberjeffdavis870329-Jan-13 9:12 
AnswerRe: Custom Control Template for beginners Pin
SledgeHammer0129-Jan-13 11:32
memberSledgeHammer0129-Jan-13 11:32 
GeneralRe: Custom Control Template for beginners Pin
jeffdavis870329-Jan-13 12:10
memberjeffdavis870329-Jan-13 12:10 
GeneralRe: Custom Control Template for beginners Pin
SledgeHammer0129-Jan-13 12:46
memberSledgeHammer0129-Jan-13 12:46 
GeneralTreeview Selection Pin
vijilvs11628-Jan-13 23:03
membervijilvs11628-Jan-13 23:03 
QuestionProblem With TreeViewItem Tooltip Pin
Kevin Marois26-Jan-13 15:39
memberKevin Marois26-Jan-13 15:39 
GeneralRe: Problem With TreeViewItem Tooltip Pin
Thomas Duwe29-Jan-13 1:46
memberThomas Duwe29-Jan-13 1:46 
QuestionHow to get a value from treeview. Pin
boryborawski26-Jan-13 12:06
memberboryborawski26-Jan-13 12:06 
QuestionConstant header and footer Pin
columbos1492725-Jan-13 23:11
membercolumbos1492725-Jan-13 23:11 
AnswerRe: Constant header and footer Pin
Richard MacCutchan26-Jan-13 0:05
mvpRichard MacCutchan26-Jan-13 0:05 
QuestionWPF.MDI Pin
columbos1492725-Jan-13 8:37
membercolumbos1492725-Jan-13 8:37 
AnswerRe: WPF.MDI Pin
Abhishek Pant25-Jan-13 9:29
memberAbhishek Pant25-Jan-13 9:29 
GeneralRe: WPF.MDI Pin
columbos1492725-Jan-13 22:11
membercolumbos1492725-Jan-13 22:11 
GeneralRe: WPF.MDI Pin
Abhishek Pant25-Jan-13 22:33
memberAbhishek Pant25-Jan-13 22:33 
AnswerRe: WPF.MDI Pin
tram730-Nov-13 5:54
membertram730-Nov-13 5:54 
QuestionSilverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf24-Jan-13 12:13
memberSteve Holdorf24-Jan-13 12:13 
AnswerRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
db7uk26-Jan-13 13:11
memberdb7uk26-Jan-13 13:11 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf27-Jan-13 3:19
memberSteve Holdorf27-Jan-13 3:19 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
db7uk27-Jan-13 12:44
memberdb7uk27-Jan-13 12:44 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf27-Jan-13 13:16
memberSteve Holdorf27-Jan-13 13:16 
QuestionSilverlight OOB access in Online Pin
Sugumaran s23-Jan-13 23:09
memberSugumaran s23-Jan-13 23:09 
AnswerRe: Silverlight OOB access in Online Pin
Richard MacCutchan24-Jan-13 1:50
mvpRichard MacCutchan24-Jan-13 1:50 
GeneralRe: Silverlight OOB access in Online Pin
Sugumaran s24-Jan-13 17:31
memberSugumaran s24-Jan-13 17:31 
GeneralRe: Silverlight OOB access in Online Pin
Richard MacCutchan24-Jan-13 22:41
mvpRichard MacCutchan24-Jan-13 22:41 
GeneralRe: Silverlight OOB access in Online Pin
Sugumaran s25-Jan-13 0:36
memberSugumaran s25-Jan-13 0:36 
GeneralRe: Silverlight OOB access in Online Pin
Richard MacCutchan25-Jan-13 1:36
mvpRichard MacCutchan25-Jan-13 1:36 
QuestionHow to set the border template a red wavy line , when the control have validation error? Pin
Salam633123-Jan-13 17:01
memberSalam633123-Jan-13 17:01 
AnswerRe: How to set the border template a red wavy line , when the control have validation error? Pin
Richard MacCutchan23-Jan-13 23:07
mvpRichard MacCutchan23-Jan-13 23:07 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 23 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid