LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
OnItemStyleChanged Method
See Also 
Leadtools.Windows.Controls Namespace > ImageList Class : OnItemStyleChanged Method



e
A RoutedPropertyChangedEventArgs that contains the event data.
e
A RoutedPropertyChangedEventArgs that contains the event data.
Raises the ItemStyleChanged event.

Syntax

Visual Basic (Declaration) 
Protected Overridable Sub OnItemStyleChanged( _
   ByVal e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle) _
) 
Visual Basic (Usage)Copy Code
Dim instance As ImageList
Dim e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle)
 
instance.OnItemStyleChanged(e)
C# 
protected virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle> e
)
C++/CLI 
protected:
virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle>^ e
) 

Parameters

e
A RoutedPropertyChangedEventArgs that contains the event data.

Example

Visual BasicCopy Code
Public Class MyImageList : Inherits ImageList
   '.
   '.
   '.
   Protected Overrides Sub OnItemImageSizeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Size))
      MyBase.OnItemImageSizeChanged(e)
      Console.WriteLine("OnImageSizeChanged is called")
   End Sub
   Protected Overrides Sub OnItemBorderBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemBorderBrushChanged(e)
      Console.WriteLine("OnItemBorderBrushChanged is called")
   End Sub

   Protected Overrides Sub OnItemBorderThicknessChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Thickness))
      MyBase.OnItemBorderThicknessChanged(e)
      Console.WriteLine("OnItemBorderThicknessChanged is called")
   End Sub

   Protected Overrides Sub OnItemSelectedBackgroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemSelectedBackgroundChanged(e)
      Console.WriteLine("OnItemSelectedBackgroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemSelectedForegroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemSelectedForegroundChanged(e)
      Console.WriteLine("OnItemSelectedForegroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemSizeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Size))
      MyBase.OnItemSizeChanged(e)
      Console.WriteLine("OnItemSizeChanged is called")
   End Sub

   Protected Overrides Sub OnOrientationChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Orientation))
      MyBase.OnOrientationChanged(e)
      Console.WriteLine("OnOrientationChanged is called")
   End Sub

   Protected Overrides Sub OnItemStyleChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle))
      MyBase.OnItemStyleChanged(e)
      Console.WriteLine("OnItemStyleChanged is called")
   End Sub

   Protected Overrides Sub OnShowTextChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Boolean))
      MyBase.OnShowTextChanged(e)
      Console.WriteLine("OnShowTextChanged is called")
   End Sub

   Protected Overrides Sub OnItemBackgroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemBackgroundChanged(e)
      Console.WriteLine("OnItemBackgroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemForegroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemForegroundChanged(e)
      Console.WriteLine("OnItemForegroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemMarginChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Thickness))
      MyBase.OnItemMarginChanged(e)
      Console.WriteLine("OnItemMarginChanged is called")
   End Sub
C#Copy Code
public class MyImageList : ImageList
{
   //.
   //.
   //.
   protected override void OnItemImageSizeChanged(RoutedPropertyChangedEventArgs<Size> e)
   {
      base.OnItemImageSizeChanged(e);
      Console.WriteLine("OnImageSizeChanged is called");
   }
   protected override void OnItemBorderBrushChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemBorderBrushChanged(e);
      Console.WriteLine("OnItemBorderBrushChanged is called");
   }

   protected override void OnItemBorderThicknessChanged(RoutedPropertyChangedEventArgs<Thickness> e)
   {
      base.OnItemBorderThicknessChanged(e);
      Console.WriteLine("OnItemBorderThicknessChanged is called");
   }

   protected override void OnItemSelectedBackgroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemSelectedBackgroundChanged(e);
      Console.WriteLine("OnItemSelectedBackgroundChanged is called");
   }

   protected override void OnItemSelectedForegroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemSelectedForegroundChanged(e);
      Console.WriteLine("OnItemSelectedForegroundChanged is called");
   }

   protected override void OnItemSizeChanged(RoutedPropertyChangedEventArgs<Size> e)
   {
      base.OnItemSizeChanged(e);
      Console.WriteLine("OnItemSizeChanged is called");
   }

   protected override void OnOrientationChanged(RoutedPropertyChangedEventArgs<Orientation> e)
   {
      base.OnOrientationChanged(e);
      Console.WriteLine("OnOrientationChanged is called");
   }

   protected override void OnItemStyleChanged(RoutedPropertyChangedEventArgs<ImageListItemStyle> e)
   {
      base.OnItemStyleChanged(e);
      Console.WriteLine("OnItemStyleChanged is called");
   }

   protected override void OnShowTextChanged(RoutedPropertyChangedEventArgs<bool> e)
   {
      base.OnShowTextChanged(e);
      Console.WriteLine("OnShowTextChanged is called");
   }

   protected override void OnItemBackgroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemBackgroundChanged(e);
      Console.WriteLine("OnItemBackgroundChanged is called");
   }

   protected override void OnItemForegroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemForegroundChanged(e);
      Console.WriteLine("OnItemForegroundChanged is called");
   }

   protected override void OnItemMarginChanged(RoutedPropertyChangedEventArgs<Thickness> e)
   {
      base.OnItemMarginChanged(e);
      Console.WriteLine("OnItemMarginChanged is called");
   }
SilverlightCSharpCopy Code
public class MyImageList : ImageList
{
   //.
   //.
   //.
   protected override void OnItemImageSizeChanged(RoutedPropertyChangedEventArgs<Size> e)
   {
      base.OnItemImageSizeChanged(e);
      Console.WriteLine("OnImageSizeChanged is called");
   }
   protected override void OnItemBorderBrushChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemBorderBrushChanged(e);
      Console.WriteLine("OnItemBorderBrushChanged is called");
   }

   protected override void OnItemBorderThicknessChanged(RoutedPropertyChangedEventArgs<Thickness> e)
   {
      base.OnItemBorderThicknessChanged(e);
      Console.WriteLine("OnItemBorderThicknessChanged is called");
   }

   protected override void OnItemSelectedBackgroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemSelectedBackgroundChanged(e);
      Console.WriteLine("OnItemSelectedBackgroundChanged is called");
   }

   protected override void OnItemSelectedForegroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemSelectedForegroundChanged(e);
      Console.WriteLine("OnItemSelectedForegroundChanged is called");
   }

   protected override void OnItemSizeChanged(RoutedPropertyChangedEventArgs<Size> e)
   {
      base.OnItemSizeChanged(e);
      Console.WriteLine("OnItemSizeChanged is called");
   }

   protected override void OnOrientationChanged(RoutedPropertyChangedEventArgs<Orientation> e)
   {
      base.OnOrientationChanged(e);
      Console.WriteLine("OnOrientationChanged is called");
   }

   protected override void OnItemStyleChanged(RoutedPropertyChangedEventArgs<ImageListItemStyle> e)
   {
      base.OnItemStyleChanged(e);
      Console.WriteLine("OnItemStyleChanged is called");
   }

   protected override void OnShowTextChanged(RoutedPropertyChangedEventArgs<bool> e)
   {
      base.OnShowTextChanged(e);
      Console.WriteLine("OnShowTextChanged is called");
   }

   protected override void OnItemBackgroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemBackgroundChanged(e);
      Console.WriteLine("OnItemBackgroundChanged is called");
   }

   protected override void OnItemForegroundChanged(RoutedPropertyChangedEventArgs<Brush> e)
   {
      base.OnItemForegroundChanged(e);
      Console.WriteLine("OnItemForegroundChanged is called");
   }

   protected override void OnItemMarginChanged(RoutedPropertyChangedEventArgs<Thickness> e)
   {
      base.OnItemMarginChanged(e);
      Console.WriteLine("OnItemMarginChanged is called");
   }
SilverlightVBCopy Code
Public Class MyImageList : Inherits ImageList
   '.
   '.
   '.
   Protected Overrides Sub OnItemImageSizeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Size))
      MyBase.OnItemImageSizeChanged(e)
      Console.WriteLine("OnImageSizeChanged is called")
   End Sub
   Protected Overrides Sub OnItemBorderBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemBorderBrushChanged(e)
      Console.WriteLine("OnItemBorderBrushChanged is called")
   End Sub

   Protected Overrides Sub OnItemBorderThicknessChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Thickness))
      MyBase.OnItemBorderThicknessChanged(e)
      Console.WriteLine("OnItemBorderThicknessChanged is called")
   End Sub

   Protected Overrides Sub OnItemSelectedBackgroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemSelectedBackgroundChanged(e)
      Console.WriteLine("OnItemSelectedBackgroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemSelectedForegroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemSelectedForegroundChanged(e)
      Console.WriteLine("OnItemSelectedForegroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemSizeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Size))
      MyBase.OnItemSizeChanged(e)
      Console.WriteLine("OnItemSizeChanged is called")
   End Sub

   Protected Overrides Sub OnOrientationChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Orientation))
      MyBase.OnOrientationChanged(e)
      Console.WriteLine("OnOrientationChanged is called")
   End Sub

   Protected Overrides Sub OnItemStyleChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle))
      MyBase.OnItemStyleChanged(e)
      Console.WriteLine("OnItemStyleChanged is called")
   End Sub

   Protected Overrides Sub OnShowTextChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Boolean))
      MyBase.OnShowTextChanged(e)
      Console.WriteLine("OnShowTextChanged is called")
   End Sub

   Protected Overrides Sub OnItemBackgroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemBackgroundChanged(e)
      Console.WriteLine("OnItemBackgroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemForegroundChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush))
      MyBase.OnItemForegroundChanged(e)
      Console.WriteLine("OnItemForegroundChanged is called")
   End Sub

   Protected Overrides Sub OnItemMarginChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Thickness))
      MyBase.OnItemMarginChanged(e)
      Console.WriteLine("OnItemMarginChanged is called")
   End Sub

Remarks

Raising an event invokes the event handler through a delegate.

The OnItemStyleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors: When overriding OnItemStyleChanged in a derived class, be sure to call the base class's OnItemStyleChanged method so that registered delegates receive the event.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also