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. Nothing displayed when set a line to DashStyles.Dot

Nothing displayed when set a line to DashStyles.Dot

Scheduled Pinned Locked Moved WPF
wpfwcfgraphics
2 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
    CooperWu
    wrote on last edited by
    #1

    <DockPanel LastChildFill="True" Height="18">
    <Image Height="18" Width="80">
    <Image.Source>
    <DrawingImage>
    <DrawingImage.Drawing>
    <GeometryDrawing Brush="Black">
    <GeometryDrawing.Geometry>
    <LineGeometry StartPoint="0,9" EndPoint="38,9" />
    </GeometryDrawing.Geometry>
    <GeometryDrawing.Pen>
    <Pen DashCap="Flat"
    Brush="Black"
    Thickness="0.5"
    DashStyle="{x:Static DashStyles.Dot}, Mode=OneTime}"
    />
    </GeometryDrawing.Pen>
    </GeometryDrawing>
    </DrawingImage.Drawing>
    </DrawingImage>
    </Image.Source>
    </Image>
    <TextBlock Height="18" Text="{Binding Name, Mode=OneTime}" Margin="3,2,5,0" />
    </DockPanel>

    Actually, I want to list all line styles in a ComboBox.

    Glad to discuss with you and best wishes.

    M 1 Reply Last reply
    0
    • C CooperWu

      <DockPanel LastChildFill="True" Height="18">
      <Image Height="18" Width="80">
      <Image.Source>
      <DrawingImage>
      <DrawingImage.Drawing>
      <GeometryDrawing Brush="Black">
      <GeometryDrawing.Geometry>
      <LineGeometry StartPoint="0,9" EndPoint="38,9" />
      </GeometryDrawing.Geometry>
      <GeometryDrawing.Pen>
      <Pen DashCap="Flat"
      Brush="Black"
      Thickness="0.5"
      DashStyle="{x:Static DashStyles.Dot}, Mode=OneTime}"
      />
      </GeometryDrawing.Pen>
      </GeometryDrawing>
      </DrawingImage.Drawing>
      </DrawingImage>
      </Image.Source>
      </Image>
      <TextBlock Height="18" Text="{Binding Name, Mode=OneTime}" Margin="3,2,5,0" />
      </DockPanel>

      Actually, I want to list all line styles in a ComboBox.

      Glad to discuss with you and best wishes.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      See this discussion: DashStyles.Dot Bug?[^] (try changing your DashCap to Square or Round)

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      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