RE: Closing childwindow

2010-04-14 Thread Jordan Knight
Maybe have a play with UpdateSourceTrigger and BindingExpression...

http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger(VS.95).aspx



From: ozsilverlight-boun...@ozsilverlight.com 
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Stephen Price
Sent: Wednesday, 14 April 2010 3:57 PM
To: ozSilverlight
Subject: Closing childwindow

Hey all,

I've hit what seems to be a race condition, I've got a login usercontrol which 
uses a ChildWindow. when the user presses enter on the passwordbox I check if 
the key == key.enter and if the password is not blank I set the 
this.DialogResult = true; which seems to be closing the ChildWindow before the 
databinding has updated the underlaying property. Net result is if user presses 
enter then the password is null even if they have typed in a password.

I've tried both keydown and keyup with same outcome. Any suggestions on how I 
can get it to close the window after the databinding has done its thing? 
Alternatively perhaps invoke the click event on the OK button . Any ideas?

cheers,
Stephen


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


Re: Intenet Explorer (64-Bit)

2010-04-14 Thread noonie
Greetings,

I noticed that on Windows 7 64 bit the default browser is the 32 bit version
and assumed this was because of the lack of a Flash plugin.

On 14 April 2010 14:08, Ola Karlsson ola.e.karls...@gmail.com wrote:

 Hi Greg,

 Check out this Ars Technica article from January on this exact topic
 http://arstechnica.com/microsoft/news/2010/01/why-microsoft-isnt-working-on-silverlight-64-bit.ars

 Out of interest, the same same goes for Flash
 http://kb2.adobe.com/cps/000/6b3af6c9.html, no x4 support there either.

 From the Ars Technica article, it sounds like Microsoft reckons they will
 do it, but not right now.
 There just isn't enough demand for Silverlight on x64 browsers (i.e. not
 enough people use x64 browsers).


 No likely to be much demand if Microsoft default to the 32 bit version of
IE ;-)

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


Re: Closing childwindow

2010-04-14 Thread Miguel Madero
The binding is updated on lost focus not on TextChanged, however you can
force this doing something like this on your keypress:
txt.GetBinding(TextBox.Text).UpdateSource();

On Wed, Apr 14, 2010 at 4:06 PM, Jordan Knight jordan.kni...@readify.netwrote:

  Maybe have a play with UpdateSourceTrigger and BindingExpression…




 http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger(VS.95).aspx







 *From:* ozsilverlight-boun...@ozsilverlight.com [mailto:
 ozsilverlight-boun...@ozsilverlight.com] *On Behalf Of *Stephen Price
 *Sent:* Wednesday, 14 April 2010 3:57 PM
 *To:* ozSilverlight
 *Subject:* Closing childwindow



 Hey all,



 I've hit what seems to be a race condition, I've got a login usercontrol
 which uses a ChildWindow. when the user presses enter on the passwordbox I
 check if the key == key.enter and if the password is not blank I set the
 this.DialogResult = true; which seems to be closing the ChildWindow before
 the databinding has updated the underlaying property. Net result is if user
 presses enter then the password is null even if they have typed in a
 password.



 I've tried both keydown and keyup with same outcome. Any suggestions on how
 I can get it to close the window after the databinding has done its thing?
 Alternatively perhaps invoke the click event on the OK button . Any ideas?



 cheers,

 Stephen





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




-- 
Miguel A. Madero Reyes
www.miguelmadero.com (blog)
m...@miguelmadero.com
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Closing childwindow

2010-04-14 Thread Stephen Price
Thanks guys,

Bit of reading and playing and have got it working by doing exactly that.
Wasn't sure why setting it to PropertyChanged wasn't working but it looks
like the only two values (in SL3.0) are Explicit and default. There's only
one place where I want the value updated (and it hasn't lost focus) so doing
the UpdateSource is fine and works.

thanks again! :)

cheers,
Stephen

On Wed, Apr 14, 2010 at 2:37 PM, Miguel Madero m...@miguelmadero.com wrote:

 The binding is updated on lost focus not on TextChanged, however you can
 force this doing something like this on your keypress:
 txt.GetBinding(TextBox.Text).UpdateSource();

 On Wed, Apr 14, 2010 at 4:06 PM, Jordan Knight 
 jordan.kni...@readify.netwrote:

  Maybe have a play with UpdateSourceTrigger and BindingExpression…




 http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger(VS.95).aspx







 *From:* ozsilverlight-boun...@ozsilverlight.com [mailto:
 ozsilverlight-boun...@ozsilverlight.com] *On Behalf Of *Stephen Price
 *Sent:* Wednesday, 14 April 2010 3:57 PM
 *To:* ozSilverlight
 *Subject:* Closing childwindow



 Hey all,



 I've hit what seems to be a race condition, I've got a login usercontrol
 which uses a ChildWindow. when the user presses enter on the passwordbox I
 check if the key == key.enter and if the password is not blank I set the
 this.DialogResult = true; which seems to be closing the ChildWindow before
 the databinding has updated the underlaying property. Net result is if user
 presses enter then the password is null even if they have typed in a
 password.



 I've tried both keydown and keyup with same outcome. Any suggestions on
 how I can get it to close the window after the databinding has done its
 thing? Alternatively perhaps invoke the click event on the OK button . Any
 ideas?



 cheers,

 Stephen





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




 --
 Miguel A. Madero Reyes
 www.miguelmadero.com (blog)
 m...@miguelmadero.com

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


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


Re: App loading speed

2010-04-14 Thread Stephen Price
Know what you mean there. I was implementing Prism by looking at the source
code and writing my own bits with the same names that they used in Prism.
Prism was in alpha at the time. Switching over was fairly easy (mainly
because of my choice of copying that which we ended up using.)

Heck, it's all made up as we go along. Once someone stops and looks for the
common things we're making up, they smack a label on it, call it a pattern
or best practice and then its official. Remembering Silverlight was barely a
whisper three years ago (half my official development career) makes me
realise how fast things are moving still. Wh, Silverlight 4 is out this
week and I'm not even sure its hit its third birthday... nope. just checked,
it's third birthday is the 5th of September.

Agreed though, using Prism for a little project would be overkill but it
sounds like its gotten to the size where splitting things up would be of
benefit. You don't have to implement the whole of Prism, just pick the bits
out you want. If you get stuck ping me off list. I wouldn't say I'm an
expert with Prism but if I can help, be happy to.

cheers,
Stephen

On Wed, Apr 14, 2010 at 3:53 PM, Greg Keogh g...@mira.net wrote:

  Stephen, Prism would divert and solve my whole loading problem. Trouble
 is that I started this app when Prism was still in nappies and I decided to
 write my own mini-CAB which used the View-Controller pattern. I spent
 several weeks writing a demo in CAB and it was monstrous overkill for a team
 of one and half people. It made more work than it solved. I figured the same
 would happen with Prism, however I would now consider using it for any new
 large SL project, or perhaps the MVVM-lite that I saw last week.



 I was rather irritated that I followed the CAB pattern, and then last year
 everyone goes into a frenzy of MVVM and binding everything to everything
 else. Due to peer group pressure, over the last few months I’ve refactored
 my app to use binding in the MVVM style. Now my app is mostly MVVM with some
 remnants of View-Controller where I found the binding so mind-bogglingly
 difficult to  implement that I skipped it for now.



 I find that using pure binding is like building a delicate crystal palace
 made out of puzzle pieces. Binding is a clever invention, but it was
 released before anyone looked at the big picture of how to use it
 consistently and productively. I spend more time tweaking bound classes,
 properties and XML than I do writing code. Now we’ve got people advocating
 binding for method calls using wrapper classes and attached properties and
 I’m still not sure what’s the best way of doing it. It’s like it’s being
 invented on the run.



 Greg

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


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


Re: Intenet Explorer (64-Bit)

2010-04-14 Thread Sam Lai
On 14 April 2010 16:15, noonie neale.n...@gmail.com wrote:
 Greetings,
 I noticed that on Windows 7 64 bit the default browser is the 32 bit version
 and assumed this was because of the lack of a Flash plugin.

Maybe IE9 will change that? Pure speculation. Although with the
separate processes, is there much need for 64-bit?

FWIW, it is possible to have a 64-bit browser load 32-bit plugins with
some kind of wrapper - this is exactly what happens on OSX and Safari.
That said, Safari is now also going with the each tab in a separate
process approach.

 On 14 April 2010 14:08, Ola Karlsson ola.e.karls...@gmail.com wrote:

 Hi Greg,
 Check out this Ars Technica article from January on this exact
 topic http://arstechnica.com/microsoft/news/2010/01/why-microsoft-isnt-working-on-silverlight-64-bit.ars
 Out of interest, the same same goes for
 Flash http://kb2.adobe.com/cps/000/6b3af6c9.html, no x4 support there
 either.
 From the Ars Technica article, it sounds like Microsoft reckons they will
 do it, but not right now.
 There just isn't enough demand for Silverlight on x64 browsers (i.e. not
 enough people use x64 browsers).

  No likely to be much demand if Microsoft default to the 32 bit version of
 IE ;-)
 --
 noonie


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


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


Re: Closing childwindow

2010-04-14 Thread Miguel Madero
I wrote a behavior to change the time the text gets update, it basically
subscribes to the TextChanged event and does the update explicitly.

On Wed, Apr 14, 2010 at 5:38 PM, Stephen Price step...@perthprojects.comwrote:

 Thanks guys,

 Bit of reading and playing and have got it working by doing exactly that.
 Wasn't sure why setting it to PropertyChanged wasn't working but it looks
 like the only two values (in SL3.0) are Explicit and default. There's only
 one place where I want the value updated (and it hasn't lost focus) so doing
 the UpdateSource is fine and works.

 thanks again! :)

 cheers,
 Stephen
  a

 On Wed, Apr 14, 2010 at 2:37 PM, Miguel Madero m...@miguelmadero.comwrote:

 The binding is updated on lost focus not on TextChanged, however you can
 force this doing something like this on your keypress:
 txt.GetBinding(TextBox.Text).UpdateSource();

   On Wed, Apr 14, 2010 at 4:06 PM, Jordan Knight 
 jordan.kni...@readify.net wrote:

Maybe have a play with UpdateSourceTrigger and BindingExpression…




 http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger(VS.95).aspx







 *From:* ozsilverlight-boun...@ozsilverlight.com [mailto:
 ozsilverlight-boun...@ozsilverlight.com] *On Behalf Of *Stephen Price
 *Sent:* Wednesday, 14 April 2010 3:57 PM
 *To:* ozSilverlight
 *Subject:* Closing childwindow



 Hey all,



 I've hit what seems to be a race condition, I've got a login usercontrol
 which uses a ChildWindow. when the user presses enter on the passwordbox I
 check if the key == key.enter and if the password is not blank I set the
 this.DialogResult = true; which seems to be closing the ChildWindow before
 the databinding has updated the underlaying property. Net result is if user
 presses enter then the password is null even if they have typed in a
 password.



 I've tried both keydown and keyup with same outcome. Any suggestions on
 how I can get it to close the window after the databinding has done its
 thing? Alternatively perhaps invoke the click event on the OK button . Any
 ideas?



 cheers,

 Stephen





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




 --
 Miguel A. Madero Reyes
 www.miguelmadero.com (blog)
 m...@miguelmadero.com

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



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




-- 
Miguel A. Madero Reyes
www.miguelmadero.com (blog)
m...@miguelmadero.com
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


can i please unsubscribe, thanks

2010-04-14 Thread Barwell, Peter
 






This message and any attachment is confidential and may be privileged or 
otherwise protected from disclosure. You should immediately delete the message 
if you are not the intended recipient. If you have received this email by 
mistake please delete it from your system; you should not copy the message or 
disclose its content to anyone.



This electronic communication may contain general financial product advice but 
should not be relied upon or construed as a recommendation of any financial 
product.  The information has been prepared without taking into account your 
objectives, financial situation or needs. You should consider the Product 
Disclosure Statement relating to the financial product and consult your 
financial adviser before making a decision about whether to acquire, hold or 
dispose of a financial product. 



For further details on the financial product please go to 
http://www.bt.com.au/general/rse.asp



Past performance is not a reliable indicator of future performance.


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


Re: can i please unsubscribe, thanks

2010-04-14 Thread Jonathan Parker
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

On Thu, Apr 15, 2010 at 1:38 PM, Barwell, Peter 
peter.barw...@btfinancialgroup.com wrote:




 --

 This message and any attachment is confidential and may be privileged or
 otherwise protected from disclosure. You should immediately delete the
 message if you are not the intended recipient. If you have received this
 email by mistake please delete it from your system; you should not copy the
 message or disclose its content to anyone.

 This electronic communication may contain general financial product advice
 but should not be relied upon or construed as a recommendation of any
 financial product. The information has been prepared without taking into
 account your objectives, financial situation or needs. You should consider
 the Product Disclosure Statement relating to the financial product and
 consult your financial adviser before making a decision about whether to
 acquire, hold or dispose of a financial product.

 For further details on the financial product please go to
 http://www.bt.com.au/general/rse.asp

 Past performance is not a reliable indicator of future performance.


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


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


Re: Move Silverlight Element around in HTML

2010-04-14 Thread ross
If the SL app is inside an updatepanel I don't think you will ever win.

You could try pagemethods instead of updatepanels perhaps, assuming
the legacy permits.

I just tried it out for fun.  I have two divs, one with a SL app and
one with a html button.

On clicking the button I hid the SL div, called the page method, and
on the page method callback showed the SL div and updated a label in
the html div with the time from the server.  The SL app definitely
didn't reload, as I had a timestamp showing in the xaml side of things
that didn't change.


On Thu, Apr 15, 2010 at 1:06 PM, Jordan Knight
jordan.kni...@readify.net wrote:
 Having it outside was an option i've considered... the problem is that the
 UI is quite complex with fold out bits etc... so having it float would
 probably make it look a bit funny.

 JAK
 
 From: ozsilverlight-boun...@ozsilverlight.com
 [ozsilverlight-boun...@ozsilverlight.com] On Behalf Of John OBrien
 [j...@soulsolutions.com.au]
 Sent: Thursday, 15 April 2010 12:00 PM
 To: 'ozSilverlight'
 Subject: RE: Move Silverlight Element around in HTML

 We talking updatepanels Jordan? You need to make sure you’re SL controls are
 not within the updatepanel or they are redrawn.

 The trick we used for the Bing Maps ASP.NET control was to have the update
 panel just contain some divs used for communication while the large map
 control sat just outside. This was all encapsulated within the control, the
 developer didn’t add their own updatepanel.



 John.



 From: ozsilverlight-boun...@ozsilverlight.com
 [mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Jordan Knight
 Sent: Thursday, 15 April 2010 11:36 AM
 To: ozSilverlight
 Subject: Move Silverlight Element around in HTML



 Hey guys,



 I have a situation where an existing ASP.NET AJAX based app has a series of
 SL controls in them. Basically they don't want the SL elements to reload
 when the ajax controls refresh.



 I've had a muck around with moving the element in JS, and it can be moved no
 problem - but it re-initialises the control each time... pretty sure its the
 browser doing it.



 Does anyone have any ideas on how I might move an SL control without it
 re-initialising?



 Cheers!

 Jordan.

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


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