xml name spaces

Discussion in 'ASP .Net' started by tshad, Jan 7, 2010.

  1. tshad

    tshad Guest

    In WPF, you have to have the following in your xaml file:

    <Window x:Class="SeeThru.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SeeThru" Height="300" Width="300"

    If you don't have the xmlns lines or you call it anything else, the compiler
    will give you an error.

    And some of your code will give you errors, such as x:fkey for instance.
    These are not actual urls. If you put them in your browser, you will get
    "page cannot be found".

    What are they for ?

    Why a URL that doesn't exist?

    You don't have to have your computer connected to run this, so obviously it
    is not being checked.

    Thanks,

    Tom
     
    tshad, Jan 7, 2010
    #1
    1. Advertising

  2. tshad

    Patrice Guest

    Hi,

    As you said yourself this is just a namespace, that is it has the same roles
    as those namespaces you are using in your cs or vb code (i.e. to avoid
    possible name collisions).

    See :
    http://msdn.microsoft.com/en-us/library/aa468565.aspx (understanding XML
    namespaces)
    http://msdn.microsoft.com/en-us/library/ms747086.aspx (XAML Namespaces and
    Namespace Mapping)
    for details...

    --
    Patrice


    "tshad" <> a écrit dans le message de
    news:...
    > In WPF, you have to have the following in your xaml file:
    >
    > <Window x:Class="SeeThru.Window1"
    > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    > Title="SeeThru" Height="300" Width="300"
    >
    > If you don't have the xmlns lines or you call it anything else, the
    > compiler will give you an error.
    >
    > And some of your code will give you errors, such as x:fkey for instance.
    > These are not actual urls. If you put them in your browser, you will get
    > "page cannot be found".
    >
    > What are they for ?
    >
    > Why a URL that doesn't exist?
    >
    > You don't have to have your computer connected to run this, so obviously
    > it is not being checked.
    >
    > Thanks,
    >
    > Tom
    >
     
    Patrice, Jan 7, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John B. Matthews
    Replies:
    4
    Views:
    669
    John B. Matthews
    Sep 12, 2008
  2. Roedy Green
    Replies:
    3
    Views:
    626
  3. Tomasz Chmielewski

    [CSS] how can I show spaces as spaces?

    Tomasz Chmielewski, Sep 5, 2009, in forum: HTML
    Replies:
    21
    Views:
    1,602
    Jan C. Faerber
    Sep 10, 2009
  4. Tomasz Chmielewski

    how can I show spaces as spaces, part 2

    Tomasz Chmielewski, Sep 9, 2009, in forum: HTML
    Replies:
    14
    Views:
    877
    Jan C. Faerber
    Sep 10, 2009
  5. johkar
    Replies:
    2
    Views:
    2,902
    Mayeul
    Dec 10, 2009
Loading...

Share This Page