pub struct DesignWindowLoader;Expand description
Loads the text of a XAML document into the window the previewer shows.
Implementations§
Source§impl DesignWindowLoader
impl DesignWindowLoader
Sourcepub fn load_designer_window(
xaml: &str,
assembly_path: Option<&str>,
xaml_file_project_path: Option<&str>,
) -> Result<Ref<Window>, XamlLoadException>
pub fn load_designer_window( xaml: &str, assembly_path: Option<&str>, xaml_file_project_path: Option<&str>, ) -> Result<Ref<Window>, XamlLoadException>
LoadDesignerWindow(xaml, assemblyPath, xamlFileProjectPath): with a
render scaling of one.
Sourcepub fn load_designer_window_with_scaling(
xaml: &str,
assembly_path: Option<&str>,
xaml_file_project_path: Option<&str>,
render_scaling: f64,
) -> Result<Ref<Window>, XamlLoadException>
pub fn load_designer_window_with_scaling( xaml: &str, assembly_path: Option<&str>, xaml_file_project_path: Option<&str>, render_scaling: f64, ) -> Result<Ref<Window>, XamlLoadException>
LoadDesignerWindow(xaml, assemblyPath, xamlFileProjectPath, renderScaling).
The document is loaded by the run-time XAML loader in design mode.
What it builds is previewed as Design.CreatePreviewWithControl
decides: a window is the window, a control is the content of a new
window, a style, a resource dictionary or a data template is hosted
in the control Design.PreviewWith names, and anything else is a
message. The design-time properties of the document (Design.Width,
Design.Height, Design.DataContext, Design.DesignStyle) are
applied to the window, which is then shown.
§Panics
Panics when no run-time XAML loader is registered.
Auto Trait Implementations§
impl Freeze for DesignWindowLoader
impl RefUnwindSafe for DesignWindowLoader
impl Send for DesignWindowLoader
impl Sync for DesignWindowLoader
impl Unpin for DesignWindowLoader
impl UnsafeUnpin for DesignWindowLoader
impl UnwindSafe for DesignWindowLoader
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