Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. The property 'ContentStringFormat' does not exist on the type

The property 'ContentStringFormat' does not exist on the type

Scheduled Pinned Locked Moved WPF
helpwpfcomxmltutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CrafterIt
    wrote on last edited by
    #1

    Hi! i have a problem with ContentStringFormat i get an error The property 'ContentStringFormat' does not exist on the type 'ContentControl' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. The example i follow uses this namespace, is there an other namespace i should use? Why do i get this error?

    <UserControl
    ...
    ...
    ...
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

    <StackPanel Margin="2,2,2,2">

    <ContentControl Content="{TemplateBinding IndependentValue}"
    ContentStringFormat="{}{0:MMMM d, yyyy}" />

    <ContentControl Content="{TemplateBinding DependentValue}"
    ContentStringFormat="Visits {0:###,###,###}" />

    </StackPanel>

    P 1 Reply Last reply
    0
    • C CrafterIt

      Hi! i have a problem with ContentStringFormat i get an error The property 'ContentStringFormat' does not exist on the type 'ContentControl' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. The example i follow uses this namespace, is there an other namespace i should use? Why do i get this error?

      <UserControl
      ...
      ...
      ...
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

      <StackPanel Margin="2,2,2,2">

      <ContentControl Content="{TemplateBinding IndependentValue}"
      ContentStringFormat="{}{0:MMMM d, yyyy}" />

      <ContentControl Content="{TemplateBinding DependentValue}"
      ContentStringFormat="Visits {0:###,###,###}" />

      </StackPanel>

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Is your project targeting the .NET 3.5 (SP1) or .NET 4 runtime? If you are using VS2008 and the plain vanilla .NET 3.5, you won't see this property as it was added in .NET 3.5 SP1.

      I'm not a stalker, I just know things. Oh by the way, you're out of milk.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Onyx

      C 1 Reply Last reply
      0
      • P Pete OHanlon

        Is your project targeting the .NET 3.5 (SP1) or .NET 4 runtime? If you are using VS2008 and the plain vanilla .NET 3.5, you won't see this property as it was added in .NET 3.5 SP1.

        I'm not a stalker, I just know things. Oh by the way, you're out of milk.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Onyx

        C Offline
        C Offline
        CrafterIt
        wrote on last edited by
        #3

        Hi! i use VS2010, and the SL project targets Silverlight 4 and .Net 4

        P 1 Reply Last reply
        0
        • C CrafterIt

          Hi! i use VS2010, and the SL project targets Silverlight 4 and .Net 4

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          You should have said in your post that it was Silverlight rather than WPF. AFAIK, Silverlight does not support ContentControl.ContentStringFormat. This is a WPF feature.

          I'm not a stalker, I just know things. Oh by the way, you're out of milk.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Onyx

          C 1 Reply Last reply
          0
          • P Pete OHanlon

            You should have said in your post that it was Silverlight rather than WPF. AFAIK, Silverlight does not support ContentControl.ContentStringFormat. This is a WPF feature.

            I'm not a stalker, I just know things. Oh by the way, you're out of milk.

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Onyx

            C Offline
            C Offline
            CrafterIt
            wrote on last edited by
            #5

            Ok, thanks

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups