pub struct ElementComposition;Expand description
Access to the composition visuals of the visuals of the visual tree.
Implementations§
Source§impl ElementComposition
impl ElementComposition
Sourcepub fn get_element_visual(visual: &Visual) -> Option<Rc<CompositionVisual>>
pub fn get_element_visual(visual: &Visual) -> Option<Rc<CompositionVisual>>
Gets the composition visual of a visual; None while the visual is
not attached to a compositor.
Sourcepub fn set_element_child_visual(
visual: &Visual,
composition_visual: Option<Rc<CompositionVisual>>,
)
pub fn set_element_child_visual( visual: &Visual, composition_visual: Option<Rc<CompositionVisual>>, )
Sets a composition visual that is shown as the last child of the
composition visual of visual.
Sourcepub fn get_element_child_visual(
visual: &Visual,
) -> Option<Rc<CompositionVisual>>
pub fn get_element_child_visual( visual: &Visual, ) -> Option<Rc<CompositionVisual>>
Gets the composition visual set with
set_element_child_visual.
Sourcepub fn set_implicit_show_animation(
visual: &Visual,
animation: Option<Rc<dyn ICompositionAnimationBase>>,
)
pub fn set_implicit_show_animation( visual: &Visual, animation: Option<Rc<dyn ICompositionAnimationBase>>, )
ElementCompositionPreview.SetImplicitShowAnimation: the animation, or the group of
animations, started on the composition visual of visual when the visual is added to a
visual tree or its IsVisible becomes true. Every animation needs its Target.
Sourcepub fn get_implicit_show_animation(
visual: &Visual,
) -> Option<Rc<dyn ICompositionAnimationBase>>
pub fn get_implicit_show_animation( visual: &Visual, ) -> Option<Rc<dyn ICompositionAnimationBase>>
The animation of set_implicit_show_animation.
Sourcepub fn set_implicit_hide_animation(
visual: &Visual,
animation: Option<Rc<dyn ICompositionAnimationBase>>,
)
pub fn set_implicit_hide_animation( visual: &Visual, animation: Option<Rc<dyn ICompositionAnimationBase>>, )
ElementCompositionPreview.SetImplicitHideAnimation: the animation, or the group of
animations, started on the composition visual of visual when its IsVisible becomes
false or the visual is removed from its visual tree. The visual stays visible until the
animations complete. Every animation needs its Target.
A visual removed from its tree loses its composition visual at once, so the hide animation of a removal runs on an image of the visual taken when it is removed (WinUI keeps the element itself in its unloading storage until the animation completes).
Sourcepub fn get_implicit_hide_animation(
visual: &Visual,
) -> Option<Rc<dyn ICompositionAnimationBase>>
pub fn get_implicit_hide_animation( visual: &Visual, ) -> Option<Rc<dyn ICompositionAnimationBase>>
The animation of set_implicit_hide_animation.
Sourcepub fn set_is_translation_enabled(visual: &Visual, value: bool)
pub fn set_is_translation_enabled(visual: &Visual, value: bool)
ElementCompositionPreview.SetIsTranslationEnabled. Every composition visual has a
Translation property applied after its other transforms, so translation is always
enabled; the request is recorded and changes nothing else.
Sourcepub fn is_translation_enabled(visual: &Visual) -> bool
pub fn is_translation_enabled(visual: &Visual) -> bool
Whether set_is_translation_enabled was called with
true for visual.
Auto Trait Implementations§
impl Freeze for ElementComposition
impl RefUnwindSafe for ElementComposition
impl Send for ElementComposition
impl Sync for ElementComposition
impl Unpin for ElementComposition
impl UnsafeUnpin for ElementComposition
impl UnwindSafe for ElementComposition
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