Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a MetroNavigationWindow #789

Closed
AzureKitsune opened this issue Nov 8, 2013 · 4 comments
Closed

Make a MetroNavigationWindow #789

AzureKitsune opened this issue Nov 8, 2013 · 4 comments
Assignees
Milestone

Comments

@AzureKitsune
Copy link
Member

@ghost ghost assigned AzureKitsune Nov 8, 2013
@AzureKitsune AzureKitsune mentioned this issue Nov 14, 2013
15 tasks
AzureKitsune added a commit to AzureKitsune/MahApps.Metro that referenced this issue Nov 15, 2013
@robertstefan
Copy link

I am not very sure that this can be used within metro dialogs, but here is what i tested with:

    <Window.Resources>
        <ResourceDictionary>
            <dialogs1:SimpleDialog x:Key="LoginDialogTest">
                <controls:MetroNavigationWindow>
                    <controls:ToggleSwitch Header="WiFi" OnLabel="On" OffLabel="Off"></controls:ToggleSwitch>
                </controls:MetroNavigationWindow>
            </dialogs1:SimpleDialog>
        </ResourceDictionary>
    </Window.Resources>

but when i run the project i get the InvalidOperationException:

An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll

Additional information: Window must be the root of the tree. Cannot add Window as a child of Visual.

and the entire application window is being re-sized by height, around 100px - 150px.
Is it because of how i used it in the project? :-/

@AzureKitsune
Copy link
Member Author

@robertstefan It's because you can't add a Window inside of a Control. MetroNavigationWindow is a MetroWindow which is a regular Window.

@robertstefan
Copy link

Dooooh! I should've known that... 😊

@AzureKitsune
Copy link
Member Author

@robertstefan Also, in my latest PR (#901), I have fixed the resizing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants