5
« on: May 31, 2009, 06:52 PM »
That shouldn't be too difficult...
In the plugin create a new UserControl, not a Control. In the XAML of the new UserControl you can design your layout with any types of controls that you need. In the code-behind create properties for value, minimum, maximum or whatever you need to pass to the control.
In the plugin, place a WrapPanel which will align the new instances automatically from left to right. Make sure you remove width and height for the WrapPanel and width for the UserControl.
Instantiate a new UserControl and add it as a child in the WrapPanel. If the content is cut off, the play around with Margin on the controls.
Topbar
|
UserControl
|
WrapPanel
|
Instance of battery UserControl