/// <summary> /// This method will be called once the window is initialising (after it has been added). /// Do not store a reference of the window unless you properly dispose it (remove reference once not required). /// </summary> /// <param name="window">The wpf window this panel will be added to.</param> protected override void OnInitialise(WPFWindow window) { // the presentationsource can only be received once loaded if (PresentationSource.FromVisual(window) == null) { window.Loaded += OnWindowLoaded; _window = window; } else { InitialiseBitmap(_width, _height); } }
/// <summary> /// This method invokes the initialisation of the panel (after it has been addded). /// </summary> public void Initialise(WPFWindow window) { if (UseLoadingIndicator) { _loadingIndicator = LoadingIndicatorFactory.CreateElement(window.App, window, this); ShowLoadingIndicator(); } LoadingIndicatorFactory = null; if (window is SigmaWindow) { OnInitialise((SigmaWindow)window); } OnInitialise(window); }
public Application() { Log.RegisterLogWriter(new DebuggerLogWriter()); Log.RegisterLogWriter(new ConsoleLogWriter()); // Log test. using (new ScopedLogGroup("TestGroup")) { Log.Error("testerror", 0); using (new ScopedLogGroup("TestGroupNested")) { Log.Debug("testdebug {0}", 0); } } window = new ClearSight.Core.Window.WPFWindow(1024, 786); }
/// <summary> /// This method will be called once the window is initialising (after it has been added). /// Do not store a reference of the window unless you properly dispose it (remove reference once not required). /// </summary> /// <param name="window">The wpf window this panel will be added to.</param> protected virtual void OnInitialise(WPFWindow window) { }
private void OpenWindow(object sender, RoutedEventArgs e) { var window = new WPFWindow(); window.Show(); }