←Select platform

OnItemStyleChanged Method

Summary

Raises the ItemStyleChanged event.

Syntax

C#
VB
C++
protected virtual void OnItemStyleChanged( 
   RoutedPropertyChangedEventArgs<ImageListItemStyle> e 
) 
  
Protected Overridable Sub OnItemStyleChanged( _ 
   ByVal e As RoutedPropertyChangedEventArgs(Of ImageListItemStyle) _ 
)  
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

C#
VB
Silverlight C#
Silverlight VB
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
using Leadtools; 
using Leadtools.Codecs; 
 
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"); 
   } 
Imports Leadtools.Windows.Controls 
Imports Leadtools.Codecs 
Imports Leadtools 
 
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 
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
 
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"); 
   } 
Imports Leadtools.Windows.Controls 
 
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

See Also

Reference

ImageList Class

ImageList Members

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Controls Assembly