Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 20 2020 22:28

    punker76 on develop

    Merge branch 'develop' into main Fix using NuGetKeyVaultSignTool (compare)

  • Nov 20 2020 22:25

    punker76 on 2.0.0

    (compare)

  • Nov 20 2020 22:20

    punker76 on main

    Fix using NuGetKeyVaultSignTool (compare)

  • Nov 20 2020 22:13

    punker76 on main

    Fix using NuGetKeyVaultSignTool (compare)

  • Nov 20 2020 22:02
    punker76 closed #120
  • Nov 20 2020 22:01

    punker76 on main

    (GH-80) Drop targeting to frame… Update appveyor script Change all to new csproj format and 45 more (compare)

  • Nov 20 2020 21:44

    punker76 on develop

    Update CI build and dependencies (compare)

  • Nov 20 2020 21:39

    punker76 on develop

    Update CI build and dependencies (compare)

  • Sep 22 2020 20:26
    eliezeralmeida commented #122
  • Sep 22 2020 20:22
    eliezeralmeida closed #107
  • Sep 22 2020 20:22
    eliezeralmeida commented #107
  • Sep 22 2020 07:42
    Josrph opened #123
  • Aug 11 2020 15:48
    CarterAAelect closed #122
  • Aug 08 2020 19:21
    timunie commented #122
  • Aug 08 2020 14:16
    CarterAAelect commented #122
  • Aug 08 2020 09:15
    timunie commented #122
  • Aug 07 2020 20:41
    CarterAAelect opened #122
  • Jul 07 2020 15:05
    realivanjx closed #121
  • Jul 07 2020 15:05
    realivanjx commented #121
  • Jul 07 2020 09:44
    punker76 commented #121
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
ecxdev
@ecxdev
image.png
Why does SimpleChildWindow v1.5.0 not work with Metro v2.2.0?
Clarification: the child window is displayed without a style, the window background is transparent, the text is black, and the close button is without a style.
Tim
@timunie
@ecxdev you need the latest prerelease
Tim
@timunie
@ecxdev
image.png
here is how to get the prerelease :-)
ecxdev
@ecxdev
@timunie I know how to get prerelease)
but I can't use in the production of the prerelease...
another attempt to migrate to version 2.2 failed(
why is there no release of SimpleChildWindow?
Tim
@timunie
I don't know. /cc @punker76
Jan Karger ツ ☀
@punker76
@ecxdev let me check why it's not released yet.
faraj elawame
@Faraj_elawame_twitter
hi there
Anyone please give me a complete example of using MahApps.Metro.SimpleChildWindow
on wpf c# or wpf vb
Tim
@timunie
Hi @Faraj_elawame_twitter did you already check the demo-App?
faraj elawame
@Faraj_elawame_twitter
no, where i can find it?
Sebastian Matus
@sebamatusr
Hi there, is there a way to use the ChildWindowManager to insert a childwindow directly into a grid inside a window? Only thing that's working for me is passing a metrowindow object to the method but I need to place it inside a grid in that window
Daniel Mittelstadt
@DMtsdt

I'm setting up a MVVM dialog service using SimpleChildWindow as a container for DialogViews that display complex objects to select from
For flexibility's sake I'd like to avoid writing each view as a ChildWindow and rather set a DialogContentView as its content
I'm having a problem closing the ChildWindow after the DialogContentViewModel completes (when the user selects an item)

public async Task ShowDialog<TResult>(IDialogContentViewModel<TResult> dialogContentViewModel)
        {
            if (dialogContentViewModel == null)
                throw new ArgumentNullException(nameof(dialogContentViewModel), "Dialog Content ViewModel cannot be null");

            //Using Caliburn.Micro ViewLocator as a convention-based TemplateSelector
            var view = ViewLocator.LocateForModelType(dialogContentViewModel.GetType(), null, null);
            ViewModelBinder.Bind(dialogContentViewModel, view, null);

            var childWindow = new ChildWindow
            {
                Title = dialogContentViewModel.DisplayName,
                Content = view,
                IsModal = true,
                CloseByEscape = dialogContentViewModel.Dialog.CanEscape,
                ShowCloseButton = dialogContentViewModel.Dialog.CanEscape
            };

            var metroWindow = Application.Current.Windows.OfType<MetroWindow>().FirstOrDefault();
            if (metroWindow == null) return;

            await metroWindow.ShowChildWindowAsync(childWindow);
            try
            {
                //Task<TResult>
                await dialogContentViewModel.Response;
            }
            catch (Exception e)
            {
                //...
            }
            finally
            {
                childWindow.Close();
            }
        }

It works fine when using MahApps CustomDialog (metroWindow.HideMetroDialogAsync();)
Anything I'm missing?

Tim
@timunie
@DMtsdt can you upload a sample to github? If I find some time I may find a solution then
Tim
@timunie
I think this problem is that await metroWindow.ShowChildWindowAsync(childWindow); will wait until the childwindow is closed, so it ill not enter the try until the user closed the window.
Daniel Mittelstadt
@DMtsdt
@timunie You're right. If I make a selection then close the ChildWindow it will activate. Calling it sequentially will also trigger the sequence correctly.
I think for readability sake it's better to keep IDialogContentViewModel decoupled from its view's containing element (it could be anything really) so I think I'll keep the sequential call