Autor Beitrag
mmp5
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: So 27.06.10 22:17 
Hallo, ich habe dieses Konstrukt

ausblenden XML-Daten
1:
2:
3:
4:
5:
6:
7:
<DocumentViewer Margin="17,27,24,67" Name="documentViewer1" >
            <FixedDocument>
                <PageContent>
                <FixedPage MouseLeftButtonDown="fp_MouseLeftButtonDown" Name="fp" MouseLeftButtonUp="fp_MouseLeftButtonUp" MouseMove="fp_MouseMove">
                </FixedPage>
            </PageContent>
</DocumentViewer>


und das MouseLeftButtonUp Event funktioniert nicht.
Wenn ich das FixedPage Element einfach Klicke wird das MousedownEvent ausgeführt ... aber das MouseLeftButtonUp event nicht.
Mit der Rechten Maus funktioniert das jedoch Problemlos.

Woran liegt das und wie kann ich es Aktivieren?

Moderiert von user profile iconChristian S.: C#- durch XML-Tags ersetzt
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 27.06.10 22:23 
Das Event wird anscheinend von der Komponente selbst schon behandelt, also würde ich das zugehörige Preview-Event vorschlagen.

_________________
>λ=
mmp5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: So 27.06.10 22:34 
mhhh das klappt auch nicht.


ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
        <DocumentViewer Margin="17,27,24,67" Name="documentViewer1" >
            <FixedDocument>
                <PageContent>
                    <FixedPage MouseLeftButtonDown="FixedPage_MouseLeftButtonDown" Name="fp" PreviewMouseLeftButtonUp="fp_PreviewMouseLeftButtonUp" MouseMove="fp_MouseMove">
                        <TextBlock >aaaaaaaaaaaaaaaaaaa</TextBlock>
                    </FixedPage>
                </PageContent>
            </FixedDocument>
        </DocumentViewer>


Funktioniert auch nicht ... mhhh ... kann ich/ muss ich irgendwie Override oder so machen??
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 27.06.10 22:57 
Ah, Snoop verrät mir, das die Events anscheinend nur bis zum DocumentViewer durchkommen. Was hast du denn vor?

_________________
>λ=
mmp5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: So 27.06.10 23:01 
Ich habe ein Rectangle auf der FixedPage und dass mit den MouseEvents gezogen werden können.

Mousedown -> AnfangsPunkt
MouseMove -> Neue Position
MouseUP -> EndPosition und aufhören zu Zeichnen ...

oder gibts dafür nen andere Mögtlichkeit