pub struct SizeChangedEventArgs { /* private fields */ }Expand description
Provides data specific to a SizeChanged event.
Implementations§
Source§impl SizeChangedEventArgs
impl SizeChangedEventArgs
Sourcepub fn with_event<T: ?Sized>(routed_event: &RoutedEvent<T>) -> Self
pub fn with_event<T: ?Sized>(routed_event: &RoutedEvent<T>) -> Self
Creates args for a routed event.
Sourcepub fn with_event_and_source<T: ?Sized>(
routed_event: &RoutedEvent<T>,
source: impl Into<Nullable<FerroObject>>,
) -> Self
pub fn with_event_and_source<T: ?Sized>( routed_event: &RoutedEvent<T>, source: impl Into<Nullable<FerroObject>>, ) -> Self
Creates args for a routed event with a source.
Sourcepub fn new<T: ?Sized>(
routed_event: &RoutedEvent<T>,
source: impl Into<Nullable<FerroObject>>,
previous_size: Size,
new_size: Size,
) -> Self
pub fn new<T: ?Sized>( routed_event: &RoutedEvent<T>, source: impl Into<Nullable<FerroObject>>, previous_size: Size, new_size: Size, ) -> Self
Creates args for a routed event with a source and the previous and new sizes.
Sourcepub fn height_changed(&self) -> bool
pub fn height_changed(&self) -> bool
Whether the height of the new size is considered different to the previous size height.
This will take into account layout epsilon and will not be true if both heights are considered equivalent for layout purposes. Remember there can be small variations in the calculations between layout cycles due to rounding and precision even when the size has not otherwise changed.
Sourcepub fn previous_size(&self) -> Size
pub fn previous_size(&self) -> Size
The previous size (or bounds) of the object.
Sourcepub fn width_changed(&self) -> bool
pub fn width_changed(&self) -> bool
Whether the width of the new size is considered different to the previous size width.
See height_changed.
Methods from Deref<Target = RoutedEventArgs>§
Sourcepub fn handled(&self) -> bool
pub fn handled(&self) -> bool
Whether the routed event has already been handled.
Once handled, the event keeps travelling along its route but is only delivered to handlers registered for handled events too.
Sourcepub fn set_handled(&self, value: bool)
pub fn set_handled(&self, value: bool)
Marks the routed event as handled or unhandled.
Sourcepub fn routed_event(&self) -> Option<RoutedEvent>
pub fn routed_event(&self) -> Option<RoutedEvent>
The routed event associated with these args.
Sourcepub fn set_routed_event<T>(&self, value: Option<&RoutedEvent<T>>)where
T: ?Sized,
pub fn set_routed_event<T>(&self, value: Option<&RoutedEvent<T>>)where
T: ?Sized,
Sets the routed event associated with these args.
Sourcepub fn route(&self) -> RoutingStrategies
pub fn route(&self) -> RoutingStrategies
The routing strategy currently being applied to the event.
Sourcepub fn set_route(&self, value: RoutingStrategies)
pub fn set_route(&self, value: RoutingStrategies)
Sets the routing strategy currently being applied to the event.
Sourcepub fn source(&self) -> Option<Ref<FerroObject>>
pub fn source(&self) -> Option<Ref<FerroObject>>
The object that raised the event.
Sourcepub fn set_source(&self, value: impl Into<Nullable<FerroObject>>)
pub fn set_source(&self, value: impl Into<Nullable<FerroObject>>)
Sets the object that raised the event.
Sourcepub fn is_source(&self, object: &FerroObject) -> bool
pub fn is_source(&self, object: &FerroObject) -> bool
Whether object is the source of the event (C# e.Source == object).
Trait Implementations§
Source§impl Clone for SizeChangedEventArgs
impl Clone for SizeChangedEventArgs
Source§impl Default for SizeChangedEventArgs
impl Default for SizeChangedEventArgs
Source§impl Deref for SizeChangedEventArgs
impl Deref for SizeChangedEventArgs
Source§type Target = RoutedEventArgs
type Target = RoutedEventArgs
Source§fn deref(&self) -> &RoutedEventArgs
fn deref(&self) -> &RoutedEventArgs
Source§impl IRoutedEventArgs for SizeChangedEventArgs
impl IRoutedEventArgs for SizeChangedEventArgs
Source§fn as_routed_event_args(&self) -> &RoutedEventArgs
fn as_routed_event_args(&self) -> &RoutedEventArgs
Source§fn query_args(&self, type_id: TypeId) -> Option<&dyn Any>
fn query_args(&self, type_id: TypeId) -> Option<&dyn Any>
type_id, if
the args are of that type or of a type derived from it.Source§fn is_args_type(type_id: TypeId) -> bool
fn is_args_type(type_id: TypeId) -> bool
type_id or is
derived from it.handled, the source, a cancel flag, ..) is shared with them.Source§impl MarkupTyped for SizeChangedEventArgs
impl MarkupTyped for SizeChangedEventArgs
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !RefUnwindSafe for SizeChangedEventArgs
impl !Send for SizeChangedEventArgs
impl !Sync for SizeChangedEventArgs
impl !UnwindSafe for SizeChangedEventArgs
impl Freeze for SizeChangedEventArgs
impl Unpin for SizeChangedEventArgs
impl UnsafeUnpin for SizeChangedEventArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more