These are chat archives for punker76/MahApps.Metro.SimpleChildWindow

Jul 2018
Mallory Nobles
Jul 26 2018 21:09
I'm new to this and am trying to get the SimpleChildWindow working. I want the child window to appear when I press a button inside the root grid in the main Metro window. Currently, the child window has content that shows in the designer, but when I press the button, I get a child window that looks like thisL
This looks similar to the issue @Seeker1437 was having, but I've tried setting my ChildWindowHeight and ChildWindowWidth, and it isn't resolving the issue. Any ideas?
Darnell Williams
Jul 26 2018 21:11
Oh here
@MalloryNobles_twitter try using ChildWindowWidth and ChildWindowHeight
Oh rightalso also makOOH yeah n
I didn't quite read itI didn't wquA
I figured it out but I am not quite sure how I did it
Darnell Williams
Jul 26 2018 21:17
This is an example one I did
<simpleChildWindow:ChildWindow x:Name="NxAuthLogin"
                               IsModal="True" ShowTitleBar="False" ShowCloseButton="False"
                               ChildWindowWidth="350" ChildWindowHeight="350" CloseByEscape="False">
        <StackPanel Margin="0 10 0 0">
            <TextBlock Text="Nexon Passport" HorizontalAlignment="Center" FontSize="36" />
            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
                    Text="Please log in using your Nexon Username and Password. All Information used is immediately discarded for your protection." />
                <LineBreak /><Run />
                <Run FontWeight="Bold"
                     Text="Do not enter your username or password into closed-source launchers without verifying they are safe to use." />
        <StackPanel VerticalAlignment="Center" Margin="15 20 15 0">
            <TextBox x:Name="NxAuthLoginUsername" controls:TextBoxHelper.UseFloatingWatermark="True"
                     Margin="0 15 0 0" controls:TextBoxHelper.Watermark="Username" />
            <PasswordBox x:Name="NxAuthLoginPassword" controls:TextBoxHelper.UseFloatingWatermark="True"
                         Margin="0 5 0 2" controls:TextBoxHelper.Watermark="Password" />
            <CheckBox x:Name="RememberMeCheckBox" Content="Remember Login Details" Margin="0 5 0 2" />
            <TextBlock x:Name="NxAuthLoginNotice" VerticalAlignment="Center" Visibility="Collapsed"
                       TextAlignment="Center" FontWeight="Bold" Foreground="Red" />
        <StackPanel VerticalAlignment="Bottom" Margin="15 0 15 10">
            <wpf:LoadingIndicator HorizontalAlignment="Center" Margin="0,0,0,5" IsTabStop="False"
                                  Style="{StaticResource LoadingIndicatorArcsStyle}" IsActive="False" />
            <DockPanel VerticalAlignment="Bottom">
                <Button DockPanel.Dock="Left" IsDefault="True" x:Name="NxAuthLoginSubmit" Width="100"
                        HorizontalAlignment="Left" VerticalAlignment="Center" Content="Login"
                        Click="NxAuthLoginOnSubmit" />
                <Button DockPanel.Dock="Right" IsCancel="True" x:Name="NxAuthLoginCancel" Width="100"
                        HorizontalAlignment="Right" VerticalAlignment="Center" Content="Cancel"
                        Click="NxAuthLoginOnCancel" />
Mallory Nobles
Jul 26 2018 21:27
Thanks for the quick reply. I'm still having the issue, but will take a close look at your example