相关文章推荐
想发财的炒粉  ·  MySQL ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have created MenuItems Inside the popup in XAML. That menu Items contains the SubMenu Item. Popup opened while click on the toggle button. I cannt open the sub MenuItem of MenuItem inside the popup.

<ToggleButton Name="button"
                  Width="30"
                  Height="30"
                  Click="Button_Click">
        <Image Width="30" Height="30">
            <Image.Source>
                <BitmapImage UriSource="/WpfApplication4;component/Images/Filter.png" />
            </Image.Source>
        </Image>
    </ToggleButton>
    <Popup Name="PART_Popup"
           Placement="Bottom"
           PlacementTarget="{Binding ElementName=button}">
        <Border Background="White"
                BorderBrush="Gray"
                BorderThickness="1">
            <StackPanel Orientation="Vertical">
                <MenuItem  Width="270"
                          Margin="5"
                          Header="ClearFilter">
                        <MenuItem.Icon>
                            <Image>
                                <Image.Source>
                                    <BitmapImage UriSource="/WpfApplication4;component/Images/ClearFilter.png" />
                                </Image.Source>
                            </Image>
                        </MenuItem.Icon>
                    <MenuItem  Header="SubMenu" />
                        <MenuItem Header="SubMenu1" />
                    </MenuItem>
                               </StackPanel>
        </Border>
    </Popup>

Please help me to resolve this.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.