Click here to Skip to main content
15,910,471 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Problem with this binding... Pin
SledgeHammer0118-Apr-11 11:55
SledgeHammer0118-Apr-11 11:55 
QuestionResource dictionary [modified] Pin
CrafterIt18-Apr-11 4:36
CrafterIt18-Apr-11 4:36 
AnswerRe: Resource dictionary Pin
Kunal Chowdhury «IN»20-Apr-11 22:37
professionalKunal Chowdhury «IN»20-Apr-11 22:37 
Questiondialogs must be user-initiated silverlight 4 Pin
NTheOne18-Apr-11 1:24
NTheOne18-Apr-11 1:24 
AnswerRe: dialogs must be user-initiated silverlight 4 Pin
Pete O'Hanlon18-Apr-11 2:00
mvePete O'Hanlon18-Apr-11 2:00 
GeneralRe: dialogs must be user-initiated silverlight 4 Pin
NTheOne18-Apr-11 18:53
NTheOne18-Apr-11 18:53 
AnswerRe: dialogs must be user-initiated silverlight 4 Pin
Abhinav S22-Apr-11 8:30
Abhinav S22-Apr-11 8:30 
QuestionImage control not getting resized while resizing window Pin
DavJes18-Apr-11 0:33
DavJes18-Apr-11 0:33 
Hi ,

I have a WPF - window, contains a StackPanel (designed in xmal, where height and width are Auto = 0). In code reading an image folder and adding the files to stackPanel. While adding files to image control, created a border object and intern created the image object and fina tlly adding the border to stackpanel.

Now when i try to resize the window, the stackpanel stays same size , as the image control width and hight are fixed thou the stackpanel is auto size.

below is the code snip ,

//after reading the image files, add it to stack panel
foreach (string strFile in ArrStrFiles)
{
// display the file names here
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.CacheOption = BitmapCacheOption.OnLoad;
bi.UriSource = new Uri(strFile);
bi.EndInit();

Image img = new Image();
img.Source = bi;
img.Width = 170;
img.Height = stkPanl.ActualHeight;
img.Stretch = Stretch.Fill;
img.HorizontalAlignment = HorizontalAlignment.Stretch;
img.VerticalAlignment = VerticalAlignment.Stretch;

Border border = new Border();
border.Background = new SolidColorBrush(Colors.Black);
border.BorderThickness = new Thickness(5);
border.BorderBrush = new SolidColorBrush(Colors.Black);
border.Child = img;

stkPanl.Children.Add(border);

}

xmal :

<window ...="">
<grid>
<local:scrollviewerex x:name="scrollViewerEx" margin="92.664,0,92.349,7.137" verticalscrollbarvisibility="Hidden"
="" horizontalscrollbarvisibility="Hidden" verticalalignment="Bottom" background="Black" rendertransformorigin="0.5,0.5">
<local:scrollviewerex.rendertransform>
<transformgroup&gt;
<scaletransform="">
<skewtransform>
<rotatetransform angle="360.216">
<translatetransform>


<stackpanel x:name="stkPanl" background="Black" orientation="Horizontal" rendertransformorigin="0.5,0.5">




Plz let me know how we can resize the stackPanel when the image is added thru code.

thanks
AnswerRe: Image control not getting resized while resizing window Pin
DavJes18-Apr-11 0:34
DavJes18-Apr-11 0:34 
QuestionHow to check duplicate data in listbox.itemtemplate Pin
Rocky2317-Apr-11 23:44
Rocky2317-Apr-11 23:44 
AnswerRe: How to check duplicate data in listbox.itemtemplate Pin
Abhinav S18-Apr-11 5:03
Abhinav S18-Apr-11 5:03 
GeneralRe: How to check duplicate data in listbox.itemtemplate Pin
Rocky2318-Apr-11 23:03
Rocky2318-Apr-11 23:03 
QuestionBind a UserControl string array property to containing window Pin
Jean-Louis Leroy17-Apr-11 23:08
Jean-Louis Leroy17-Apr-11 23:08 
AnswerRe: Bind a UserControl string array property to containing window Pin
Jean-Louis Leroy17-Apr-11 23:41
Jean-Louis Leroy17-Apr-11 23:41 
QuestionReceiveAsync Issues Pin
veggieCoder15-Apr-11 8:13
veggieCoder15-Apr-11 8:13 
AnswerRe: ReceiveAsync Issues Pin
SledgeHammer0115-Apr-11 10:05
SledgeHammer0115-Apr-11 10:05 
QuestionPRISM in Silverlight Pin
NTheOne15-Apr-11 0:30
NTheOne15-Apr-11 0:30 
AnswerRe: PRISM in Silverlight Pin
Tarun.K.S15-Apr-11 0:59
Tarun.K.S15-Apr-11 0:59 
AnswerRe: PRISM in Silverlight Pin
Pete O'Hanlon15-Apr-11 1:59
mvePete O'Hanlon15-Apr-11 1:59 
AnswerRe: PRISM in Silverlight Pin
Abhinav S15-Apr-11 17:58
Abhinav S15-Apr-11 17:58 
QuestionWPF PopUp control Pin
Rahul Chitte14-Apr-11 1:59
Rahul Chitte14-Apr-11 1:59 
AnswerRe: WPF PopUp control Pin
Pete O'Hanlon14-Apr-11 2:20
mvePete O'Hanlon14-Apr-11 2:20 
AnswerRe: WPF PopUp control Pin
Ian Shlasko14-Apr-11 3:19
Ian Shlasko14-Apr-11 3:19 
AnswerRe: WPF PopUp control Pin
Abhinav S14-Apr-11 3:32
Abhinav S14-Apr-11 3:32 
GeneralRe: WPF PopUp control Pin
Tarun.K.S14-Apr-11 3:50
Tarun.K.S14-Apr-11 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.