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. Eliminating The standard shape of a bitmap(actually xaml based) button, How to :)?

Eliminating The standard shape of a bitmap(actually xaml based) button, How to :)?

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

    Hi I am new in WPF so in advance I apologize if it is just a simple question I have a vector based (actually xaml based) image in the resources and I want to have a button that just contain that image and I don't want to have a button that just contain that image ,I want a button that does n't have the traditional standard shape of a button, I mean I want a BitmapButton only a bitmap I want to appear instead of button , nothing else I have a code that do this but still show that standard view that I don't like Please Tell me what should I do to eliminate that. Thank you P.S Here is the code:

    <Button Grid.Row="5" Height="75" Width="220" Padding="2" >
    <ContentControl Template="{StaticResource Credit-Card}" />
    </Button>

    M 1 Reply Last reply
    0
    • C cppwxwidgetsss

      Hi I am new in WPF so in advance I apologize if it is just a simple question I have a vector based (actually xaml based) image in the resources and I want to have a button that just contain that image and I don't want to have a button that just contain that image ,I want a button that does n't have the traditional standard shape of a button, I mean I want a BitmapButton only a bitmap I want to appear instead of button , nothing else I have a code that do this but still show that standard view that I don't like Please Tell me what should I do to eliminate that. Thank you P.S Here is the code:

      <Button Grid.Row="5" Height="75" Width="220" Padding="2" >
      <ContentControl Template="{StaticResource Credit-Card}" />
      </Button>

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

      You'll probably want to change the template of the button to give it a different layout. The section "Creating a ControlTemplate" in the Controls Overview[^] has an example. Mark

      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