locked
Problem with vector images RRS feed

  • Question

  • Hi,

    I am trying to add a Vector Image(Xaml file) to a stackpanel which is later Set in particular row and column of a Grid of fixed size, the problem is when I add that Vector Image, it increases the size of row and column(or cell) and whole geometry of grid is disturbed. The width and height of the are grid are set to auto.

    Is there any way by which I can make the vector image fit in existing size of cell only..


    Thanks,
    Friday, November 2, 2007 5:27 PM

Answers

  • It's hard to know exactly the effect you want, but if you don't want the Grid column width and row height to change when you add something to a cell, you shouldn't use Auto.  You should be using a fixed size, or a proportion of total size (with *).

     

    If you want your vector image to assume the dimensions of a fixed-size cell, then you can put a Viewbox in the cell and put the vector image in the Viewbox.

    Saturday, November 3, 2007 1:07 AM