Git Product home page Git Product logo

Comments (6)

Martin5630 avatar Martin5630 commented on July 24, 2024

@Dirkster99 currently I dont why but if you have a control with a scrollviewer inside the controltemplate the autohide function no longer works. AvalonDock set the ActiveContent to the ToolWindow and then back to the DocumentPane if the Pane as a Scrollviewer as Content.

you can see the problem if you change the FileViewTemplate.

Set the Template to this:

<bindLocal:PanesTemplateSelector.FileViewTemplate>
  <DataTemplate>
    <Grid>
      <ListBox />
    </Grid>
  </DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate>

the autohide function no longer works

if you Change the template to this

<bindLocal:PanesTemplateSelector.FileViewTemplate>
  <DataTemplate>
    <Grid>
      <TextBlock></TextBlock>
    </Grid>
  </DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate>

the Auto hide functions works as expected.

an now add a scrollviewer

<bindLocal:PanesTemplateSelector.FileViewTemplate>
  <DataTemplate>
    <Grid>
      <ScrollViewer >
        <TextBlock />
      </ScrollViewer>
    </Grid>
  </DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate>

the function don't work anymore.

from avalondock.

Dirkster99 avatar Dirkster99 commented on July 24, 2024

Interesting... I will investigate this and get back to you when I have more ideas about this problem. Thanks for the analysis and useful description to verify the problem 👍

from avalondock.

Dirkster99 avatar Dirkster99 commented on July 24, 2024

Hi,

I've tried to verify your problem but I cannot find any special problem connected to a ScrollViewer. There is aleady a Color Picker tool window in MLibTest that comes (by random chance) with a ScrollViewer:

<demos:PanesTemplateSelector.ColorPickerViewTemplate>
    <DataTemplate>
        <Border Padding="6">
            <ScrollViewer>
                <demoviews:ColorSelectionView />
            </ScrollViewer>
        </Border>
    </DataTemplate>
</demos:PanesTemplateSelector.ColorPickerViewTemplate>

But I cannot see any special Auto Hide problem there. I always have to select the document or another tool window, move the mouse and the Auto Hide tool window dissappears. This is the behavior that I can see whether I use a ScrollViewer in the DataTemplate or not.

I think it is acceptable to have tool window dissappear after clicking inside the documnt and moving the mouse. I know this not what VS does but I am not sure whether fixing this issue is worth the effort - we could try to look further into it, but your expectation is that the tool window dissappears after clicking inside the new document without having to move the mouse, right?

from avalondock.

Martin5630 avatar Martin5630 commented on July 24, 2024

Hi,

I have made a recheck with my second reference project for AlavonDock Gemini. There it works like Visual Studio. One mouse click and the tool window disappears. I tried the same again as with your test project. With and without ScrollViewer and I came to the same result. Without it works, with ScrollViewer not. Since the demo program MonoGame also uses a ScrollViewer I thought the problem must be somewhere else. I commented out everything in the methods for Mouse-Down and Mouse-Up. Finally the line where the focus is set on the GraphicsControl remained. With this line it works without problems. So I think AvalonDock has a problem with the management of the Focus.

image

image

Kind regards Martin

from avalondock.

Dirkster99 avatar Dirkster99 commented on July 24, 2024

Yes it looks like there is a focus problem but its not necessarily in AvalonDock alone - remember AvalonDock needs to set and steel focus from/to documents and tool window to activate things when user do Control+Tab - worse still, controls (views) are unloaded when they become invisible...

My problem is that I cannot verify your problem since Gemini appears to be broken and your version is not public, is it? I even tried to update it myself but there was no response in ages... ...

Maybe you can have a look at my reference App Edi where I use the:

events to capture and restore the status of the document whenever the view is unloaded or (re-)loaded. I am not quit sure but your description sounds like this could be something useful to add to your control (?).

You could also try adding something like

Focusable="False"

to your scrollviewer to see if that makes a difference. If it does, I am not sure what it means as I don't know your app but I know focus issues with AvalonDock from the past but I got these to work in Edi and I hope it helps you getting your app to work as well. Please let me know if you make any progress (even if trying things and failing) as I am wondering what the issue is and other might face similar problem when converting from AD 2.x to 3.x ...

from avalondock.

Dirkster99 avatar Dirkster99 commented on July 24, 2024

Closing this now since it seems to get stalled - feel free to re-open if you have any news that shed a light on this one...

from avalondock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.