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

Menu item blows up when it's on a top level window. #151

Open
tomlm opened this issue Nov 17, 2024 · 0 comments
Open

Menu item blows up when it's on a top level window. #151

tomlm opened this issue Nov 17, 2024 · 0 comments

Comments

@tomlm
Copy link
Collaborator

tomlm commented Nov 17, 2024

Change Gallery ControlsListView.xaml to look like this:

    <Grid RowDefinitions="Auto *">
        <Menu>
            <MenuItem Header="_File">
                <MenuItem Header="E_xit" Click="Exit_Click"/>
            </MenuItem>
        </Menu>

        <DockPanel Grid.Row="1">

            <Grid RowDefinitions="* Auto" DockPanel.Dock="Left">
                <DataGrid x:Name="Grid"
                          SelectedIndex="0"
                          SelectionMode="Single">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="Name"
                                            Binding="{Binding Name}" />
                    </DataGrid.Columns>
                </DataGrid>
                <Button Grid.Row="1" Content="Exit" Click="Exit_Click" KeyboardNavigation.IsTabStop="False"/>
            </Grid>
            <Border Child="{Binding ElementName=Grid,Path=SelectedItem, Converter={StaticResource GalleryItemConverter}}"
                    BorderThickness="1"
                    BorderBrush="{DynamicResource ThemeBorderBrush}" />
        </DockPanel>
    </Grid>

All I did was add a menu with a submenu.

Repo steps:

  1. click on File menu
  2. Click anywhere away from the File menu to cancel the menu.
    It blows with an exception inside TurboVision Menu extension.
    image
    image
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

1 participant