首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >对话框打开在wpf弹出窗口后面。

对话框打开在wpf弹出窗口后面。
EN

Stack Overflow用户
提问于 2014-05-21 07:47:10
回答 1查看 997关注 0票数 2

嗨,我在Wpf中创建了应用程序。我在这里面临的问题是,当我打开弹出窗口时,我已经为文件上传放置了文件加载程序,当我单击“浏览”按钮来上传文件时,对话框在弹出窗口后面打开。但是如果有人知道的话,它应该会在弹出式窗口打开,请帮帮我。提前谢谢。

我的弹出式是这样的:

代码语言:javascript
运行
复制
                    <Button  Grid.Column="0" Grid.Row="0" x:Name="btnaddactivity" Width="140" Height="40" FontSize="12" Content="Save Project" Foreground="White" Background="#FFF3800C" Margin="631,425,99,-58"  />


                    <Expander x:Name="expander" HorizontalAlignment="Right" FlowDirection="RightToLeft"     Foreground="White" FontFamily="segoe_uilight" Height="200"  Width="326" Canvas.Right="20" Canvas.Left="1000"  BorderBrush="#FF0A0909" BorderThickness="1,1,1,2" Background="#FFF3800C" Margin="0,188,73,19" Loaded="expander_Loaded"  >
                        <Expander.Header>
                            <StackPanel Orientation="Horizontal" Width="243">

                                <Canvas Height="22" Width="145" VerticalAlignment="Bottom">

                                    <Image x:Name="imagebind1" Height="30" Width="45" RenderTransformOrigin="2.75,0.8" Canvas.Left="250" Canvas.Top="3" />
                                </Canvas>
                            </StackPanel>
                        </Expander.Header>
                        <Grid HorizontalAlignment="Left" Width="261" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="39*"/>
                                <ColumnDefinition Width="64*"/>
                            </Grid.ColumnDefinitions>
                            <ListBox  ScrollViewer.HorizontalScrollBarVisibility="Disabled"  BorderBrush="#FFF3800C" Name="icTodoList2" Background="#FFF3800C" Margin="23,10,-47,0" Grid.ColumnSpan="2"  HorizontalAlignment="Left" Width="285" MouseUp="icTodoList2_MouseUp">
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/1.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/2.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/3.png"  Height="30" Width="30" HorizontalAlignment="Center"  Tag="-1"/>

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/4.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/6.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/7.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/8.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBoxItem>
                                    <Canvas Margin="20,20,20,20" Height="30" Width="30" ClipToBounds="True" Background="#F39437" >
                                        <StackPanel  Orientation="Vertical">
                                            <Image  Source="img/icons/9.png"  Height="30" Width="30" HorizontalAlignment="Center"  />

                                        </StackPanel>
                                    </Canvas>
                                </ListBoxItem>
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel IsItemsHost="True" Orientation="Horizontal"  />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                            </ListBox>
                        </Grid>
                    </Expander>

                </Grid>

            </Canvas>
        </Border>
    </Popup>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-21 07:50:36

你看过这个,跟你的问题很相似吗?

弹出式总是停留在顶部

在这里,他们使用user32.dll创建一个自定义弹出

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23777101

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档