Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8906571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:41:29+00:00 2026-06-15T02:41:29+00:00

I am getting a compilation error as Error 1 The type or namespace name

  • 0

I am getting a compilation error as

Error 1 The type or namespace name ‘Converters’ could not be found (are you missing a using directive or an assembly reference?) G:\C#\Practice\DataGrid\DataGrid\obj\x86\Debug\MainWindow.g.cs 12 7 DataGrid

Below is my Xaml code, I am new to WPF please help me out. I have the converter Class.

<Window  x:Class="DataGrid.MainWindow "
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="500" Width="700"
xmlns:c="clr-namespace:Converters">
<Window.Resources>
   <c:BoolToStringConverter x:Key="BoolToStringConverter" />
</Window.Resources>
    <Grid>

    <Grid.RowDefinitions>
        <RowDefinition Height="59*" />
        <RowDefinition Height="402*" />
    </Grid.RowDefinitions>
    <StackPanel Margin="0,55,0,0" Grid.RowSpan="2">
        <DataGrid ItemsSource="{Binding Path=Courses}" AutoGenerateColumns="False" HorizontalAlignment="Left" Name="datagrid1" CanUserAddRows="False" HeadersVisibility="Column" RowDetailsVisibilityMode="Visible" VerticalScrollBarVisibility="Auto" CanUserSortColumns="True" CanUserResizeColumns="False" Height="339" Width="610">
            <DataGrid.Resources>
                <Style TargetType="{x:Type CheckBox}" x:Key="DataGridCheckBox">
                    <Setter Property="HorizontalAlignment" Value="Center" />
                    <Setter Property="HorizontalContentAlignment" Value="Center" />
                    <Setter Property="IsEnabled" Value="True" />
                    <Setter Property="Margin" Value="4" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                </Style>
            </DataGrid.Resources>
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Course Title" Width="100">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding Path=Code}" VerticalAlignment="Center" />
                            </StackPanel>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Course Description" Width="*">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding Path=Descrption}" VerticalAlignment="Center" />
                            </StackPanel>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Required" Width="100">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                                <TextBlock Text="{Binding Path=IsRequired, Converter={StaticResource BoolToStringConverter}}" 
                                       VerticalAlignment="Center" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
    <StackPanel Margin="0,0,539,32">
        <TextBlock Text="Select Enroolment:" FontSize="15" 
                   Height="26"
                   Grid.RowSpan="1"
                   Width="134">
        </TextBlock>

    </StackPanel>
    <TextBlock DockPanel.Dock="Left"
               HorizontalAlignment="Left" 
               Text="Select Course:" 
               Width="139" FontSize="15" 
               Margin="0,32,0,0">
               </TextBlock>
    <ComboBox HorizontalAlignment="Right"
              Margin="0,0,69,33"
              Name="comboBox1"
              Width="476"
              Height="23"
              VerticalAlignment="Bottom" />
</Grid>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:41:31+00:00Added an answer on June 15, 2026 at 2:41 am

    xmlns:c="clr-namespace:Converters"

    You should check the namespace of your Converters class, that is what you should put in place of Converters. If Converters is your class, then you should put whatever it says after namespace in your .cs file.

    Example:

     namepsace MyNamespace {
          public class Converters { }
     }
    

    Then your XAML would be:

     xmlns:c="clr-namespace:MyNamespace"
    

    Extra:
    If you want to be more specific, you can add the assembly parameter as well.

     xmlns:window="clr-namespace:MyNamespace;assembly=MyNamespace"
    

    Where Assembly can be found in your Build Properties (Right-click Project, Properties, Application, Assembly Information)

    Your default namespace can also be found in the Build Properties as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting an compilation error not a statement for the below code. Not
I am getting a compilation error for the following statement: void read_text(int & c1,
I am getting a compilation error. I am trying to add strings to a
I'm getting the error fatal error C9999: *** exception during compilation *** Whenever I
I am getting compilation error is following code. I thought this should have worked
what am I doing wrong here? I keep on getting a compilation error when
I am getting compiler error: cannot cast expression of type 'System.Xml.Linq.XElement to type AutomationStatusType
I am getting compilation error in below code. class A { public: A() {
I am getting compilation error in Line 3, Is it any special case for
Strangely I am getting compilation error in C++ for the following code. class A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.