Windows Phone Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 26 November 2008

Silverlight Threading and Events

Posted on 16:31 by Unknown
$##$%^#$% Silverlight today is really making me tired. So I have this textbox? no big deal tha tis a search form. Users expect the return to make the form 'submit'. we know that is not exactly how Silverlight forms 'work' persay but we get the point right. no problem nothing a bit of code won't solve. so I make the 'search' button have a click event that validates the form and sents it to a class that deals with the data. and it works great.

then I make the text block have a keydown event so I can capture returns and send them along their way... if it is a return I just call the other event handler...

and one does a call to system which blows up. so the event in the key up looks like this:


private void SearchBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
SearchBtn_Click(sender, null);
}
}

but in the search btn we are trying todo an alert as I'm in a hurry and don't feel like making a nice silverlight message thingy so I just want todo this:


private void SearchBtn_Click(object sender, RoutedEventArgs e)
{
string SearchValue = SearchBox.Text.ToString();
if (SearchValue != "" && SearchValue.Length > 2)
{
DataBindMe.DataContext = CrossfaderUsers.RetrieveSearchUserList(SearchValue);
}
else
{
System.Windows.Browser.HtmlPage.Window.Alert(App.SEARCHTEXTINVALID);
}
SearchMessageBox.Visibility = Visibility.Collapsed;
}

this blows up from the keydown event apperently as it is not on the UI thread??? WT...? I mean really the 'click' event is on the UI thread but keydown is not? the error message is something to effect of namespace 'System' is not accessable due to the context? As far as I can tell by 30 minutes of googling is that this event some how is magically not on the UI thread so when I add this:


Dispatcher.BeginInvoke(delegate()
{
System.Windows.Browser.HtmlPage.Window.Alert(App.SEARCHTEXTINVALID);
});

it magically works???
Read More
Posted in dispatcher, Hacking Silverlight, silverlight 2, threading | No comments

Monday, 24 November 2008

Silverlight 2 Event bindings

Posted on 11:36 by Unknown
So in the process of working on this presentation for dev teach and the article and the book I got in a long discussion with alot of the ubber guys I work with around event binding in Silverlight. In that spirit I would like to get everyones input or at least some ones on what they think about where event bindings should take place....

checkout my post on dotnetslackers and let me know:

http://dotnetslackers.com/Community/forums/silverlight-architectural-best-pratices/t/2609.aspx
Read More
Posted in architecture, DevTeach, dotnetslackers, silverlight 2 | No comments

Friday, 21 November 2008

Silverlight 2 Architecture and CodeCamp

Posted on 11:53 by Unknown
So I was going todo a couple of sessions recently at a seattle local even called codecamp. I had a family related complication and was not able to attend (I did let the organizers know BEFORE it started, so don't go harping on me for doing it at the last moment).

Anyway one guy emailed me about getting that content available. of course this stuff will be in my book and I'm doing the presentations at DevTeach etc. but up front I'd like to point out a few things that might help get people going in the right direction.

So from a design pattern stand point the entire discussion frequently has more in comon with Hell Fire and brime stone religous discussions then real logical 'Useful' disuccusions that are actually helpful. It really is all kind of esoteric mumbo jumbo at some level.

In an effort not to get sucked into a religous war I'm going to go WAYYYY out of a limb and say the best design pattern is in fact MVP (model view presentor) as discribed in the following posts by others:



Phil Haack
http://haacked.com/archive/2006/08/09/ASP.NETSupervisingControllerModelViewPresenterFromSchematicToUnitTestsToCode.aspx
Tim Ross
http://timross.wordpress.com/2008/03/16/implementing-the-mvp-pattern-in-silverlight/

There are several ways todo it and I'm not even saying that this one is correct just it happens to be my choice for no other reason then it helps get back to some nice old CS101 ideas like 'gasp' OBJECT ORIENTED or Encapsulation sorts of things.

my code behinds are simple may data model objects are clean and my Xaml is Zen with the universe.

lets just say for the sake of moving foward that I'm going with the MVP design pattern as my prescribed method. Alot of what you do on top of that is more or less common sense. Follow stand coding conventions as they apply, following Preformance best practices where they apply, and most of all consistency.

do it, all do it and do it the same...

I really don't care which way but really I should never be able to tell who did and I should seem lots of oh yea that is logical and is the best way.

really thats is the bottom line. More to come as I work out a detailed talk track for the SLV421 presentation in case I want to give it to say my friend John todo the same presentation at another conference... ;)
Read More
Posted in architecture, best practices, design patterns, MVP, silverlight 2 | No comments

Thursday, 20 November 2008

Tired of Customers dissing your work?

Posted on 13:35 by Unknown
I saw this on Scott's status on face book a link to this:

http://dotnetpays.computerinnovationsny.com/dotnetpays/Home.aspx

very very cool. My kind of hack. not really 'Silverlight' strickly speacking but a good thing to be aware of.
Read More
Posted in ASP.NET, hack | No comments

Seattle Developer / Designer Interactive Group

Posted on 08:35 by Unknown
we had our second meeting last night. I was surprised that we had the same size audience but with alot of new faces. A big part of this was that all the adobe/flash/flex types were at the ubber adobe conference this week. Ariel posted a great post on the happenings at http://www.SeattleD2IG.com

Next month we will focus on mobile devices and we are hoping to get some cool people in this space to talk about their work. Be cool too and show up. :)
Read More
Posted in ariel, SD2IG, silverlight 2 | No comments

Monday, 17 November 2008

CodeMash and DevTeach

Posted on 10:00 by Unknown
Hm... I'm thinking I need to get my outline finished today for DevTeach. I'm exicted about both of these conferences. DevTeach I'm doing 3 sessions as planned but I found out today that I'm also doing a session at CodeMash this year.

DevTeach is giving a bunch of cool stuff to attendee's and I'm planning on having lots of swag to give out too. Now also at Codemash I get todo the same thing. Codemash is in Ohio at this cool resort and I'm doing a presentation on Silverlight 2 Arctectural Best Practices which will probably include some great 'Anti-Patterns' with the ubber Silverlight app Crossfader. If you can come check it out. :)

http://www.codemash.org/

and of

http://www.devteach.com/

both awesome conferences. :)
Read More
Posted in codemash, DevTeach, event, silverlight 2 | No comments

Friday, 7 November 2008

Crossfader Goes Live

Posted on 07:21 by Unknown
Crossfader is the largest most complicated Silverlight application to date. After a years work finaly is live. Yesterday afternoon in secret the url was changed to point to the real application. most of the dev team spent all day playing with it. Dan the business owner and Darak (Editor In Chief) are working on closing all the artist deals so hopefully all the music content will get all the real artist content loaded over the next few weeks.

As to Silverlight I went through the application and counted 54 distinct screens, dialogs and views currently in the system. Some of these are amagalmations but remember the whole things is one xap. I'm impressed it runs. :) 10 years ago a web application like this even if it wasn't all together was more likely then not going to lock up your computer. Crossfader certainly is next gen stuff and about the experience. Remember this is still just a beta but facebook will have some catching up todo :)

http://www.crossfader.com/
Read More
Posted in crossfader, identitymine, microsoft, Pixel8, silverlight 2, teched | No comments

Wednesday, 5 November 2008

Centering Content in Xaml

Posted on 22:19 by Unknown
so the other day i was trying to get some content to be dynamically centered. i noticed that the normal way i did it in beta 2 was not working... but that is what i get for using things in beta. i found a few convoluted ways to do it but found that the center align stuff on grid exists now and not only that but it works... here is what it looks like for my grid to take up' the whole area and my set size canvas to be centered on screen:
<usercontrol class="www.hackingsilverlight.net.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x="http://schemas.microsoft.com/winfx/2006/xaml" uc="clr-namespace:www.hackingsilverlight.net" >

<grid name="LayoutRoot" >


<grid name="ContentArea" verticalalignment="Center" horizontalalignment="Center" >

<canvas width="660" height="300" >

etc...

nice and simple and clean and you don't even have to have a clue what size your UI is. :)
Read More
Posted in hack, silverlight 2, xaml | No comments

Local Events about Silverlight

Posted on 10:20 by Unknown
My friend Brain from SD2IG sent me some info on a couple of local Silverlight events:


SEAFLEX MEETING Thu Nov 13 6:30pm – Thu Nov 13 8pm http://www.seaflexug.org/ 701 N 34th St, Seattle WA 98103 Created By Seattle Flex User Group (SeaFlex) Description Ryan Stewart, RIA Evangelist will present to us about the new FXG format that will be available with Flex 4. The Intro to Flex portion will cover the Food Drive Resource Locator project developed during the Flex Code Jam at the 2008 Flex360 conference. This is the 2nd anniversary of the Seattle Flex User Group, so we'll be having cake and prizes! Meeting starts at 6:30 pm (for real now) with the Intro to Flex portion, followed by introductions and the main presentation. If you'd like to network or just chit chat, show up a little early ~6:00. _____________________________ PDXUX (Portland User eXperience group) http://pdxux.net/ Next Meeting: "Silverlight 2 Launch Party"
WHEN: Tuesday 11/11/20086:30 p.m. Pizza Dinner (by Microsoft)7:00 p.m. Presentation1515 NW 19th AvePortland, OR 97209

For this month's PDXUX meeting we are celebrating the recent release of Silverlight 2 with a launch party hosted by the folks at North.
Our featured presenter is Tim Heuer, who is a Senior Program Manager for Microsoft Silverlight. He helps build the worldwide Silverlight community and is very passionate about the platform and technology in general. Having over 13 years of experience with Microsoft web technologies, Tim is excited about the opportunities that Silverlight brings for developers and designers and wants to ensure that everyone has the best information and tools available to them for success. Tim can be found online at http://timheuer.com/blog.

Along with Tim's presentation, we'll have several demo stations featuring Silverlight locals Erik Mork, Kelly White, and Jason Mauer. Learn more about Silverlight 2 features and how you can utilize them in your own web applications.

We'll also be talking about BizSpark, Microsoft's brand new program for supporting startups, and how you can get involved.
Read More
Posted in SD2IG, silverlight 2, UX | No comments

Tuesday, 4 November 2008

Seattle Code Camp

Posted on 12:42 by Unknown
In a couple weeks there is the Seattle Code Camp in Redmond that I'll be presenting the first versions of the sessions I'm doing at devteach. Early Sunday is the best day for code camp of course as I'm presenting 3 sessions straight with lunch in the middle.

https://seattle.codecamp.us/sessions.aspx#HACKING+SILVERLIGHT+2+

Come check it out and help me get ready for DevTeach.
Read More
Posted in architecture, controls, DevTeach, Hacking Silverlight, silverlight 2 | No comments
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Popular Posts

  • Silverlight Streaming in 5 minutes or less
    Microsoft as part of the whole Silverlight ‘thing’ has provided a service to allow people to upload videos and get those video streamed alon...
  • Silverlight Applications Taking All the Available Realestate
    Karim sent me this. It is a simple way make sure you Silverlight Application uses all the available realestate using just CSS: /*...
  • Silverlight TV Episode 3: Multi-Touch 101 with Silverlight
    John interviews Silverlight MVP David Kelley (thats me) about developing multi-touch applications in Silverlight. I discuss the types of mul...
  • Dependency Injection Made Easy
    Part of the whole fun with doing 'ard'd samples is just the fun of doing something not quit PC but the bottom line really is doing c...
  • Silverlight Preloader animation is the answer
    I got this email today: Hi! In our project we call a function which retrieves a data from a webservice. This function takes some time 1-3 se...
  • Silverlight 2 Event bindings
    So in the process of working on this presentation for dev teach and the article and the book I got in a long discussion with alot of the ubb...
  • Windows Phone 7 Development Using Visual Studio 2010
    with David Kelley and AppDev Windows Phone 7 is a new step for Microsoft for the mobile platform. This course will introduce the mobile OS a...
  • Dictionary Definition of Xaml (verb and noun)
    A friend 'Ariel' from www.facingblend.com did a short post about Xaml being a verb. I've heard this a few times and thought th...
  • More on Panels
    I was playing around and made a few more panels. Lets start with a random panel. This panel builds on what we learned about the animating ...
  • No Soap for you! - The No Silverlight Experience
    So I'm collecting hacks for my upcoming book, and I must say, here is a simple one, but one of my favorites... LOL! On my HackingSilver...

Categories

  • .net
  • 3D
  • adam
  • adcontrol
  • adobe
  • agile
  • algorithms
  • analytics
  • andrew
  • android
  • Animating Panel Base
  • animation
  • apache
  • apphub
  • apple
  • apps
  • architecture
  • ariel
  • article
  • ASP.NET
  • balder
  • bar camp
  • behavior
  • best practices
  • beta 1
  • beta 2
  • bi
  • bitmap effect
  • blend
  • blendables
  • blog
  • book
  • book review
  • bookreview
  • browser
  • brush
  • build
  • c#
  • channel9
  • cmm
  • codebrowser
  • codemagazine
  • codemash
  • codeplex
  • color
  • com
  • command
  • composite
  • controls
  • Craig
  • crossfader
  • csharp
  • CSS
  • custom event
  • Dan
  • data
  • datagrid
  • davidjkelley
  • davidkelley
  • ddj
  • Deep Zoom
  • dependencyproperty
  • design
  • design patterns
  • designers
  • devconnections
  • developer
  • developers
  • devin
  • DevTeach
  • dispatcher
  • dotnetslackers
  • dp
  • Dr WPF
  • easy
  • eclipse
  • ecma
  • education
  • einari
  • ET
  • event
  • exchange
  • expression
  • facebook
  • facing blend
  • Faisal
  • firestarter
  • flash
  • flex
  • font
  • free
  • fun
  • futures
  • gadget
  • game
  • games
  • gesture
  • google
  • Grid
  • hack
  • hacking
  • hacking phone 7
  • Hacking Silverlight
  • hard
  • hero
  • holst
  • howto
  • hta
  • HTML
  • html5
  • HTMLAppHostFramework
  • htmlapplication
  • ia
  • identitymine
  • IE
  • IE 8
  • iis
  • images
  • indexability
  • INETA
  • Infragistics
  • Integrator
  • interact
  • iphone
  • isolatedstorage
  • issues
  • itemscontrol
  • ixda
  • jared
  • jason cook
  • javascript
  • jeremiah
  • jobi
  • jobs
  • johnpapa
  • jordan
  • josh
  • jscript
  • json
  • Karim
  • kaxaml
  • kellywhite
  • keynote
  • KimSchmidt
  • law of
  • layout
  • linux
  • listbox
  • LOB
  • mac
  • mango
  • manning
  • marketing
  • marketplace
  • math
  • media element
  • media encoder
  • methodology
  • microsoft
  • MIX
  • MIXer
  • mobile
  • monitization
  • monitizationmodels
  • movie link
  • MSDN
  • msdnbytes
  • msdnradio
  • msretail
  • mstag
  • multitouch
  • MVP
  • MVVM
  • Netflix
  • nike
  • nui
  • object oriented
  • OOB
  • out of browser
  • packt
  • panels
  • parchment
  • parchment apps
  • paths
  • PDC
  • peter
  • phone7
  • phone7unleashed
  • phones
  • php
  • Pixel8
  • pixelshader
  • player
  • popfly
  • prediction
  • preemptive
  • preloader
  • presentations
  • radial panel
  • random panel
  • reference
  • requirements
  • retail
  • review
  • ria
  • robby
  • ROI
  • RPS
  • ryan
  • sajiv thomas
  • SCRUM
  • SD2IG
  • Sea Dragon
  • searchability
  • seattle
  • seattlesilverlight
  • seattleslug
  • sebastian
  • services
  • sharepoint
  • sharepoint2010
  • sic
  • side bar gadget
  • Silver Dragon
  • silverlight
  • silverlight 1
  • silverlight 2
  • silverlight 2.0
  • silverlight 3
  • silverlight 4
  • silverlight insiders
  • silverlight show
  • silverlight4
  • silverlight5
  • Silverlight5
  • silverlightconnections
  • silverlightcream
  • silverlighttv
  • simon
  • simonsaid
  • simple
  • SMART
  • snack
  • stackpanel
  • stevejobs
  • streaming
  • stuartcelarier
  • surface
  • symbian
  • tard
  • teched
  • TED
  • testing
  • textbox
  • TFS
  • threading
  • tim
  • tip
  • tiredallover
  • tool
  • touch
  • touchtag
  • training
  • twitter
  • ui
  • uml
  • usergroup
  • UX
  • uxdesign
  • vagas
  • victor
  • video
  • videos
  • vista
  • visual studio
  • volta
  • VS
  • vsm
  • WCF
  • win8
  • Windows7
  • windows8
  • windowsphone
  • windowsphone7
  • wirestone
  • workflow
  • wp7
  • wp7dev
  • WPF
  • wrappanel
  • wrox
  • xaml
  • xap
  • XML
  • xna
  • zen
  • zphone

Blog Archive

  • ►  2012 (5)
    • ►  May (1)
    • ►  April (2)
    • ►  March (1)
    • ►  February (1)
  • ►  2011 (29)
    • ►  December (2)
    • ►  November (2)
    • ►  October (3)
    • ►  September (1)
    • ►  August (5)
    • ►  June (5)
    • ►  May (2)
    • ►  March (1)
    • ►  February (5)
    • ►  January (3)
  • ►  2010 (51)
    • ►  December (5)
    • ►  November (4)
    • ►  October (3)
    • ►  September (5)
    • ►  August (3)
    • ►  June (3)
    • ►  May (6)
    • ►  April (3)
    • ►  March (9)
    • ►  February (3)
    • ►  January (7)
  • ►  2009 (75)
    • ►  December (3)
    • ►  November (2)
    • ►  October (3)
    • ►  September (7)
    • ►  August (4)
    • ►  July (7)
    • ►  June (9)
    • ►  May (12)
    • ►  April (13)
    • ►  March (8)
    • ►  February (2)
    • ►  January (5)
  • ▼  2008 (119)
    • ►  December (8)
    • ▼  November (10)
      • Silverlight Threading and Events
      • Silverlight 2 Event bindings
      • Silverlight 2 Architecture and CodeCamp
      • Tired of Customers dissing your work?
      • Seattle Developer / Designer Interactive Group
      • CodeMash and DevTeach
      • Crossfader Goes Live
      • Centering Content in Xaml
      • Local Events about Silverlight
      • Seattle Code Camp
    • ►  October (12)
    • ►  September (10)
    • ►  August (11)
    • ►  July (4)
    • ►  June (10)
    • ►  May (5)
    • ►  April (3)
    • ►  March (11)
    • ►  February (8)
    • ►  January (27)
  • ►  2007 (34)
    • ►  December (6)
    • ►  November (11)
    • ►  October (17)
Powered by Blogger.

About Me

Unknown
View my complete profile