Click here to Skip to main content
15,885,757 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Alan Beasley20-Apr-10 22:34
Alan Beasley20-Apr-10 22:34 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Katka Vaughan21-Apr-10 1:15
Katka Vaughan21-Apr-10 1:15 
GeneralRe: Adding additional Brushes to the Style of a ContentControl Pin
Alan Beasley21-Apr-10 1:29
Alan Beasley21-Apr-10 1:29 
QuestionObject reference not set to an instance of an object Pin
FEMDEV22-Mar-10 2:25
FEMDEV22-Mar-10 2:25 
AnswerRe: Object reference not set to an instance of an object Pin
Pete O'Hanlon22-Mar-10 2:32
mvePete O'Hanlon22-Mar-10 2:32 
GeneralRe: Object reference not set to an instance of an object Pin
FEMDEV22-Mar-10 3:30
FEMDEV22-Mar-10 3:30 
GeneralRe: Object reference not set to an instance of an object Pin
Kevin McFarlane22-Mar-10 7:02
Kevin McFarlane22-Mar-10 7:02 
QuestionCustom Binding Extension -- how to access source object.? Pin
quetzilla21-Mar-10 15:35
quetzilla21-Mar-10 15:35 
Using this excellent article[^] I am trying to set up a custom binding extension. The issue is that when the binding finds the source object, I need to do some stuff to the source object, but I don't know where to put that code. For example, I have the following class:

class MyObject {
    public string Value { get; set; }
}


and some XAML in MainWindow.xaml:

<Button Content="{my:CustomBinding Value}">


And set the data context in code:

public MainWindow()
{
	InitializeComponent();
	this.DataContext = MyObject;
}


That much works, the Value string gets displayed on the button. But what I need to do is write code in the CustomBinding class that operates on MyObject as soon as possible, which means I need to resolve MyObject from the BindingExpression.

What I've figured out so far is that when the CustomBinding instance is created, it doesn't actually find the MyObject.Value because it needs to find the data context first in order to resolve the BindingExpression, so it doesn't actually find MyObject until the MainWindow gets laid out on screen.

So my question is, what code do I write in the CustomBindingExtension class so that it runs when the WPF layout system decides to resolve the BindingExpression to find MyObject?
AnswerRe: Custom Binding Extension -- how to access source object.? Pin
quetzilla25-Mar-10 7:05
quetzilla25-Mar-10 7:05 
QuestionCustomizing Foreground (the moving part) of a progressbar in WPF Pin
2hdass21-Mar-10 8:11
2hdass21-Mar-10 8:11 
AnswerRe: Customizing Foreground (the moving part) of a progressbar in WPF Pin
Super Lloyd22-Mar-10 12:33
Super Lloyd22-Mar-10 12:33 
GeneralRe: Customizing Foreground (the moving part) of a progressbar in WPF Pin
2hdass24-Mar-10 19:04
2hdass24-Mar-10 19:04 
QuestionUsing Java api in Silverlight.. Pin
robinjoseph10018-Mar-10 22:43
robinjoseph10018-Mar-10 22:43 
AnswerRe: Using Java api in Silverlight.. Pin
Abhinav S19-Mar-10 0:03
Abhinav S19-Mar-10 0:03 
Questionhow to get WriteableBitmap of Canvas & on canvas I have placed a Control?? Pin
urooj_mahmood18-Mar-10 22:38
urooj_mahmood18-Mar-10 22:38 
QuestionVideo On Web Pin
Mark Walter Smith18-Mar-10 21:58
Mark Walter Smith18-Mar-10 21:58 
AnswerRe: Video On Web Pin
Abhinav S18-Mar-10 22:38
Abhinav S18-Mar-10 22:38 
QuestionWhat is WCF? Pin
Dhanaraj130618-Mar-10 21:32
Dhanaraj130618-Mar-10 21:32 
AnswerRe: What is WCF? Pin
Pete O'Hanlon18-Mar-10 22:16
mvePete O'Hanlon18-Mar-10 22:16 
GeneralRe: What is WCF? [modified] Pin
Dhanaraj130618-Mar-10 22:22
Dhanaraj130618-Mar-10 22:22 
GeneralRe: What is WCF? Pin
Pete O'Hanlon18-Mar-10 23:45
mvePete O'Hanlon18-Mar-10 23:45 
GeneralRe: What is WCF? Pin
Dhanaraj130619-Mar-10 0:40
Dhanaraj130619-Mar-10 0:40 
QuestionWindows forms application popup dialog? Pin
Mattzimmerer18-Mar-10 8:12
Mattzimmerer18-Mar-10 8:12 
AnswerRe: Windows forms application popup dialog? Pin
Super Lloyd18-Mar-10 11:20
Super Lloyd18-Mar-10 11:20 
GeneralRe: Windows forms application popup dialog? Pin
Mattzimmerer18-Mar-10 12:03
Mattzimmerer18-Mar-10 12:03 

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.