Click here to Skip to main content
15,905,913 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
DEAR All,

I have problem in wpf application, In this task I have multiple images and slide control. I want it to fit when I resizing windows. My Image size must be minimum 100px. and margin between two images is 10px.

-when I resize windows first time it work fine. but when I change the slide control value then it shows blank space in right side of the panel it is not working properly.

- I want to remove space from right side and fit image in right blank space.


Any one have solution please let me know.

Thanks & regards

Rajendra Dogne
Posted
Comments
Sergey Alexandrovich Kryukov 8-May-13 0:56am    
The windows design can be screwed up in many different ways. How can we know which of those ways did you choose. Could you show at least XAML? As a rule of thumb, the whole layout behavior should be fully defined by XAML, without any additional code behind.
—SA
rajendra dogne 8-May-13 2:16am    
if I Zoom-In the images/items using a slider. It would be great if you could provide some hint, how to make it work when we zoom the images - makes the images best fit in the window
Sergey Alexandrovich Kryukov 8-May-13 2:22am    
This wasn't your original question. What's on these pictures? Could it possibly be a vector graphics? — I would highly recommend it.
—SA

1 solution

C#
HorizontalAlignment="Stretch" Margin="10" Name="listView1" VerticalAlignment="Stretch" Width="Auto" Height="Auto"
 
Share this answer
 
Comments
rajendra dogne 8-May-13 1:17am    
My code
name="wrapPanel" grid.row="1" horizontalalignment="Stretch" orientation="Horizontal" verticalalignment="Stretch" removed="#999" xmlns:x="#unknown"
KM Perumal 8-May-13 1:34am    
make ur image panel properties
rajendra dogne 8-May-13 1:37am    
<Image x:Name="img1" Source="Images/img1.png" Stretch="Fill" Margin="10" MinWidth="100px">
<Image.LayoutTransform>
<scaletransform scaley="{Binding Path=Value, ElementName=slider}" scalex="{Binding Path=Value, ElementName=slider}">
</Image.LayoutTransform>
</Image>
KM Perumal 8-May-13 1:46am    
<Image x:Name="img1" Source="Images/img1.png" Stretch="Fill" HorizontalAlignment="Stretch" Margin="10" Name="listView1" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
<Image.LayoutTransform>

</Image.LayoutTransform>
</Image>
rajendra dogne 8-May-13 2:16am    
if I Zoom-In the images/items using a slider. It would be great if you could provide some hint, how to make it work when we zoom the images - makes the images best fit in the window

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900