如何在当前窗口内弹出一个对话框,类似网页
想实现像网页上jquery弹出对话框那样的功能,窗口变暗,窗口内显示一幅带有阴影效果的图片
WIndow中已经有一个dockpanel,请问怎样才能实现弹出效果呢?
[解决办法]
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication2"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox VerticalAlignment="Center" Name="textBox1" Text="1111" ></TextBox>
<TextBox Margin="0,50,0,0" VerticalAlignment="Center" Name="textBox2" Text="{Binding MyProperty2, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ></TextBox>
<Border Background="Black" Opacity="0.1"></Border>
<DockPanel Width="300" Height="200" VerticalAlignment="Center" HorizontalAlignment="Center" Background="White">
<Border BorderBrush="Silver" BorderThickness="3">
<Grid>
<TextBlock Text="test"></TextBlock>
</Grid>
</Border>
</DockPanel>
</Grid>
</Window>