Raises the
ViewStyleChanged event.
Syntax
Parameters
- e
- An RoutedPropertyChangedEventArgs that contains the event data.
Example
This example overrides the virtual events of the ImageList class.
Visual Basic | Copy Code |
---|
Public Class MyImageList : Inherits ImageList
Protected Overrides Sub OnImageSizeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Size))
MyBase.OnImageSizeChanged(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 OnScrollStyleChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageListScrollStyle))
MyBase.OnScrollStyleChanged(e)
Console.WriteLine("OnScrollStyleChanged is called")
End Sub
Protected Overrides Sub OnViewStyleChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageListViewStyle))
MyBase.OnViewStyleChanged(e)
Console.WriteLine("OnViewStyleChanged 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 OnImageSizeChanged(RoutedPropertyChangedEventArgs<Size> e) { base.OnImageSizeChanged(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 OnScrollStyleChanged(RoutedPropertyChangedEventArgs<ImageListScrollStyle> e) { base.OnScrollStyleChanged(e); Console.WriteLine("OnScrollStyleChanged is called"); } protected override void OnViewStyleChanged(RoutedPropertyChangedEventArgs<ImageListViewStyle> e) { base.OnViewStyleChanged(e); Console.WriteLine("OnViewStyleChanged 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"); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also