Click here to Skip to main content
15,886,873 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: XmlWriter Pin
Ranger4923-Mar-09 23:42
Ranger4923-Mar-09 23:42 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 4:02
Ranger4924-Mar-09 4:02 
GeneralRe: XmlWriter Pin
Mark Salsbery24-Mar-09 6:17
Mark Salsbery24-Mar-09 6:17 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 6:22
Ranger4924-Mar-09 6:22 
GeneralRe: XmlWriter Pin
Mark Salsbery24-Mar-09 6:34
Mark Salsbery24-Mar-09 6:34 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 6:41
Ranger4924-Mar-09 6:41 
QuestionRoutingStrategy doesn't work:confused: Pin
mildred-frontfree23-Mar-09 21:04
mildred-frontfree23-Mar-09 21:04 
AnswerRe: RoutingStrategy doesn't work:confused: Pin
ABitSmart23-Mar-09 22:44
ABitSmart23-Mar-09 22:44 
mildred-frontfree wrote:
But the RoutingStrategy doesn't work.

No, it works.

When you set it as bubbling, it starts from itself and ends at the root.
When you set it as Tunneling, it starts from the root and ends at itself.

mildred-frontfree wrote:
(sender as Canvas).RaiseEvent(newEventArgs);

Remember, you are raising the event from the Canvas.

In your case, when you set it as bubble, it started from Canvas and searched upto the root. It only found OuterButton, which is correct.
When you set it tunneling, it started from the root. It found Outerbutton fired event for it. Continued upto the Canvas and never found anymore MyButtonSimple.

If instead you had raised it from InnerButton, you would have got your desired output.

Try this,
<local:MyButtonSimple Width="100" Height="100" Tag="OuterButton">
    <Canvas Width="80" Height="80">
        <local:MyButtonSimple Width="60" Height="60" Tag="InnerButton">
            <Canvas Width="40" Height="40" PreviewMouseDown="Canvas_PreviewMouseDown">
                <local:MyButtonSimple Width="20" Height="20" Tag="MoreInnerButton"/>
            </Canvas>
        </local:MyButtonSimple>              
    </Canvas>
</local:MyButtonSimple>


When you set the event as Bubbling, it will print InnerButton and then OuterButton.
When you set the event as Tunneling, it will print OuterButton and then InnerButton.
GeneralRe: RoutingStrategy doesn't work:confused: Pin
mildred-frontfree23-Mar-09 23:10
mildred-frontfree23-Mar-09 23:10 
QuestionCreating button in SL using createFromXaml() Pin
hxxbin23-Mar-09 11:48
hxxbin23-Mar-09 11:48 
AnswerRe: Creating button in SL using createFromXaml() Pin
Mark Salsbery23-Mar-09 17:50
Mark Salsbery23-Mar-09 17:50 
GeneralRe: Creating button in SL using createFromXaml() Pin
hxxbin26-Mar-09 17:55
hxxbin26-Mar-09 17:55 
QuestionListbox items - how to "owner draw" Pin
#realJSOP23-Mar-09 11:08
mve#realJSOP23-Mar-09 11:08 
AnswerRe: Listbox items - how to "owner draw" Pin
Christian Graus23-Mar-09 15:20
protectorChristian Graus23-Mar-09 15:20 
GeneralRe: Listbox items - how to "owner draw" Pin
#realJSOP23-Mar-09 23:21
mve#realJSOP23-Mar-09 23:21 
AnswerRe: Listbox items - how to "owner draw" Pin
ABitSmart23-Mar-09 17:28
ABitSmart23-Mar-09 17:28 
GeneralRe: Listbox items - how to "owner draw" Pin
#realJSOP23-Mar-09 23:20
mve#realJSOP23-Mar-09 23:20 
AnswerRe: Listbox items - how to "owner draw" Pin
Pete O'Hanlon24-Mar-09 1:30
mvePete O'Hanlon24-Mar-09 1:30 
GeneralRe: Listbox items - how to "owner draw" Pin
#realJSOP24-Mar-09 2:55
mve#realJSOP24-Mar-09 2:55 
GeneralRe: Listbox items - how to "owner draw" Pin
Pete O'Hanlon24-Mar-09 3:24
mvePete O'Hanlon24-Mar-09 3:24 
GeneralRe: Listbox items - how to "owner draw" Pin
#realJSOP24-Mar-09 3:56
mve#realJSOP24-Mar-09 3:56 
GeneralRe: Listbox items - how to "owner draw" Pin
Pete O'Hanlon24-Mar-09 5:37
mvePete O'Hanlon24-Mar-09 5:37 
GeneralRe: Listbox items - how to "owner draw" [modified] Pin
#realJSOP24-Mar-09 10:01
mve#realJSOP24-Mar-09 10:01 
GeneralRe: Listbox items - how to "owner draw" Pin
Pete O'Hanlon24-Mar-09 11:20
mvePete O'Hanlon24-Mar-09 11:20 
GeneralRe: Listbox items - how to "owner draw" Pin
#realJSOP25-Mar-09 3:29
mve#realJSOP25-Mar-09 3:29 

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.