PDC: Silverlight 2 Control Model Session (PC29) by karen October 31, 2008 12 comments Thank you to everyone who made it to my talk on Thursday! As promised, some links: Session deck Session samples Session recording Also, if you haven’t already, please take the time to fill out the online evaluation. Your comments help me be a better speaker. 🙂 Further reading Previous Next tagged with #controlmodel #pdc #silverlight #speaking #visualstatemanager
Good video and great stuff to come. When you mentioned the next release of WPF, do you mean .NET 4.0 Framework and Visual Studio 2010? Is there a guestimation for this release? Thanks.
Awesome session. Too bad I couldn’t be at the PDC. I’ve just been at Tech.Ed Brazil and wished there had been sessions as such good as this around here.
Just downloaded the session to show to my team.
Hi Karen, your session was great. There was just one answer left: do these controls support the surface api? is it possible to crate a silverlight application using gwstures?
Many thanx, Gerfried
Fab session. Can the contracts be used to leveage things such as the focus state?
I am wanting to create some custom controls that utilise the focus states so that I can target keyboard input to the focused control. You say though that the contracts aren’t used by the runtime so is there a different approach I’d need to use make use of focus states?
@shaggygi – we don’t yet have a date for .NET 4.0. we’ll post something as soon as we know.
@kelps – thanks! 🙂
@gerfried – no, today there’s no support for gestures. it’s feedback that we’ve been getting recently, and definitely something that we’ll consider.
@mark m – there are focus states for the built in controls today. if you open up Button in Blend, you’ll see Focus and Unfocused visual states. For controls that you write yourself, you just need to initiate focus state changes on GotFocus and LostFocus.
My problem is that in my custom control GotFocus and LostFocus never get called. The only time I’ve ever seem these called is when it has a child like a TextBox of ComboBox, with those element focus seems to be triggered and passed up the tree.
I’ve so far not figure out how to write a control that can maintain focus by itself, which I was sort of hoping I could so I could handle key events in the scope of what was in focus.
@MarkM – Did you set IsTabStop = true? This defaults to false.
Eureka! Thanks that was driving me nuts.
I’d read through the focus overview on msdn but didn’t realise I had to set that property.
Thanks for another great session and for the tips at the PDC Silverlight booth.
I have one more question though. How would I bind a control to another control? Let’s say I have one control that is used to control another control, and I need to tell it what control to work on? For instance a pan control to pan around an image.
In the example below the pan control is part of the template (binding shown doesn’t work but you get the idea):
Another example where the panControl is not part of the template. It’s a little simpler at first glance, but again how do I hook these together in XAML?
I know I can do this during the Load event of my page, but since the ultimate goal is to make it all templateable, and PanImage doesn’t necessarily knows about PanControl (could be in another extension assembly), adding it as a part or in the code in PanImage is not the way to go.
Dang. The XAML got stripped from my post.
Your presentation was very good, Thanks for that.
I wanted to create a simple custom control in WPF so I created a
‘Wpf Custom Control Library’ and did the same as you did in the show but I noticed that if I set Build Action=Resource for my Generic.xaml it would not work properly except for Build Action=Page
Can you tell my why is that?
Happy New Year & Thanks in advance
Your presentation in PDC 2008 was pretty good. It helps me a lot with SL and WPF.