MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.32k stars 2.45k forks source link

Visual studio desginer stop show metro ui in desginer #3759

Closed Zeleksonob closed 4 years ago

Zeleksonob commented 4 years ago

Start simple application of metro ui , after some time in development i'm losing the design ui to this one. and from here I can't develop any UI.

what I'm doing wrong ? or this a known issue?

screenshot:

1fPsVaQ - Imgur

here my code :

<Controls:MetroWindow x:Class="AnnotationManagerWPF.MainWindow"                     
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
                      xmlns:local ="clr-namespace:AnnotationManagerWPF"
                      xmlns:Customers ="clr-namespace:AnnotationManagerWPF.ActiveAnnotations"
                      xmlns:AnnoationRe="clr-namespace:AnnotationManagerWPF.AnnotationRequests"
                      xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                      Title="MainWindow"
                      Height="830"
                      Width="1200">
    <Controls:MetroWindow.Resources>

    </Controls:MetroWindow.Resources>
    <Controls:MetroWindow.DataContext>
        <local:MainWindowModel/>
    </Controls:MetroWindow.DataContext>
    <!-- your content -->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition ></RowDefinition>
        </Grid.RowDefinitions>
        <Canvas Height="100" Background="Silver" Margin="0,0,0,0">
            <Controls:Tile
                Command="{Binding SwitchToRequest}"
            Title="Annotaion Requests"
            Count="         10"
             Margin="0" Width="144" Height="62" Canvas.Left="622" Canvas.Top="20"
            />
            <Controls:Tile Name="TasksTag" Width="130" Height="60" Title="Tasks" Count="        10" Margin="0"  Canvas.Left="784" Canvas.Top="22"/>
            <Controls:Tile   Command="{Binding SwitchToActive}" Name="activeProfileTag" Width="148" Height="60" Title="Active Profile Annotations"   Count="            10" Margin="0" Canvas.Top="20" Canvas.Left="450"/>
        </Canvas>
        <ContentControl Grid.Row="1" Content="{Binding CurrentViewModel}"></ContentControl>
        <!--<VIControls:ProfileAnnotationControl x:Name="alexControl" Grid.Row="1" />-->
    </Grid>
</Controls:MetroWindow>
batzen commented 4 years ago

Designer issues should be reported to Microsoft as there is nothing we can do to fix this on our side.

punker76 commented 4 years ago

@Zeleksonob Make sure that you have added all necessary MahApps resources at App.xaml. What you are missing exactly?

Zeleksonob commented 4 years ago

@punker76

I'm missing buttons, Tile , properties like text, count, image, and background color.

, maybe I'll do missing a resource, could you look at the images below, please?

App.xaml

image

this is what my designer looks like :

image

This is my UserContorl reference :

image

Zeleksonob commented 4 years ago

@punker76 any suggestions?

timunie commented 4 years ago

Hi @Zeleksonob ,

make sure the project is build correctly and that custom controls are activated in the designer. image

Even then like @batzen already said the designer for WPF is buggy, but we cannot solve it. I personally write my UI completly in XAML

Happy coding Tim