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. How to pass parameters to WPF ?

How to pass parameters to WPF ?

Scheduled Pinned Locked Moved WPF
csharpwpfhelptutorialquestion
6 Posts 5 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Im new in the WPF issues. I create some WPF object - this object is some square that need to be in some size. In run time i need to pass somehow the size of the square and i dont know how to do it. thanks for any help.

    M M S 3 Replies Last reply
    0
    • L Lost User

      Im new in the WPF issues. I create some WPF object - this object is some square that need to be in some size. In run time i need to pass somehow the size of the square and i dont know how to do it. thanks for any help.

      M Offline
      M Offline
      Mohammad Dayyan
      wrote on last edited by
      #2

      Please post your XAML code

      1 Reply Last reply
      0
      • L Lost User

        Im new in the WPF issues. I create some WPF object - this object is some square that need to be in some size. In run time i need to pass somehow the size of the square and i dont know how to do it. thanks for any help.

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

        Yanshof wrote:

        I create some WPF object - this object is some square

        It would really make it easier to help if you specify the class of the "some WPF object". Mark

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

        P 1 Reply Last reply
        0
        • M Mark Salsbery

          Yanshof wrote:

          I create some WPF object - this object is some square

          It would really make it easier to help if you specify the class of the "some WPF object". Mark

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

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

          SomeWpfObject, it implements ISomeWpfObject.

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          My blog | My articles | MoXAML PowerToys

          M 1 Reply Last reply
          0
          • P Pete OHanlon

            SomeWpfObject, it implements ISomeWpfObject.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            My blog | My articles | MoXAML PowerToys

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

            I need to read the docs more closely :sigh: :-D

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

            1 Reply Last reply
            0
            • L Lost User

              Im new in the WPF issues. I create some WPF object - this object is some square that need to be in some size. In run time i need to pass somehow the size of the square and i dont know how to do it. thanks for any help.

              S Offline
              S Offline
              schiebel t
              wrote on last edited by
              #6

              Hi, if your squar is any UIElement or a rectangle try this

              Rectangle myrect = new Rectangle;
              myrect.width = 10;
              myrect.height = 10;
              myrect.Margin = new Thickness(100,100,0,0);

              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