Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 17 23:06

    punker76 on develop

    Update README.md (compare)

  • Jan 20 08:26
    punker76 labeled #125
  • Jan 20 07:59
    goldcode opened #125
  • Jul 10 2021 21:38
    andrewissac opened #124
  • 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
Paolo Ghibaudo
@ghiboz
thanks @punker76
all right?
Paolo Ghibaudo
@ghiboz
i've added this to my childwindow code:
        public delegate void ChildIsClosedEventHandler();
        public event ChildIsClosedEventHandler ChildIsClosedEvent;


        private void ChildWindow_ClosingFinished(object sender, RoutedEventArgs e)
        {
                if (ChildIsClosedEvent != null)
                {
                    ChildIsClosedEvent();
                }
        }
and works :)
Darnell Williams
@Seeker1437
Hey is it possible to draw a childwindow over a single control?
Jan Karger ツ ☀
@punker76
@ImaBrokeDude what do you mean whith a "single control"?
Darnell Williams
@Seeker1437
For example I wanted to show a childwindow over a datagrid.
I tried using it in an adorner, but when I change tabs and change back the adorner does not work again.
Also before we spoke of using the ChildWindowManager to have the childwindow have an overlay over the full window? It still to this day does not keep me from using the close/min/max buttons, however if the window is defined separately it is fine.
Darnell Williams
@Seeker1437
Mde a gif showing what I mean, just waiting for it to upload
Jan Karger ツ ☀
@punker76
ok
Darnell Williams
@Seeker1437
Yeah it's weird to me why it does that.
I prefer the behavior I get when I use separate XAML but I just don't want to have lots of files for something that will go in one place within the application
Darnell Williams
@Seeker1437
Should I turn this into an issue?
Jan Karger ツ ☀
@punker76
yeah, why not
Darnell Williams
@Seeker1437
What if it is related to its hirarcy?
Andrew Cartwright
@andrewcartwright1
Hello, I'm in two minds of adding this to replace an input dialog window that I'm using, question is - How do you get the result from the child window?
Jan Karger ツ ☀
@punker76
@andrewcartwright1 for now that's not possible, but i'll do this as soon as possible
Andrew Cartwright
@andrewcartwright1
I'll keep my eyes open for the pr :)
thank you :)
Jon Alza
@jonny123d
Hello, I'm using SimpleChildWindow in my solution. I can't see the controls that I'm adding to the SimpleChildWindow in design view in VisualStudio 2013, is any reason for that?
Jan Karger ツ ☀
@punker76
@jonny123d you must set the IsOpen property to true, or just create a ContentControl/UserControl with your content and put this inside the SimpleChildWindow
Jon Alza
@jonny123d
@punker76 Thank you for de answer. When I set the IsOpen property to true Visual Studio is "Not Responding"...
Jan Karger ツ ☀
@punker76
@jonny123d yeah sorry, you should use the latest alpha version
Jon Alza
@jonny123d
@punker76 Thank you! Now it works and I can see the design view.
Jon Alza
@jonny123d
Another question about SimpleChildWindow and IsModal property. When I use MessageBox.Show(), the parent window is not reacheable, not even exit button. When I use SimpleChildWindow with IsModal property set to true, I can use all buttons from title bar. Is any way to get the same behaviour of MessageBox?
Jan Karger ツ ☀
@punker76
@jonny123d not from the designer, but from code behind
@jonny123d you can set the OverlayFillBehavior to FullWindow
Jon Alza
@jonny123d
@punker76 Oh great! Checked and running! Thank you again!
Jon Alza
@jonny123d

Hello again, I'm back with another question, I want Window.ShowDialog() like behaviour, is it posible?

private async void ConnectClick(object sender, RoutedEventArgs e)
{
    if (this.connectWindow == null)
    {
        this.connectWindow = new ConnectWindow();
        this.connectWindow.UserLoggedIn += ConnectWindowUserLoggedIn;
    }
    //this.connectWindow.ShowDialog();
    await this.ShowChildWindowAsync(this.connectWindow, ChildWindowManager.OverlayFillBehavior.FullWindow);
    if (this.connectWindow.SuccessfulResult)
    {
        this.connect();
    }
}

With Window.ShowDialog() I wait until close the window and then I check SuccessfulResult property to know if I can connect or not. With SimpleChildWindow.ShowChildWindowAsync(), it doesn't wait until close the window to check the property.

Jon Alza
@jonny123d

I have changed the code:

private async void ConnectClick(object sender, RoutedEventArgs e)
{
    if (this.connectWindow == null)
    {
        this.connectWindow = new ConnectWindow();
        this.connectWindow.UserLoggedIn += this.ConnectWindowUserLoggedIn;
        this.connectWindow.ClosingFinished += this.ConnectWindowClosingFinished;
    }
    await this.ShowChildWindowAsync(this.connectWindow, ChildWindowManager.OverlayFillBehavior.FullWindow);
}
private void ConnectWindowClosingFinished(object sender, RoutedEventArgs e)
{
    if (this.connectWindow.SuccessfulResult)
    {
        this.connect();
    }
}

Now I can get the SuccessfulResult property when the SimpleChildWindow is closed.

Darnell Williams
@Seeker1437

I can't seem to display a normal messagebox and get it's result :|

Because Dialog result is a MetroWindow property D:

oh such a noob wow
nvm
see switching between WPF and Froms is bad for you health xD
Jon Alza
@jonny123d
Is it so obvious that I'm migrating from WinForm to WPF? :smile:
Jon Alza
@jonny123d

Hello, I've noticed that the ChildWindow closes when I press the ESC key. Is there any way to avoid it? I've tried with this code, but it is useless:

public MyChildWindow()
{
    InitializeComponent();
    this.KeyDown += this.MyChildWindow_KeyDown;
}
private void MyChildWindow_KeyDown(object sender, KeyEventArgs e)
{
    if (e.Key == Key.Escape)
        e.Handled = true;
}

The e.Handled = true; is executed but the window closes.

Jan Karger ツ ☀
@punker76
@jonny123d you can use the new dp CloseByEscape, it's available in the alpha version (pre nuget version)
...more enhancement is coming soon...
Jon Alza
@jonny123d
@punker76 Thank you again!
Darnell Williams
@Seeker1437
@jonny123d before the alpha I believe the hild window was treated like a dialog in which esc key automatically meant Cancel, I don't think you can intercept that.
Jon Alza
@jonny123d
@ImaBrokeDude , CloseByEscape = "False" is what I needed
Darnell Williams
@Seeker1437
Mhmm the latest version added it xD
Jon Alza
@jonny123d

Hello, I have a question about ShowMessageAsync() method, using it when a SimpleChildWindowis shown. In my child window I have a property to save the main window (MetroWindow):

public MainWindow ParentWindow { get; set; }

Then when I need to show the dialog I call it like this:

this.ParentWindow.ShowMessageAsync(title, message);

The problem is that the visual effect (dark background) only affects to the main windows, the child window is white so the dialog and child window are indistinguishable visually. Are there any plans to improve this?

Jan Karger ツ ☀
@punker76
maybe i will do the same like MahApps dialogs
Jon Alza
@jonny123d
Thank you!
Darnell Williams
@Seeker1437
Hey I can't seem to get my childwindow to show
Its shows in the designer but not in app :O