Steps:
1) First create two window form<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="400" Width="1000">
<Grid>
<Button Content="Click to show demo" Height="23" HorizontalAlignment="Left" Margin="318,203,0,0" Name="button1" VerticalAlignment="Top" Width="140" Click="button1_Click" />
<Border x:Name="shadow"
Grid.ColumnSpan="3"
Grid.RowSpan="2"
Background="black"
Opacity="0.36"
Visibility="Collapsed" Loaded="shadow_Loaded" ClipToBounds="False">
</Border>
</Grid>
</Window>
4) Now add second windown to this solution.
4) now on butn click event add following code. first make object of second windownand set some propeties
{
win2 objwin2 = new win2();
animm.To = 1;
objwin2.BeginAnimation(UIElement.OpacityProperty, animm);
shadow.Visibility = Visibility.Visible;
objwin2.ShowDialog();
shadow.Visibility = Visibility.Collapsed;
}
0 comments:
Post a Comment
Thanks for comment