C# Class WinRTXamlToolkit.Debugging.VisualTreeDebugger

The class contains an BreakOnLoaded property that allows to debug a visual tree from the control it was applied to up to the visual tree root.
Just put a breakpoint in ControlLoaded() and set VisualTreeDebugger.BreakOnLoaded="True" on any FrameworkElement/Control. Set BreakOnLoaded if you want to put the breakpoint yourself. DebugVisualTree method has a local path variable that contains a list of all elements from the visual tree root up to the debugged control. Debug Output window contains common visual tree layout properties helpful in debugging layout issues.
Mostra file Open project: xyzzer/WinRTXamlToolkit

Public Properties

Property Type Description
BreakDelayProperty DependencyProperty
BreakOnLayoutUpdatedProperty DependencyProperty
BreakOnLoadedProperty DependencyProperty
BreakOnTapProperty DependencyProperty
TraceOnLayoutUpdatedProperty DependencyProperty
TraceOnLoadedProperty DependencyProperty
TraceOnTapProperty DependencyProperty

Public Methods

Method Description
DebugVisualTree ( DependencyObject startElement, bool breakInDebugger = true ) : void

Debugs the visual tree.

GetBreakDelay ( DependencyObject d ) : double

Gets the BreakDelay property. This dependency property indicates the delay in seconds to wait after the trigger is fired before breaking in debugger.

GetBreakOnLayoutUpdated ( DependencyObject d ) : bool

Gets the BreakOnLayoutUpdated property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set has its layout updated.

GetBreakOnLoaded ( DependencyObject d ) : bool

Gets the BreakOnLoaded property. This dependency property indicates whether the debugger should BreakOnLoaded when control is loaded.

GetBreakOnTap ( DependencyObject d ) : bool

Gets the BreakOnTap property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set is tapped.

GetTraceOnLayoutUpdated ( DependencyObject d ) : bool

Gets the TraceOnLayoutUpdated property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set has its layout updated.

GetTraceOnLoaded ( DependencyObject d ) : bool

Gets the TraceOnLoaded property. This dependency property indicates whether the debugger should TraceOnLoaded when control is loaded.

GetTraceOnTap ( DependencyObject d ) : bool

Gets the TraceOnTap property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set is tapped.

SetBreakDelay ( DependencyObject d, double value ) : void

Sets the BreakDelay property. This dependency property indicates the delay in seconds to wait after the trigger is fired before breaking in debugger.

SetBreakOnLayoutUpdated ( DependencyObject d, bool value ) : void

Sets the BreakOnLayoutUpdated property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set has its layout updated.

SetBreakOnLoaded ( DependencyObject d, bool value ) : void

Sets the BreakOnLoaded property. This dependency property indicates whether the debugger should BreakOnLoaded when control is loaded.

SetBreakOnTap ( DependencyObject d, bool value ) : void

Sets the BreakOnTap property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set is tapped.

SetTraceOnLayoutUpdated ( DependencyObject d, bool value ) : void

Sets the TraceOnLayoutUpdated property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set has its layout updated.

SetTraceOnLoaded ( DependencyObject d, bool value ) : void

Sets the TraceOnLoaded property. This dependency property indicates whether the debugger should TraceOnLoaded when control is loaded.

SetTraceOnTap ( DependencyObject d, bool value ) : void

Sets the TraceOnTap property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set is tapped.

Private Methods

Method Description
BreakOnControlLayoutUpdated ( object sender, object e ) : void

Called when the control's layout updates.

BreakOnControlLoaded ( object sender, RoutedEventArgs e ) : void

Called when the control gets loaded.

BreakOnControlTapped ( object sender, GestureEventArgs args ) : void
BreakOnControlTapped ( object sender, TappedRoutedEventArgs args ) : void
BrushToString ( Brush brush ) : string

Brushes to string.

OnBreakOnLayoutUpdatedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the BreakOnLayoutUpdated property.

OnBreakOnLoadedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Called when [break on loaded changed].

OnBreakOnTapChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the BreakOnTap property.

OnTraceOnLayoutUpdatedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the TraceOnLayoutUpdated property.

OnTraceOnLoadedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Called when [Trace on loaded changed].

OnTraceOnTapChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the TraceOnTap property.

TraceDependencyObject ( DependencyObject dob, int i ) : void

Traces the dependency object.

TraceOnControlLayoutUpdated ( object sender, object e ) : void

Called when the control's layout updates.

TraceOnControlLoaded ( object sender, RoutedEventArgs e ) : void

Called when the control gets loaded.

TraceOnControlTapped ( object sender, GestureEventArgs e ) : void

Called when the control gets tapped or clicked.

TraceOnControlTapped ( object sender, TappedRoutedEventArgs e ) : void

Method Details

DebugVisualTree() public static method

Debugs the visual tree.
public static DebugVisualTree ( DependencyObject startElement, bool breakInDebugger = true ) : void
startElement DependencyObject The start element.
breakInDebugger bool if set to true the debugger will break execution.
return void

GetBreakDelay() public static method

Gets the BreakDelay property. This dependency property indicates the delay in seconds to wait after the trigger is fired before breaking in debugger.
public static GetBreakDelay ( DependencyObject d ) : double
d DependencyObject The dependency object.
return double

GetBreakOnLayoutUpdated() public static method

Gets the BreakOnLayoutUpdated property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set has its layout updated.
public static GetBreakOnLayoutUpdated ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

GetBreakOnLoaded() public static method

Gets the BreakOnLoaded property. This dependency property indicates whether the debugger should BreakOnLoaded when control is loaded.
public static GetBreakOnLoaded ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

GetBreakOnTap() public static method

Gets the BreakOnTap property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set is tapped.
public static GetBreakOnTap ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

GetTraceOnLayoutUpdated() public static method

Gets the TraceOnLayoutUpdated property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set has its layout updated.
public static GetTraceOnLayoutUpdated ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

GetTraceOnLoaded() public static method

Gets the TraceOnLoaded property. This dependency property indicates whether the debugger should TraceOnLoaded when control is loaded.
public static GetTraceOnLoaded ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

GetTraceOnTap() public static method

Gets the TraceOnTap property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set is tapped.
public static GetTraceOnTap ( DependencyObject d ) : bool
d DependencyObject /// The DependencyObject. ///
return bool

SetBreakDelay() public static method

Sets the BreakDelay property. This dependency property indicates the delay in seconds to wait after the trigger is fired before breaking in debugger.
public static SetBreakDelay ( DependencyObject d, double value ) : void
d DependencyObject The dependency object.
value double The value.
return void

SetBreakOnLayoutUpdated() public static method

Sets the BreakOnLayoutUpdated property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set has its layout updated.
public static SetBreakOnLayoutUpdated ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool if set to true /// [value]. ///
return void

SetBreakOnLoaded() public static method

Sets the BreakOnLoaded property. This dependency property indicates whether the debugger should BreakOnLoaded when control is loaded.
public static SetBreakOnLoaded ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool /// If set to true the attached debugger will break when the control /// loads. ///
return void

SetBreakOnTap() public static method

Sets the BreakOnTap property. This dependency property indicates whether the attached debugger should break when the FrameworkElement on which this property is set is tapped.
public static SetBreakOnTap ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool if set to true /// [value]. ///
return void

SetTraceOnLayoutUpdated() public static method

Sets the TraceOnLayoutUpdated property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set has its layout updated.
public static SetTraceOnLayoutUpdated ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool if set to true /// [value]. ///
return void

SetTraceOnLoaded() public static method

Sets the TraceOnLoaded property. This dependency property indicates whether the debugger should TraceOnLoaded when control is loaded.
public static SetTraceOnLoaded ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool /// If set to true the attached debugger will Trace when the control /// loads. ///
return void

SetTraceOnTap() public static method

Sets the TraceOnTap property. This dependency property indicates whether the attached debugger should Trace when the FrameworkElement on which this property is set is tapped.
public static SetTraceOnTap ( DependencyObject d, bool value ) : void
d DependencyObject /// The DependencyObject. ///
value bool if set to true /// [value]. ///
return void

Property Details

BreakDelayProperty public_oe static_oe property

BreakDelay Attached Dependency Property
public static DependencyProperty BreakDelayProperty
return DependencyProperty

BreakOnLayoutUpdatedProperty public_oe static_oe property

BreakOnLayoutUpdated Attached Dependency Property
public static DependencyProperty BreakOnLayoutUpdatedProperty
return DependencyProperty

BreakOnLoadedProperty public_oe static_oe property

BreakOnLoaded BreakOnLoaded Dependency Property
public static DependencyProperty BreakOnLoadedProperty
return DependencyProperty

BreakOnTapProperty public_oe static_oe property

BreakOnTap Attached Dependency Property
public static DependencyProperty BreakOnTapProperty
return DependencyProperty

TraceOnLayoutUpdatedProperty public_oe static_oe property

TraceOnLayoutUpdated Attached Dependency Property
public static DependencyProperty TraceOnLayoutUpdatedProperty
return DependencyProperty

TraceOnLoadedProperty public_oe static_oe property

TraceOnLoaded TraceOnLoaded Dependency Property
public static DependencyProperty TraceOnLoadedProperty
return DependencyProperty

TraceOnTapProperty public_oe static_oe property

TraceOnTap Attached Dependency Property
public static DependencyProperty TraceOnTapProperty
return DependencyProperty