9 changed files with 106 additions and 14 deletions
@ -1,11 +1,23 @@ |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using Perspex.Controls.Primitives; |
|||
|
|||
namespace Perspex.Controls |
|||
{ |
|||
/// <summary>
|
|||
/// Defines the placement for a <see cref="Popup"/> control.
|
|||
/// </summary>
|
|||
public enum PlacementMode |
|||
{ |
|||
/// <summary>
|
|||
/// The popup is placed at the bottom left of its target.
|
|||
/// </summary>
|
|||
Bottom, |
|||
|
|||
/// <summary>
|
|||
/// The popup is placed at the top right of its target.
|
|||
/// </summary>
|
|||
Right, |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,27 @@ |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System; |
|||
using Perspex.Controls; |
|||
using Perspex.Input.Raw; |
|||
|
|||
namespace Perspex.Platform |
|||
{ |
|||
/// <summary>
|
|||
/// Defines a platform-specific popup window implementation.
|
|||
/// </summary>
|
|||
public interface IPopupImpl : ITopLevelImpl |
|||
{ |
|||
/// <summary>
|
|||
/// Sets the position of the popup.
|
|||
/// </summary>
|
|||
/// <param name="p">The position, in screen coordinates.</param>
|
|||
void SetPosition(Point p); |
|||
|
|||
/// <summary>
|
|||
/// Shows the popup.
|
|||
/// </summary>
|
|||
void Show(); |
|||
|
|||
/// <summary>
|
|||
/// Hides the popup.
|
|||
/// </summary>
|
|||
void Hide(); |
|||
} |
|||
} |
|||
|
|||
@ -1,14 +1,22 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System.Threading.Tasks; |
|||
using Perspex.Platform; |
|||
|
|||
namespace Perspex.Controls.Platform |
|||
{ |
|||
/// <summary>
|
|||
/// Defines a platform-specific system dialog implementation.
|
|||
/// </summary>
|
|||
public interface ISystemDialogImpl |
|||
{ |
|||
/// <summary>
|
|||
/// Shows a file dialog.
|
|||
/// </summary>
|
|||
/// <param name="dialog">The details of the file dialog to show.</param>
|
|||
/// <param name="parent">The parent window.</param>
|
|||
/// <returns>A task returning the selected filenames.</returns>
|
|||
Task<string[]> ShowFileDialogAsync(FileDialog dialog, IWindowImpl parent); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue