Got no success using Fluent- i read the walkthrough and i got an error

Sep 12, 2010 at 8:03 PM
Edited Sep 13, 2010 at 10:45 AM

hi,

i am getting the following problem when trying to add a RibbonWindow:

 

The name 'InitializeComponent' does not exist in the current context

 

i read the manual (walkthrough) before posting this post.. also i checked the Samples, also, i checked another program that uses Fluent

 

this is my App.xaml:

<Application x:Class="MyWindow.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Silver.xaml" />
    </Application.Resources>
</Application>

 

this is my MainWindow.xaml:

<Fluent:RibbonWindow x:Class="Fluent.Sample.Foundation.Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
Title="Fluent.Sample.Foundation" Width="500" Height="250" >
    <Grid>
    </Grid>
</Fluent:RibbonWindow>

 

this is my MainWindow.xaml.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyWindow
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Fluent.RibbonWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

image of my Solution Explorer:
http://img8.imageshack.us/img8/2609/soluo.jpg

 

by the way, i use Fluent- targeting .Net Framework 3.5


Thanks in advanced..
Din

 

Coordinator
Sep 13, 2010 at 1:10 PM

You have to change x:Class="Fluent.Sample.Foundation.Window" to "MyWindow.MainWindow".

Daniel

Sep 13, 2010 at 5:55 PM
Edited Sep 13, 2010 at 8:37 PM

thanks

you just helped me to solve 2 problems =]