LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly)
LEAD Technologies, Inc

OnItemStyleChanged Method

Example 





A RoutedPropertyChangedEventArgs that contains the event data.
Raises the ItemStyleChanged event.
Syntax
protected virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle> e
)
'Declaration
 
Protected Overridable Sub OnItemStyleChanged( _
   ByVal e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle) _
) 
'Usage
 
Dim instance As ImageList
Dim e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle)
 
instance.OnItemStyleChanged(e)
protected virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle> e
)
 function Leadtools.Windows.Controls.ImageList.OnItemStyleChanged( 
   e 
)
protected:
virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle>^ e
) 

Parameters

e
A RoutedPropertyChangedEventArgs that contains the event data.
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.

Example
Copy CodeCopy 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
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");
   }
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");
   }
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
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ImageList Class
ImageList Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.