Coffeehouse Post

Single Post Permalink

View Thread: WPF image control
  • User profile image
    Ernie Booth

    vennag wrote:

    How can I place image control or any control dynamically with WPF?

    It depends on your layout panel.  If your parent is a Canvas then you would write some code like this:

    Canvas.SetLeft(controlToPosition, 30.3);
    Canvas.SetTop(controlToPosition, 100);

    if it's a grid then you would set Row and Column

    Grid.SetRow(controlToPosition, 2);
    Grid.SetColumn(controlToPosition, 0);

    - Ernie