(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .


Search in:


Hi friends i am datta

  • dattaraje
    0 points
    0 posts
    Sep 19, 2011, 11:15 AM
        Report Abuse

    i have one query in silverlight Design

    How can i set background image to stack panel and and how can i repeat image y axis or x axis

    if anybody is know please share with me 


All Posts

  • ppopadiyn
    Pencho Popadiyn
    591 points
    17 posts
    Sep 19, 2011, 01:30 PM
            Report Abuse

    How about this:

        <Image Source="/SilverlightApplication1;component/Test.png" Stretch="None" />

    Where "SilverlightApplication1" is the name of the project containing the image, and Test.png is the actual name of the image.

    If you want to repeat an image, you could place multiple Image controls in the StackPanel. The StackPanel has Orientation property allowing you to use either Horizontal or Vertical layout.



  • Enrai
    Martin Mihaylov
    1092 points
    6 posts
    Oct 18, 2011, 02:11 PM
            Report Abuse
    @Mr. Popadiyn,

    In that case the image is added like a content of the stack panel and not as a background. If you want to add additional content to the panel, it will get added below or next to the images (depending on the orientation).

    In order to specify an image background for the StackPanel, use the Background property in the following way:
    <StackPanel Width="500"
            <ImageBrush ImageSource="/SilverlightApplication1;component/images/background1.png"
                        Stretch="None" />

    However there is no way to make the background to repeat. As far as I know it is not possible in Silverlight. In WPF there is a TileMode property on the ImageBrush which allows you to do this.


  • Patricia Hall
    16 points
    8 posts
    Apr 15, 2013, 03:24 PM
            Report Abuse

    I think about Martin Mihaylov is absolutely right regarding SilverLight Design; Great job, Keep it up!!!

    Click to iPhone App Icon Design

  • 1

To reply to this thread you must Log In to your account


  • Asked
    931 days ago
  • Viewed
  • Last Activity
    356 days ago

Related Threads