by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 22 20:26
    eliezeralmeida commented #122
  • Sep 22 20:22
    eliezeralmeida closed #107
  • Sep 22 20:22
    eliezeralmeida commented #107
  • Sep 22 07:42
    Josrph opened #123
  • Aug 11 15:48
    CarterAAelect closed #122
  • Aug 08 19:21
    timunie commented #122
  • Aug 08 14:16
    CarterAAelect commented #122
  • Aug 08 09:15
    timunie commented #122
  • Aug 07 20:41
    CarterAAelect opened #122
  • Jul 07 15:05
    realivanjx closed #121
  • Jul 07 15:05
    realivanjx commented #121
  • Jul 07 09:44
    punker76 commented #121
  • Jul 07 09:34
    realivanjx commented #121
  • Jul 07 09:25
    punker76 commented #120
  • Jul 07 09:22
    punker76 commented #121
  • Jul 04 01:27
    realivanjx opened #121
  • Jul 01 21:38

    punker76 on develop

    Change second sample to show re… (compare)

  • Jun 28 12:47
    mreinhart2805 opened #120
  • Jun 26 08:37

    punker76 on develop

    Update build.yml Use gpr tool … (compare)

  • Jun 25 10:58

    punker76 on develop

    Create build.yml (compare)

Dejan Nadlacki
@Desomph
MahApps 1.5 and SCW 1.3.0
Todd Burnside
@toddburnside

Hi all. I'm getting an InvalidOperationException when attempting to open a MahApps.Metro dialog while a SimpleChildWindow is open. This appears to be the same as documented in Issue #27 which was opened in Jan 2016 and fixed by a PR. The problem was that ChildWindowManager.ShowChildWindowAsync() was adding it's window directly to the MetroActiveDialogContainer. The PR changed this so that the window as added to the MetroInactiveDialogsContainer. However, later changes to ShowChildWindowsAsync() switched it back to preferentially adding it to the MetroActiveDialogContainer.

Is anyone else having this problem or have suggestions as to how to mitigate it? It seems to me that ShowChildWindowAsync() should be doing the same thing as the MahApps.Metro DialogManager.AddDialog does : if there is something in the active dialog container, move it to the inactive dialog container before putting the ChildWindow in the active dialog container. Of course this means that the ChildWindow ClosingFinished handler would need to deal with popping dialogs out of the inactive container if necessary, too.

Jan Karger ツ ☀
@punker76
@toddburnside which versions do you use of both?
Todd Burnside
@toddburnside
MahApps.Metro 1.6.5 and SimpleChildWindow 1.5.0.
Todd Burnside
@toddburnside
I forked SimpleChildWindow and made the changes I mentioned above. It seems to be working, but the problem was sporadic so it's hard to be sure. The changes work for me, but I don't think they are necessarily a solution you want to merge in. For one thing, I removed a couple of public ShowChildWindowAsync methods that took the dialog container as a parameter. It also doesn't take the MetroWindow.IsAnyDialogOpen into account - but that is not a new issue.
Mallory Nobles
@MalloryNobles_twitter
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
@Seeker1437
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
@Seeker1437
This is an example one I did
<simpleChildWindow:ChildWindow x:Name="NxAuthLogin"
                               IsModal="True" ShowTitleBar="False" ShowCloseButton="False"
                               ChildWindowWidth="350" ChildWindowHeight="350" CloseByEscape="False">
    <Grid>
        <StackPanel Margin="0 10 0 0">
            <TextBlock Text="Nexon Passport" HorizontalAlignment="Center" FontSize="36" />
            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
                <Run
                    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." />
            </TextBlock>
        </StackPanel>
        <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>
        <StackPanel VerticalAlignment="Bottom" Margin="15 0 15 10">
            <wpf:LoadingIndicator HorizontalAlignment="Center" Margin="0,0,0,5" IsTabStop="False"
                                  x:Name="NxAuthLoginLoadingIndicator"
                                  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" />
            </DockPanel>
        </StackPanel>
    </Grid>
</simpleChildWindow:ChildWindow>
Mallory Nobles
@MalloryNobles_twitter
Thanks for the quick reply. I'm still having the issue, but will take a close look at your example
Mallory Nobles
@MalloryNobles_twitter
What is your code for calling the child window? The samples in the documentation don't work for me. They produce the tiny child window that doesn't display its content.
Jan Karger ツ ☀
@punker76
@MalloryNobles_twitter which version of MahApps and SimpleChildWindow do you use?
Mallory Nobles
@MalloryNobles_twitter
MahApps.Metro 1.6.5 and MahApps.Metro.SimpleChildWindow 1.5.0
Jan Karger ツ ☀
@punker76
@MalloryNobles_twitter Can you publish your code? How did you call the child window? And how did you create your MetroWimdow?
Dejan Nadlacki
@Desomph
@punker76 Can I somehow affect topmost visibility of a child window? Sometimes (i have no clue why) when I open multiple child windows, one appear behind even though it was opened the last.
Jan Karger ツ ☀
@punker76
@Desomph can you reproduce this with the latest source and a simple app?
Marco Antonio
@mazmtweet_twitter
In the latest compilation of mahapps.metro.2.0.0-alpha0531 and mahapps.metro.simplechildwindow.2.0.0-alpha0031 there is an space at the top and on the left, there is some recommendation to remove it.
image.png
ecxdev
@ecxdev
@punker76 Hey Jan.
At some point I get this error when using SimpleChildWindow v1.5.0.
why this happens i don't know...
  HResult = 0x80131509
  Message = Sequence contains more than one element
  Source = System.Core
  Stacktrace:
   at System.Linq.Enumerable.SingleOrDefault [TSource] (IEnumerable`1 source)
   at MahApps.Metro.Controls.Dialogs.DialogManager.AddDialog (MetroWindow window, BaseMetroDialog dialog)
   at MahApps.Metro.Controls.Dialogs.DialogManager.SetupAndOpenDialog (MetroWindow window, BaseMetroDialog dialog)
   at MahApps.Metro.Controls.Dialogs.DialogManager. <> c__DisplayClass2_0. <ShowMessageAsync> b__1 ()
   at System.Windows.Threading.DispatcherOperation`1.InvokeDelegateCore ()
   at System.Windows.Threading.DispatcherOperation.InvokeImpl ()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
   at System.Windows.Threading.DispatcherOperation.Wait (TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl (DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke [TResult] (Func`1 callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke [TResult] (Func`1 callback)
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke ()
   at System.Threading.Tasks.Task.Execute ()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult ()
Jan Karger ツ ☀
@punker76
@ecxdev Hi, it could be that this is fixed in latest alpha version
ecxdev
@ecxdev
@punker76 , no, not fixed in 2.0.0-alpha0032 and MahAppsMetro v2.0.0-alpha0660
System.InvalidOperationException: Sequence contains more than one element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at MahApps.Metro.Controls.Dialogs.DialogManager.AddDialog(MetroWindow window, BaseMetroDialog dialog) in C:\projects\mahapps-metro\src\MahApps.Metro\Controls\Dialogs\DialogManager.cs:line 506
   at MahApps.Metro.Controls.Dialogs.DialogManager.SetupAndOpenDialog(MetroWindow window, BaseMetroDialog dialog) in C:\projects\mahapps-metro\src\MahApps.Metro\Controls\Dialogs\DialogManager.cs:line 496
   at MahApps.Metro.Controls.Dialogs.DialogManager.<>c__DisplayClass2_0.<ShowMessageAsync>b__1() in C:\projects\mahapps-metro\src\MahApps.Metro\Controls\Dialogs\DialogManager.cs:line 174
   at System.Windows.Threading.DispatcherOperation`1.InvokeDelegateCore()
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke[TResult](Func`1 callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke[TResult](Func`1 callback)
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at MyTestApp.MetroMessageBoxHelper.<ShowMessageAsync>d__1.MoveNext()
ecxdev
@ecxdev

And this code:

            var dialog = await _dialogCoordinator.GetCurrentDialogAsync<TestDialogView>(this);
            await _dialogCoordinator.HideMetroDialogAsync(this, dialog);

throw this exception:

Exception thrown: 'System.InvalidOperationException' in MahApps.Metro.dll
Martin Pučálka
@Martin-Pucalka
Hi, I'd like to ask, how can I be notified, when user clicks the close button, without actually closing the window? I'd like to ask user before closing the window - for example "Do you want close the window without saving changes?" I can't use OnClosing(), because after it, the window is closed anyway. Maybe I could set ShowCloseButton = false and replace it by my custom button, which would call a dialog with question and then eventually call Close(). But how can replace the close button? Thank you.
Martin Pučálka
@Martin-Pucalka
Solved, I can use Closing event of window and set e.Cancel = true.
Sebastian Matus
@sebamatusr
Hello, I have a metro window with to child windows inside, id like to overlay one window on top of the other when I click one of the two childwindows, is there an easy way of doing that?
with two child windows inside*
Sandro
@GrewSum
Hey,
just upgraded my application to the prerelease of MahApps.Metro and SimpleChildWindow. Now i'm facing the issue that my simpleChildWindows are no longer overlay the normal window. Is that a known bug in 2.0.0 or do I have to change something special in my code? Thanks in advance
Jan Karger ツ ☀
@punker76
@GrewSum I doesn't updated the SimpleChildWindow yet, give me 2 days...
Sandro
@GrewSum
ok cool, thank you :)
Sandro
@GrewSum
@punker76 do you have any reply for me? :)
Jan Karger ツ ☀
@punker76
@GrewSum Please try 2.0.0-alpha0037
Sandro
@GrewSum
@punker76 i've tried version 2.0.0-alpha0037. But in my application it doesn't work. When I downloaded the Demo and tested this. That worked. I don't get what I am doing wrong.
Sandro
@GrewSum
As I wrote the last message I found an issue. The childWindow had IsModal=false. I removed that. Now there is an overlay but it's not correct sized.
grafik.png
Any ideas what I am doing wrong? Calling the ChildWindow from the MainWindow
Got it... Everytime I write here I find my solution... :/ ChildWindow had a set width and hight. Worked with the 1.5.x Release...
Sorry for spamming this chat
Jan Karger ツ ☀
@punker76
@GrewSum This was a breaking change and is now called ChildWindowHeight and ChildWindowWidth
eiredrake
@eiredrake
huh this is pretty slick. Sort of looks like slack
Jan Karger ツ ☀
@punker76
@eiredrake ???
Tim
@timunie
@punker76 sorry my fault 😊 I inveted @eiredrake to join this gitter room, because I think it is better to ask questions here instead of opening several issues.
eiredrake
@eiredrake
I had asked a question to see if there was a way to display a child window over a child window. In my case I have a child window that launches a long running process and a progress dialog will appear over top of it with a button that allow you to cancel and a decision dialog that will confirm you want to cancel. before actually cancelling the process. Tim said he believed that might be in the next release. I was curious as to when that might be or if there was another way of doing it.
Tim
@timunie
@eiredrake what about the ProgressDialog of MahApps.Metro? It has all you asjed for.
eiredrake
@eiredrake
Took a bit to get it to successfully build since i did't have net47 installed but I think this is what I'm looking for. I'll play with it and see what it can do. Thanks!
Tim
@timunie
:+1:
Please remember to close the issues on github