Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.10
|
Leadtools.Windows.Controls Namespace > ImageList Class : OnItemStyleChanged Method |
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 )
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.
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; 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"); }
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