Rounding corners.





    I added a canvas of certain height and width in shape of a rectangle to my page and gave a background color.

    How can i give round corners to the canvas to get better look of the page.



    Monday, April 23, 2012 7:13 AM


All replies

  • Canvas can't have rounded corners, but you can add a rectangle as the first element of the canvas and then give the rectangle rounded corners.  This will give the appearance that all elements in the canvas will be contained within the rectangle.

    Monday, April 23, 2012 7:44 AM

    Thanks for the reply.

    Can't we add the rounded corners to any of the layout's

    Tuesday, April 24, 2012 12:29 AM
  • Hi Krishna,

       There is a workaround for this.  Insead of making the canvas rounded, you can add a clipping path to it.  That path may be a rounded rectangle, so you can get your desired effect, as it will look like a rounded canvas .

    You can watch this video on Clipping paths to get an idea.

    Hope it Helps Laughing


    Tuesday, April 24, 2012 12:47 AM
  • Thanks Phani.

    I have a small question about the browser scrolling.

    I need the whole page to be scrolled when i add content to my layout. Now, if i increase the height of my grid or if i set height to "Auto" and add content, i cannot view the whole grid in the browser. I don't want to use scrollviewer, instead the page should be scrolled.How can i do this?


    Wednesday, April 25, 2012 12:59 AM
  • Hi Krishna,

      From what  i understood  you want to make use of browser scrolling ,right.  That means as you add content to your silverlight control, its size should increase . If this happens, then browser will automatically display the scrollbars.

    You can use javascript to change the parameters height or width of the silverlight object accordingly.  This is just an idea, see if you can implement it somehow .

    ( Just see your html or aspx page where you are using the silverlight object, and write your logic there )

    Hope it Helps Laughing


    Wednesday, April 25, 2012 6:55 AM
  • I got the browser scrolling by changing the height="100%" in the following code in aspx page

    html, body


    height: 1000px;

    overflow: auto;


    But i didn't get how to automatically make the browser scroll without setting the height.

    Wednesday, April 25, 2012 9:49 AM