Click here to Skip to main content
15,897,891 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to get the physical path or fullpath of the file in silverlight? Pin
Luc Pattyn5-Aug-10 7:59
sitebuilderLuc Pattyn5-Aug-10 7:59 
GeneralRe: How to get the physical path or fullpath of the file in silverlight? Pin
Pete O'Hanlon5-Aug-10 11:55
mvePete O'Hanlon5-Aug-10 11:55 
AnswerRe: How to get the physical path or fullpath of the file in silverlight? Pin
Abhinav S5-Aug-10 18:20
Abhinav S5-Aug-10 18:20 
AnswerRe: How to get the physical path or fullpath of the file in silverlight? Pin
Kunal Chowdhury «IN»5-Aug-10 22:40
professionalKunal Chowdhury «IN»5-Aug-10 22:40 
QuestionHow do I know when a databinding has finished????? Pin
friktor4-Aug-10 21:43
friktor4-Aug-10 21:43 
AnswerRe: How do I know when a databinding has finished????? Pin
Pete O'Hanlon4-Aug-10 22:01
mvePete O'Hanlon4-Aug-10 22:01 
GeneralRe: How do I know when a databinding has finished????? Pin
friktor4-Aug-10 22:07
friktor4-Aug-10 22:07 
QuestionHow to add an image to a control via code Pin
Member 44332744-Aug-10 7:49
Member 44332744-Aug-10 7:49 
I have no problem adding an image via code if I am adding the image to the canvas of a WPF window. However I am so far unable to get the image to show if I am adding the image to a custom control that contain a canvas inside.

My setup is like this:
1) WPF Window contains a canvas: WindowCanvas
2) On the WindowCanvas, I am adding several CustomControls
3) Inside a CustomControl, I am in the XML file specifying a canvas that I give a name "ControlCanvas"
4) In the code of my application I am able to add TextBox & Ellipse etc. to an instance of the CustomControl's ControlCanvas. However, adding a Image via code to a CustomControl's ControlCanvas does not work - nothing is shown.


Image myImage;
BitmapImage myBitmap = new BitmapImage();
myBitmap.BeginInit();
myBitmap.UriSource = new Uri("Resources/Test.JPG", UriKind.Relative);
myBitmap.EndInit();

myImage = new Image();
myImage.Source = myBitmap;
myImage.Stretch = Stretch.Uniform;
myImage.Margin = new Thickness(0);
myImage.Width = 400;
myImage.Height = 266;
myImage.Visibility = Visibility.Visible;

Ellipse myEllipse = new Ellipse();
myEllipse.Width = 10;
myEllipse.Height = 20;
myEllipse.Fill = new SolidColorBrush(Colors.Red);

Custom_userControl myUserControl = new Custom_userControl();
main.TopWindow.VirtualDesktopTopCanvas.Children.Add(myUserControl);
myUserControl.myCanvas.Children.Add(myEllipse); ;
myUserControl.myCanvas.Children.Add(myImage);

QuestionHow to add item to ListView with 2 column ? Pin
Yanshof2-Aug-10 19:58
Yanshof2-Aug-10 19:58 
AnswerRe: How to add item to ListView with 2 column ? Pin
Venkatesh Mookkan2-Aug-10 20:56
Venkatesh Mookkan2-Aug-10 20:56 
GeneralRe: How to add item to ListView with 2 column ? Pin
Yanshof2-Aug-10 21:05
Yanshof2-Aug-10 21:05 
GeneralRe: How to add item to ListView with 2 column ? Pin
Yanshof3-Aug-10 19:11
Yanshof3-Aug-10 19:11 
QuestionDebug/Troubleshoot WPF Binding settings Pin
BRShroyer2-Aug-10 18:31
BRShroyer2-Aug-10 18:31 
AnswerRe: Debug/Troubleshoot WPF Binding settings Pin
Abhinav S3-Aug-10 17:04
Abhinav S3-Aug-10 17:04 
GeneralRe: Debug/Troubleshoot WPF Binding settings Pin
BRShroyer4-Aug-10 3:47
BRShroyer4-Aug-10 3:47 
GeneralRe: Debug/Troubleshoot WPF Binding settings Pin
Abhinav S4-Aug-10 18:25
Abhinav S4-Aug-10 18:25 
QuestionWPF for Windows CE 6.0 Pin
kiranpmody2-Aug-10 9:34
kiranpmody2-Aug-10 9:34 
AnswerRe: WPF for Windows CE 6.0 Pin
Pete O'Hanlon2-Aug-10 9:40
mvePete O'Hanlon2-Aug-10 9:40 
GeneralRe: WPF for Windows CE 6.0 Pin
kiranpmody2-Aug-10 9:48
kiranpmody2-Aug-10 9:48 
QuestionCannot find governing FrameworkElement or FrameworkContentElement Pin
stofel2-Aug-10 4:15
stofel2-Aug-10 4:15 
QuestionAre there any benchmarks available for measuring general WPF performance on different systems? Pin
Erik2-Aug-10 3:11
Erik2-Aug-10 3:11 
QuestionStrange error occures after writting (seemingly) working piece of xaml code in a WPF application. IDE=Visual Studio 2010 Pin
makumazan842-Aug-10 2:40
makumazan842-Aug-10 2:40 
QuestionWPF - Popup moveable? Pin
devvvy1-Aug-10 15:53
devvvy1-Aug-10 15:53 
AnswerRe: WPF - Popup moveable? Pin
Abhinav S1-Aug-10 17:11
Abhinav S1-Aug-10 17:11 
GeneralRe: WPF - Popup moveable? Pin
devvvy2-Aug-10 21:29
devvvy2-Aug-10 21:29 

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.