none
Window is not supported in a windows presentation foundation (WPF) project RRS feed

  • Question

  • Any help? I tried to search on google and stackoverflow but noone had this issue...

    And i already tried this https://social.msdn.microsoft.com/Forums/vstudio/en-US/e1eb41c4-a43d-40e6-9228-129f0afcfbb2/element-name-is-not-supported-in-a-windows-presentation-foundation-wpf-project?forum=wpf

    Friday, May 4, 2018 7:54 PM

All replies

  • Without details I doubt you will get much help.

    Lloyd Sheen

    Friday, May 4, 2018 9:10 PM
  • Is there an error message? Please provide the entire error message. Also show what the error message is for; you don't even tell us whether it is C# code or XAML code.

    Also, please don't put information in the title (subject) of your question without providing the information in the body too. Use the title (subject) to help us decide whether it is worthwhile for us to look at the body but don't require us to look at the title (subject) to understand what you are saying.



    Sam Hobbs
    SimpleSamples.Info

    Friday, May 4, 2018 10:43 PM
  • Im sorry for not providing this kind of info... It is XAML code


    In another message i will send  code for MainWindow.xaml

    And here is screenshot of the error log (in czech language becouse im using this language in visual studio

    Oh ok no screenshot becouse "Your account is not verified"

    Sorry for being stupid at my side... If you need more info just tell me!

    Saturday, May 5, 2018 6:29 AM
  • Code (only part becouse full code is too big) (this is the part im getting errors at....:

    <Window x:Class="WoWonder_Desktop.MainWindow"
            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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
            xmlns:properties="clr-namespace:WoWonder_Desktop.language"
            xmlns:controls="clr-namespace:WoWonder_Desktop.Controls"
            xmlns:woWonderDesktop="clr-namespace:WoWonder_Desktop"
            xmlns:gif="http://wpfanimatedgif.codeplex.com"
            mc:Ignorable="d" 
            x:Name="WinMin" FontWeight="Bold" FontFamily="{StaticResource LatoBold}" 
            Title="Wowonder" Height="750" Width="1350" Icon="Images/icon.ico" Loaded="WinMin_Loaded" 
            WindowStyle="None" AllowsTransparency="True" WindowStartupLocation="CenterScreen"
            DragEnter="WinMin_DragEnter" Drop="WinMin_Drop">
    
        <Window.Resources>
            <Style TargetType="{x:Type woWonderDesktop:MainWindow}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Window}">
                            <!-- Outer border with the dropshadow margin -->
                            <Border Padding="{Binding OuterMarginSizeThickness, FallbackValue=5}">
                                <!-- Main window outline -->
                                <Grid >
                                    <!-- Opacity mask for corners on grid -->
                                    <Border x:Name="Container"
                                            Background="{StaticResource BackgroundLightBrush}"
                                            CornerRadius="10" />
                                    <!-- Window border and dropshadown -->
                                    <Border x:Name="BORDERCONTROL" CornerRadius="10"
                                            Background="White">
                                        <Border.Effect>
                                            <DropShadowEffect ShadowDepth="0" Opacity="0.2" />
                                        </Border.Effect>
                                    </Border>
                                    <!-- The main window content -->
                                    <Grid Loaded="FrameworkElement_OnLoaded" >
                                        <!-- Corner clipping -->
                                        <Grid.OpacityMask>
                                            <VisualBrush Visual="{Binding ElementName=Container}" />
                                        </Grid.OpacityMask>
                                        <Grid.RowDefinitions>
                                            <!-- Title Bar -->
                                            <RowDefinition Height="37" />
                                            <!-- Window Content -->
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <!-- Title Bar -->
                                        <Grid x:Name="Grid" Grid.Column="0" Panel.ZIndex="1">
                                            <Grid.ColumnDefinitions>
                                                <!-- Icon -->
                                                <ColumnDefinition Width="Auto" />
                                                <!-- Title -->
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition Width="*" />
                                                <!-- Windows Button -->
                                                <ColumnDefinition Width="Auto" />
                                            </Grid.ColumnDefinitions>
                                            <!-- Icon -->
                                            <Button Style="{StaticResource SystemIconButton}" Command="{Binding MenuCommand}">
                                                <Image Source="/Images/icon.ico" />
                                            </Button>
                                            <!-- Title -->
                                            <Viewbox Grid.Column="1" Margin="0">
                                                <TextBlock Loaded="TitleApp_OnLoaded" FontSize="8" Style="{StaticResource HeaderText}" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title, FallbackValue=Wowonder}" />
                                            </Viewbox>
                                            <!-- Window Buttons -->
                                            <StackPanel Grid.Column="3" Orientation="Horizontal">
                                                <Button Loaded="Btn_Minimize_OnLoaded" ToolTip="{x:Static properties:LocalResources.label_Minimize}" x:Name="btn_Minimize" Style="{StaticResource WindowControlButton}" Content="_" Click="Btn_Minimize_OnClick" />
                                                <Button Loaded="btn_Maximize_OnLoaded" ToolTip="{x:Static properties:LocalResources.label_Maximize}" x:Name="btn_Maximize" Style="{StaticResource WindowControlButton}" Content="[ ]" Click="Btn_Maximize_OnClick" />
                                                <Button Loaded="btn_Close_OnLoaded" x:Name="btn_Close" ToolTip="{x:Static properties:LocalResources.label_Btn_CloseProfile}"  Style="{StaticResource WindowCloseButton}" Content="X" Click="Btn_Close_OnClick" />
                                            </StackPanel>
                                        </Grid>
                                        <!-- Page Content -->
                                        <Border Grid.Row="1" Padding="{Binding InnerContentPadding}">
                                            <ContentPresenter Content="{TemplateBinding Content}" />
                                        </Border>
                                    </Grid>
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>


    Saturday, May 5, 2018 6:31 AM
  • Hi SkyCityCZ,

    According to your description, I could not understand what you want to do. Could you please tell me what's your requirement?

    Best Regards,

    Xavier


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 7, 2018 5:50 AM
    Moderator
  • I just encountered this error. Below is a screenshot of what is happening. It's a XAML designer issue. 

    Friday, September 14, 2018 3:03 PM
  • In the definition of the window your casing is incorrect.

    <Window x:Class="WoWonder_Desktop.MainWindow"
    xmlns:woWonderDesktop="clr-namespace:WoWonder_Desktop"


    Lloyd Sheen

    Friday, September 14, 2018 5:22 PM