How to pass parameters to WPF ?
-
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.
Please post your XAML code
-
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.
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:
-
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:
SomeWpfObject
, it implementsISomeWpfObject
."WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
SomeWpfObject
, it implementsISomeWpfObject
."WPF has many lovers. It's a veritable porn star!" - Josh Smith
I need to read the docs more closely :sigh: :-D
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
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.
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);