using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Metadata;
namespace ControlCatalog.Controls
{
///
/// Framing options for a stage.
///
public enum SampleStage
{
Padded,
Flush,
None
}
///
/// One example on a : a card with a title (),
/// a description, the live example as content, and an optional options panel that sits beside the example
/// on wide layouts and below it on narrow ones.
///
[PseudoClasses(pcHasOptions, pcHasCode, pcNarrow, pcStageFlush, pcStageNone, pcFixedStage)]
public class SampleSection : HeaderedContentControl
{
private const string pcHasOptions = ":has-options";
private const string pcHasCode = ":has-code";
private const string pcNarrow = ":narrow";
private const string pcStageFlush = ":stage-flush";
private const string pcStageNone = ":stage-none";
private const string pcFixedStage = ":fixed-stage";
///
/// Below this width the options panel moves under the example instead of beside it.
///
private const double NarrowThreshold = 620;
public static readonly StyledProperty DescriptionProperty =
AvaloniaProperty.Register(nameof(Description));
public static readonly StyledProperty