/// <summary> /// <para> /// Factory method. Creates a <see cref="WindowDecorator"/> instance based on the current application preferences (<see cref="Prefs"/>). /// </para> /// <remarks>The type of the <paramref name="window"/> parameter may be used when deciding which decorator to use.</remarks> /// </summary> /// <param name="window">A <see cref="DecorableWindow"/> instance for which the decorator should be created.</param> /// <returns></returns> internal static WindowDecorator Create(DecorableWindow window) { WindowDecorator decorator; switch (Prefs.WindowBorderDecorator) { case "Native": decorator = new NativeDecorator(window); break; case "Octgn": default: decorator = new OctgnDecorator(window); break; } return(decorator); }
/// <summary> /// Initializes a new instance of the <see cref="WindowDecorator"/> class. /// </summary> /// <param name="decorated">The <see cref="DecorableWindow"/> instance to decorate.</param> protected WindowDecorator(DecorableWindow decorated) { Decorated = decorated; }