Solved

WPF List view controling Row Size

Posted on 2010-08-26
8
836 Views
Last Modified: 2013-11-12
I have a List view in my WPF  application . In its first column we are using image to display something. Whenever I increase the width  of that column row size of all the rows also increases. THe image shown inside the cell also grows up. How can i avoid this particular behaviour.
0
Comment
Question by:expash
8 Comments
 
LVL 8

Expert Comment

by:Gururaj Badam
ID: 33531893
can you post your screenshots before and after?
0
 

Author Comment

by:expash
ID: 33536661
A typical example is attached where when width of the first column is increased row height is also increased. Setting the height of the row is possible but it will have its own sideeffect and can not be used.
Prob.JPG
0
 
LVL 8

Expert Comment

by:Gururaj Badam
ID: 33539135
Did you try setting the Image size itself?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 63

Expert Comment

by:Fernando Soto
ID: 33543591
Hi expash;

Can you please post the XAML and the code behind for the above sample.

Thanks;
Fernando
0
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 500 total points
ID: 33545103
I have a feeling your first image size is proportionate and when you size the column width, the image height also resizes so maintain the proportions. Since the row height sizes to it's contents, it goes along for the ride. If you could post code, I suspect there is a simple solution.
0
 
LVL 8

Expert Comment

by:Gururaj Badam
ID: 33555996
<Rectangle Width="160" Height="120"
      Stroke="Black"
      StrokeThicknexx="1"
  <Rectangle.Fill>
    <ImageBrush ImageSource="image.jpg" />
  </Rectangle.Fill>
</Rectangle>
0
 
LVL 8

Expert Comment

by:Gururaj Badam
ID: 33555998
0
 

Author Closing Comment

by:expash
ID: 33589987
You have accurately diagnsed the problem. Though the solution is suggestive but it is simple as well. Set the "stretch" attribute of image element to "None" and the behaviour will be stopped.  
Actually i am new to C# and WPF and i was trying a very wrong approach. "No resizing of image when column with increase happens" (I was trying to trap events)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question