punker76 / MahApps.Metro.SimpleChildWindow

A simple child window for MahApps.Metro
MIT License
374 stars 55 forks source link

Perhaps not an issue, however I need an advice on ChildWindow. #79

Closed DeputyOfCopyPaster closed 5 years ago

DeputyOfCopyPaster commented 5 years ago

Hello everyone, I have a question on the following thing:

designer_view The chief window and child window itself work normally (as it's shown left). However, there's no content in design view (right square). And there are not any errors and exceptions there. Could someone give me an advice on this?

ChildWindow1.xaml code below.

<simpleChildWindow:ChildWindow
    x:Class="ChildWindow1.ChildWindows.ChildWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:simpleChildWindow="clr-namespace:MahApps.Metro.SimpleChildWindow;assembly=MahApps.Metro.SimpleChildWindow"
    Title="Cool Window with long title"
    d:DesignHeight="273"
    d:DesignWidth="283"
    BorderBrush="{DynamicResource AccentBaseColorBrush}"
    BorderThickness="1"
    ChildWindowWidth="300"
    CloseOnOverlay="True"
    GlowBrush="{DynamicResource AccentColorBrush}"
    ShowCloseButton="True"
    mc:Ignorable="d">

    <simpleChildWindow:ChildWindow.Icon>
        <iconPacks:PackIconModern
            Width="22"
            Height="22"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Foreground="{DynamicResource IdealForegroundColorBrush}"
            Kind="Cog" />
    </simpleChildWindow:ChildWindow.Icon>

    <simpleChildWindow:ChildWindow.OverlayBrush>
        <SolidColorBrush Opacity="0" Color="{StaticResource BlackColor}" />
    </simpleChildWindow:ChildWindow.OverlayBrush>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock
            Grid.Row="0"
            Margin="5"
            FontSize="36"
            FontWeight="Thin"
            Text="Yepp, it works!" />
        <TextBox Grid.Row="1" Margin="5" />
        <UniformGrid
            Grid.Row="3"
            Margin="5"
            Columns="2">
            <Button
                Margin="5"
                Click="OkButtonOnClick"
                Content="Ok"
                FontSize="20"
                FontWeight="Thin"
                IsDefault="True" />
            <Button
                Margin="5"
                Click="CloseSec_OnClick"
                Content="Cancel"
                FontSize="20"
                FontWeight="Thin"
                IsDefault="True" />
        </UniformGrid>
    </Grid>
</simpleChildWindow:ChildWindow>