Geeks With Blogs

News
Steve Clements .Net and then some.... November 2009 Entries
Silverlight: Working with ActualHeight & ActualWidth at Runtime
I came up against a problem, it seems like a pretty specific problem, but none the less the solution took me a while to figure out, so worth sharing! My problem: I have a user control that contains some text among other things, but the text is of various length, the containing textblock therefore, like the user control has a dynamic height (set the Height property to System.Double.NaN). There are n instances of the user control within a StackPanel, as a control is added to the StackPanel I want a ......

Posted On Sunday, November 29, 2009 11:50 PM

Silverlight DataGrid: Scroll with mouse wheel…quick and dirty!
By Default scrolling with the mouse wheel is not enabled in the Silverlight DataGrid, actually I don’t think any control has it enabled. Personally I think its pretty standard functionality for things to scroll with the mouse wheel. So, I have got this little chunk of code that takes does the trick, nothing fancy going on here, but it works a treat. Code Snippet private void dgResults_MouseWheel(object sender, MouseWheelEventArgs e) { if (!e.Handled) { int rowsToMove = 0; if (e.Delta < 0) { rowsToMove ......

Posted On Friday, November 13, 2009 10:27 AM

Copyright © Steve Clements | Powered by: GeeksWithBlogs.net