How to detect that a control is bound..

2010-02-14 Thread tonywr
Hi all,

I need to attach an event to a ViewModel object that is bound to a control via 
DataContext. The 
problem is, I can't attach the event in the constructor because the DataContext 
object has not 
been set at that point. So how do I attach that event if I want it to execute 
code within the control? 
I can't seem to see an OnDataContextChanged event, or anything like that. Does 
anyone know 
what I am supposed to do here?

Regards,
Tony

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: How to detect that a control is bound..

2010-02-14 Thread Carl . Scarlett
In WPF you can override the OnPropertyChanged event and wait until the
DataContext property comes through in the event args.  You can then
check e.NewValue to see what it's binding to.

 

I'm not sure if Silverlight implements this the same way though.

 

Carl.

 

Carl Scarlett

Senior .NET/WPF Developer, UX Designer - Genesis Team

IT Applications Delivery | Bankwest

A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

P: (08) 9449 8703

M: 0408 913 870

E: carl.scarl...@bankwest.com.au

 

 

 

From: ozsilverlight-boun...@ozsilverlight.com
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of
ton...@tpg.com.au
Sent: Monday, 15 February 2010 8:07 AM
To: ozsilverlight@ozsilverlight.com
Subject: How to detect that a control is bound..

 

Hi all, 

I need to attach an event to a ViewModel object that is bound to a
control via DataContext. The 
problem is, I can't attach the event in the constructor because the
DataContext object has not 
been set at that point. So how do I attach that event if I want it to
execute code within the control? 
I can't seem to see an OnDataContextChanged event, or anything like
that. Does anyone know 
what I am supposed to do here? 

Regards, 
Tony 

___ 
ozsilverlight mailing list 
ozsilverlight@ozsilverlight.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 

__ 
This email has been scanned by the MessageLabs Email Security System. 
For more information please visit http://www.messagelabs.com/email 
__ 

___
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
___


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
_
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


XAML Intellisense lost

2010-02-14 Thread Greg Keogh
Folks, after rebuilding my Win7 PC with Visual Studio 2010 and all of the
Silverlight dev kits and tools I have found that the XML/XAML intellisense
has vanished from Visual Studio. The XML/XAML is now as dumb as plain text.
Does anyone know how to get my intellisense back again?

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: XAML Intellisense lost

2010-02-14 Thread Carl . Scarlett
Could it be this issue on Scott Guthrie's blog?

 

http://weblogs.asp.net/scottgu/archive/2010/02/11/intellisense-crashing-
fix-for-vs-2010.aspx

 

Carl.

 

Carl Scarlett

Senior .NET/WPF Developer, UX Designer - Genesis Team

IT Applications Delivery | Bankwest

A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

P: (08) 9449 8703

M: 0408 913 870

E: carl.scarl...@bankwest.com.au

 

 

 

From: ozsilverlight-boun...@ozsilverlight.com
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Greg Keogh
g...@mira.net
Sent: Monday, 15 February 2010 11:05 AM
To: ozsilverlight@ozsilverlight.com
Subject: XAML Intellisense lost

 

Folks, after rebuilding my Win7 PC with Visual Studio 2010 and all of
the Silverlight dev kits and tools I have found that the XML/XAML
intellisense has vanished from Visual Studio. The XML/XAML is now as
dumb as plain text. Does anyone know how to get my intellisense back
again?

 

Greg


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

___ 
ozsilverlight mailing list 
ozsilverlight@ozsilverlight.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 

___
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
___


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
_
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: XAML Intellisense lost

2010-02-14 Thread Vishwanath Humpy
 I heard of intellesense crashing vs 2010 the other day --gt;

http://weblogs.asp.net/scottgu/archive/2010/02/11/intellisense-crashing-fix-for-vs-2010.aspx

On Mon, 15 Feb 2010 08:31:01 +0530  wrote
gt;Folks, after rebuilding my Win7 PC with Visual Studio 2010and all of the 
Silverlight dev kits and tools I have found that the XML/XAMLintellisense has 
vanished from Visual Studio. The XML/XAML is now as dumb asplain text. Does 
anyone know how to get my intellisense back 
again?Greg___
gt;ozsilverlight mailing list
gt;ozsilverlight@ozsilverlight.com
gt;http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
gt;___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: XAML Intellisense lost

2010-02-14 Thread Greg Keogh
Could it be this issue on Scott Guthrie's blog?

http://weblogs.asp.net/scottgu/archive/2010/02/11/intellisense-crashing-fix-
for-vs-2010.aspx

 

Nah, I'm not getting any crashes or errors. The intellisense is just dead no
matter if I open it via the WPF Designer (Default) or the XML edit, with or
without encoding.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: XAML Intellisense lost

2010-02-14 Thread Greg Keogh
I have found that the problem of the missing intellisense is intermittent.
It will occasionally start working again, but not very often, and I can't
find any pattern yet behind what's going on.

 

Surely I'm not alone in having a Silverlight/WPF designer in Visual Studio
2008 what is broken to hell and back.

 

Besides the mostly broken intellisense, opening XAML in the designer causes
Visual Studio 2008 to randomly and frequently crash completely with the
Send or Close dialog. It will not response to the Close button and I have
to kill the devenv.exe task.

 

If VS2008 restarts and the XAML file was the last one open, it will attempt
to reopen it and crash immediately. I have to manually delete the *.suo
files and restart Visual Studio.

 

Ignoring the fact that the designer doesn't actually design anything at all
-- it's just a XAML editor -- the highly unstable experience makes
developing Silverlight in Visual Studio a living hell and nearly doubles my
development time. At Code Camps and evening SIG meetings I never hear anyone
complain about these sorts of issues.

 

I was wondering if the experience was better in Visual Studio 2010 RC, but
when I created a new Silverlight project it crashed immediately before even
loading the solution.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight