Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to stretch the image of (1* 66 ) pixel

How to stretch the image of (1* 66 ) pixel

Scheduled Pinned Locked Moved WPF
wpfcsharpcssdesignjson
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krishna Aditya
    wrote on last edited by
    #1

    Hi, In a WPF Application using XAML, I have 2 images, which needs to be oriental of horizantal. One is of width 784 * 66 and other is 1 * 66. while, design time, since my window is auto it shows properly, but during runtime, the window is of 1280 width... so, the image 1 * 66 should stretch and cover the rest (1280 - (784 + 1)) |____________________________|_| should become |____________________________|_______________________| which means , my firstimage should have the same width (784) and the second image should stretch to cover the rest even though its only one pixel. <Grid HorizontalAlignment="Left" Height="66" Name="grdTopImages"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="66" /> </Grid.RowDefinitions> <Image Name="imgClientPhoto" Grid.Column="0" Grid.Row="0" Source="/Honeywell.eHTMP;component/Resources/_left.gif"></Image> <Image Name="imgExtraImg" Grid.Column="1" Grid.Row="0" Stretch="Fill" Source="/Honeywell.eHTMP;component/Resources/_right.gif"></Image> </Grid> Please help me Thanks Ramm

    K 1 Reply Last reply
    0
    • K Krishna Aditya

      Hi, In a WPF Application using XAML, I have 2 images, which needs to be oriental of horizantal. One is of width 784 * 66 and other is 1 * 66. while, design time, since my window is auto it shows properly, but during runtime, the window is of 1280 width... so, the image 1 * 66 should stretch and cover the rest (1280 - (784 + 1)) |____________________________|_| should become |____________________________|_______________________| which means , my firstimage should have the same width (784) and the second image should stretch to cover the rest even though its only one pixel. <Grid HorizontalAlignment="Left" Height="66" Name="grdTopImages"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="66" /> </Grid.RowDefinitions> <Image Name="imgClientPhoto" Grid.Column="0" Grid.Row="0" Source="/Honeywell.eHTMP;component/Resources/_left.gif"></Image> <Image Name="imgExtraImg" Grid.Column="1" Grid.Row="0" Stretch="Fill" Source="/Honeywell.eHTMP;component/Resources/_right.gif"></Image> </Grid> Please help me Thanks Ramm

      K Offline
      K Offline
      Krishna Aditya
      wrote on last edited by
      #2

      Hi Guys, I could solve it, <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" MinWidth="1" /> should be the other way width property <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" MinWidth="1" /> Thanks a lot Ramm

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups