<Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <StackPanel Name="SP" Orientation="Horizontal" Background="Black"> <TextBox x:Name="txtSearch" Width="100" Margin="2,2,10,2" Text="msdn pejl"/> <Button Width="100" Content="Go!" Margin="2" Click="Button_Click" /> </StackPanel> <Popup x:Name="ProfilePopup" Height="Auto" Width="{Binding ActualWidth, ElementName=SP}" Placement="Center" > <StackPanel Background="SteelBlue"> <StackPanel HorizontalAlignment="Center" > <Grid Background="SteelBlue"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100" /> <ColumnDefinition Width="100" /> <ColumnDefinition Width="150" /> <ColumnDefinition Width="50" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Label Grid.Column="0" Foreground="White" Grid.Row="0" Grid.ColumnSpan="3" FontSize="18" Margin="10">Please Login To Access This Application</Label> <Label Grid.Column="1" Foreground="White" Grid.Row="1">User Name</Label> <TextBox Grid.Column="2" Foreground="Black" Background="White" Grid.Row="1" ToolTip="Enter Your User Name" Name="txtUserName" /> <Label Grid.Column="1" Foreground="White" Grid.Row="2">Password</Label> <PasswordBox Grid.Column="2" Grid.Row="2" ToolTip="Enter Your Password" Name="txtPassword" /> <StackPanel Grid.Column="2" Grid.Row="3" Margin="10" HorizontalAlignment="Center" Orientation="Horizontal"> <Button Name="btnCancel" IsCancel="True" Content="Cancel" Click="btnCancel_Click" /> <Button Name="btnLogin" IsDefault="True" Content="Login" Click="btnLogin_Click" /> </StackPanel> </Grid> </StackPanel> </StackPanel> </Popup> </Grid>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)