pyrevit.forms.utils¶
Utility functions to support forms module.
-
pyrevit.forms.utils.
bitmap_from_file
(bitmap_file)¶ Create BitmapImage from a bitmap file.
Parameters: bitmap_file (str) – path to bitmap file Returns: bitmap image object Return type: BitmapImage
-
pyrevit.forms.utils.
load_component
(xaml_file, comp_type)¶ Load WPF component from xaml file.
Parameters: - xaml_file (str) – xaml file path
- comp_type (System.Windows.Controls) – WPF control type
Returns: loaded WPF control
Return type: System.Windows.Controls
-
pyrevit.forms.utils.
load_ctrl_template
(xaml_file)¶ Load System.Windows.Controls.ControlTemplate from xaml file.
Parameters: xaml_file (str) – xaml file path Returns: loaded control template Return type: System.Windows.Controls.ControlTemplate
-
pyrevit.forms.utils.
load_itemspanel_template
(xaml_file)¶ Load System.Windows.Controls.ItemsPanelTemplate from xaml file.
Parameters: xaml_file (str) – xaml file path Returns: loaded items-panel template Return type: System.Windows.Controls.ControlTemplate