Freigeben über


Make life a little easier for designers [WPF Triggers with a little less XAML and a little less code]

**

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments

  • Anonymous
    September 11, 2008
    PingBack from http://www.easycoded.com/make-life-a-little-easier-for-designers-wpf-triggers-with-a-little-less-xaml-and-a-little-less-code/

  • Anonymous
    September 11, 2008
    I will prefer the way shown by Beatriz, since that is functionality already in-built into WPF, so why write my own attached property for it

  • Anonymous
    September 13, 2008
    I want to see Silverlight provide support for binding controls to each other. Not everything that happens in the view has a representation in the model (I think that's a fair statement). Posted more on Nikhil's blog: KierenH Posted on 9/13/2008 @ 6:55 AM http://www.nikhilk.net/ViewModel-Pattern-DLR.aspx In Wpf, controls can be bound to each other, how could we do this declaratively in Silverlight.

  • Anonymous
    March 08, 2010
    Thanks, I found this very helpful for thinking about how to split my code between the WPF Xaml and C# code behind, and what would be the best way to trigger different show/hide states in my UI.

  • Anonymous
    June 27, 2011
    The comment has been removed

  • Anonymous
    June 28, 2011
    David, I don't know if you'll see this but... Now I want to change the Beatriz type solution into this: <Button> <QuickTrigger Target='Window.Processing=True' Property='IsEnabled' Default='True' Value='False'/> Any thoughts about how to implement this concise (although admittedly more restrictive syntax) so that it "expands" into the code above (along with the <Button.Style> element etc)?

  • Anonymous
    June 28, 2011
    Thankful CluelessNewbie, Thanks for the kind words! :) If you're looking for something like a pre-processor, XAML doesn't have that. Some folks run the C pre-processor on their XAML files, but that's pretty custom and I've never gone there myself. But if you're looking to implement that functionality in a more natural manner, you might look at creating a custom markup extension or maybe an attached behavior (via an attached DependencyProperty). A web search of either phrase should turn up some good examples and help you decide which is more like what you have in mind. Hope this helps!

  • Anonymous
    July 23, 2011
    Hello. I can not make ajax toolkit combine script work. I really need help. This is the topic i made at official forums : forums.asp.net/.../1

  • Anonymous
    July 26, 2011
    Furkan Gozukara, Everything I know about using the AJAX Control Toolkit for script combining can be found here: blogs.msdn.com/.../script-combining-made-easy-overview-of-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx blogs.msdn.com/.../script-combining-made-better-overview-of-improvements-to-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx As the note at the top of the original post says, this functionality is now available from ASP.NET itself - that's documented here: www.asp.net/.../Combining%20Client%20Scripts%20into%20a%20Composite%20Script.ashx You'll probably want to use the built-in support if possible because it's likely to be easier and more supported. :) Hope this helps!