Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse Wheel on InRibbonGallery #1221

Open
APerricone opened this issue Dec 2, 2024 · 5 comments
Open

Mouse Wheel on InRibbonGallery #1221

APerricone opened this issue Dec 2, 2024 · 5 comments

Comments

@APerricone
Copy link

APerricone commented Dec 2, 2024

Hello,
sorry for the issue about my poor coding skill, but I am trying to put a tree view inside a InRibbonGallery with this xaml:

<Fluent:InRibbonGallery>
    <Fluent:GalleryItem>
        <TreeView x:Name="modules" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
            <TreeView.Resources>
                <Style TargetType="{x:Type TreeViewItem}">
                    <Setter Property="IsExpanded" Value="True" />
                </Style>
                <HierarchicalDataTemplate DataType="{x:Type local:Module}" ItemsSource="{Binding events}" >
                    <StackPanel Orientation="Horizontal">
                        <CheckBox IsThreeState="True" IsChecked="{Binding visible}" Content="{Binding name}" Click="ModuleList_Click" Margin="10,1"/>
                        <Image Source="images/right-arrow.png" MouseLeftButtonUp="Image_MouseLeftButtonUp" Height="16"/>
                    </StackPanel>
                </HierarchicalDataTemplate>
                <DataTemplate DataType="{x:Type local:Event}">
                    <StackPanel Orientation="Horizontal">
                        <CheckBox IsChecked="{Binding visible}" Content="{Binding name}" Click="ModuleList_Click" Margin="10,1" />
                        <Image Source="images/right-arrow.png" MouseLeftButtonUp="Image_MouseLeftButtonUp" Height="16"/>
                    </StackPanel>
                </DataTemplate>
            </TreeView.Resources>
        </TreeView>
    </Fluent:GalleryItem>
</Fluent:InRibbonGallery>

It is showed very well, and I am able to expand it, that was my goal.
My issue is that I try to rotate the mouse wheel with the mouse inside it doesn't scroll, with a lack on user experience.

Maybe I must do it in another way?
Any suggest is welcome.


Environment

  • Fluent.Ribbon 10.1.0
  • Windows 10 Pro 2H2
  • .NET Framework 4.8
@batzen
Copy link
Member

batzen commented Dec 6, 2024

Will have a look on Monday.
But using a scrollviewer (from the treeview) inside a scrollviewer (from the gallery) is always problematic.

@APerricone
Copy link
Author

Thank you very much, the interface looks like this now:
image
But it is not mandatory to be this way, maybe I can rearrange it using GalleryItems, but I am not sure how to do it.

@batzen
Copy link
Member

batzen commented Dec 6, 2024

Are you using multiple of those treeviews/galleryitems? Do you need to have the tree visible when the dropdown is not open?

@APerricone
Copy link
Author

APerricone commented Dec 6, 2024

Are you using multiple of those treeviews/galleryitems?

no, only one.

Do you need to have the tree visible when the dropdown is not open?

Yes, We prefer that is visible when closed, and scrollable

I tried to do it using Fluent:InRibbonGallery.ItemTemplate but it become very large and I was not able to grouping.

@APerricone
Copy link
Author

Hello, some news about it? I did some test, if I add Max Height on Gallery Item we can see 2 scroll bar, one for the Gallery Item and one for tree view:
image
and here the wheel scrolling is working.
I see that the gallery does not respond to item resize (if I open a branch of the tree it does not resize).

Many thanks for your efforts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants