Recommended

Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 8 results for UI Elements.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 0 comments  /  posted by  Silverlight Show  on  Dec 16, 2009 (7 months ago)
    Tags: UI Elements , Menus , Silverlight 4
    In this post Gill Cleeren demonstrates one new feature added in Silverlight 4 - the ability to react to right-clicks in a Silverlight application.

    Because Silverlight now supports right-clicking, we can create a context menu that appears on the right-click event. We can code this context menu as we want. Right-clicking is supported on any UIElement: on the UIElement class, there are two new events added, namely the MouseRightButtonDown and the MouseRightButtonUp. Both of these new events use MouseButtonEventArgs as their event arguments, which are also used for the normal left click events.



  • 0 comments  /  posted by  Beat Kiener  on  Sep 07, 2009 (11 months ago)
    Tags: MouseWheel , UI Elements , Behaviors , Controls

    In this post Beat Kiener creates an attached behavior to support mouse wheel scrolling for any control like a combo box.

    The behavior should use the native UIElement.MouseWheel without any javascript code, because javascript is not supported in out of browser scenario.

    It sounds easy, but the problem is that the mouse wheel event is not bubbling up the visual tree as expected inside a popup control.
  • 0 comments  /  posted by  Silverlight Show  on  Aug 07, 2009 (more than a year ago)
    In this blog post Joel Neubeck creates a TargetedTriggerAction which allows you to add the trigger to a button or multiple UIElement and “Target” a panel to be flipped.

    What is really cool about this approach is that each button can contain the logic used to flip the panel (Storyboard direction, duration, etc).

  • 0 comments  /  posted by  Silverlight Show  on  Jul 31, 2009 (more than a year ago)
    In this blog post Joel Neubeck is going to create a TriggerAction which makes it incredibly simple to take two UIElements and compose them into a panel which can be flipped.

     I have demonstrated the technique many times, but here it is all packaged up in a nice reusable class.

  • 0 comments  /  posted by  Silverlight Show  on  Jul 31, 2009 (more than a year ago)
    In this blog post Joel Neubeck is going to demonstrate a simple, yet useful, example of a behavior which allows a UIElement to become dragable.

    By now most Silverlight developers should have stumbled on a great new feature of Silverlight 3 and Expression Blends, custom Triggers and Behaviors. I seriously don’t know how I lived without them!

  • Pixel Shader Effects with Silverlight 3

    0 comments  /  posted by  Silverlight Show  on  Jul 20, 2009 (more than a year ago)

    Matt Casto posted about one cool new feature the became available with Silverlight 3 - pixel shaders, also known as shader effects.

    The two most common effects – drop shadow and blur – are included with Silverlight. Its easy to add these effects to any UIElement.

  • 0 comments  /  posted by  Silverlight Show  on  Jul 17, 2009 (more than a year ago)
    Tags: WritableBitmap , Bitmap API , UI Elements , Silverlight 3
    SmartyP has been playing with one of the new features in Silverlight 3 - the Bitmap API which provides the ability to render UIElements to a bitmap and provides direct access to the pixel level information of bitmaps.

    I did a few searches tonight to get started playing with the Bitmap API and found several examples, but unfortunately none of them had any source code attached, and were written against previous SL3 betas which had different method signatures relevant to the bitmap rendering, so I wanted to go ahead and post a simple example of rendering out a UIElement to a bitmap. This example shows the output of rendering a TextBlock at various font sizes and image sizes and setting the resultant bitmaps as the source for three equal sized Image UIElements.

  • 0 comments  /  posted by  Denislav Savkov  on  Aug 29, 2008 (more than a year ago)

    In some scenarios we need to find out what are the objects located at a specific point or in a certain area. In this case we get access to the System.Windows.UIElelement objects using the UIElement.HitTest method. It can test a Rect area or a Point. The return value is a collection of the children in this area arranged from the top element to the bottom.

    C#

    Rect areaInAbsoluteCoordinates = new Rect( areaLeftCoordinate, areaTopCoordinate, areaWidth, areaHeight );
    IEnumerable<UIElement> childrenInArea = panel.HitTest(areaInAbsoluteCoordinates );

    Note! In Silverlight the coordinates for hit testing are the absolute coordinates of the application. In case you want to hit test with coordinates relative to an UIElement see our tip.

    Note! To get all the elements in an area you must use Application.Current.VisualRoot.HitTest.

    That’s it!


Join the free SilverlightShow webinar 'Silverlight's Power Features: Data Binding in Action' on August 19th 2010, 10:00 am PDT.
In this session Gill Cleeren will make with a complete overview of the data binding features Silverlight 4 has to offer. He will discuss how data binding is the enabler for applying the MVVM pattern and commanding, and will end up reviewing Blend's support for data binding, including the use of design-time data. Read more | Register Now (hide this)