Click here to Skip to main content
15,890,374 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Border as control Pin
Abhinav S22-May-10 2:30
Abhinav S22-May-10 2:30 
QuestionHow do you color a rectangle in C# that has been declared in XAML in WPF? Pin
Xarzu21-May-10 16:11
Xarzu21-May-10 16:11 
AnswerRe: How do you color a rectangle in C# that has been declared in XAML in WPF? Pin
Pete O'Hanlon21-May-10 23:44
mvePete O'Hanlon21-May-10 23:44 
GeneralRe: How do you color a rectangle in C# that has been declared in XAML in WPF? Pin
Xarzu22-May-10 1:58
Xarzu22-May-10 1:58 
GeneralRe: How do you color a rectangle in C# that has been declared in XAML in WPF? Pin
Pete O'Hanlon22-May-10 2:28
mvePete O'Hanlon22-May-10 2:28 
GeneralRe: How do you color a rectangle in C# that has been declared in XAML in WPF? Pin
Xarzu24-May-10 5:09
Xarzu24-May-10 5:09 
QuestionHow do you send a refresh message to a WPF grid or canvas? Pin
Xarzu21-May-10 16:10
Xarzu21-May-10 16:10 
AnswerRe: How do you send a refresh message to a WPF grid or canvas? Pin
Jürgen Röhr22-May-10 3:11
professionalJürgen Röhr22-May-10 3:11 
Hi,

although I'm not sure about your saying "...code that sends a line to the display...", I'll try to answer, as far as I've understood:

The "UIElement" class has a method "InvalidateVisual", which will force a complete new layout pass; Grid and Canvas derive from "UIElement" and thus have this method available. But this is a rather expensive (considering performance) way to 'refresh the screen'.

If you have a TextBlock or TextBox for the "line" in your container (Grid or Canvas), you could give it a name (in the VS designer) and access the "Text" property from code. This would work just as in WinForms. This assumes, that you know your control at design time.

The easiest and most WPF-like (and to me the only correct) way, is to bind the "Text" property of the textcontrol to a string property (say: MyText) of an object (say: class MyData) used as the container's "DataContext". The "MyData" class must implement the interface "INotifyPropertyChanged" and the "MyText" setter must fire the "PropertyChanged" event.

Now every change to the "MyText" property will be automatically be reflected in the textcontrol.

Hope this helps to get you on the right track.

Cheers
Jürgen
QuestionWPF TreeView - Get Reference To Image On Node Pin
Kevin Marois21-May-10 7:56
professionalKevin Marois21-May-10 7:56 
AnswerRe: WPF TreeView - Get Reference To Image On Node Pin
Pete O'Hanlon21-May-10 9:20
mvePete O'Hanlon21-May-10 9:20 
GeneralRe: WPF TreeView - Get Reference To Image On Node Pin
Kevin Marois21-May-10 10:20
professionalKevin Marois21-May-10 10:20 
QuestionTwo Way Data Binding In Wpf Pin
Manohar.K21-May-10 0:15
Manohar.K21-May-10 0:15 
AnswerRe: Two Way Data Binding In Wpf Pin
Pete O'Hanlon21-May-10 0:55
mvePete O'Hanlon21-May-10 0:55 
GeneralRe: Two Way Data Binding In Wpf Pin
Manohar.K21-May-10 1:35
Manohar.K21-May-10 1:35 
GeneralRe: Two Way Data Binding In Wpf Pin
Pete O'Hanlon21-May-10 1:54
mvePete O'Hanlon21-May-10 1:54 
GeneralRe: Two Way Data Binding In Wpf Pin
Manohar.K21-May-10 2:23
Manohar.K21-May-10 2:23 
GeneralRe: Two Way Data Binding In Wpf Pin
Pete O'Hanlon21-May-10 3:09
mvePete O'Hanlon21-May-10 3:09 
GeneralRe: Two Way Data Binding In Wpf Pin
Manohar.K21-May-10 4:21
Manohar.K21-May-10 4:21 
QuestionWPF: Vista style window Pin
Prasoon Chaudhary19-May-10 19:19
Prasoon Chaudhary19-May-10 19:19 
AnswerRe: WPF: Vista style window Pin
Ray Cassick20-May-10 7:31
Ray Cassick20-May-10 7:31 
QuestionRetrieving template parts [I FEEL FRENCH] Pin
#realJSOP19-May-10 9:31
mve#realJSOP19-May-10 9:31 
AnswerRe: Retrieving template parts Pin
427748019-May-10 11:11
427748019-May-10 11:11 
GeneralRe: Retrieving template parts Pin
#realJSOP20-May-10 1:24
mve#realJSOP20-May-10 1:24 
QuestionMigration Tool from ASP.NET to Silverlight Pin
Shubhabrata Mohanty19-May-10 4:27
Shubhabrata Mohanty19-May-10 4:27 
AnswerRe: Migration Tool from ASP.NET to Silverlight Pin
R. Giskard Reventlov19-May-10 4:46
R. Giskard Reventlov19-May-10 4:46 

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.