Skip to content

Commit bbeb2b9

Browse files
committed
chore: AnimatedVisualPlayer properties
1 parent 59aba6e commit bbeb2b9

File tree

4 files changed

+217
-0
lines changed

4 files changed

+217
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
// MUX Reference src\controls\dev\Generated\AnimatedVisualPlayer.properties.cpp, tag winui3/release/1.6.3, commit 66d24dfff
4+
5+
using System;
6+
using Microsoft.UI.Xaml.Media;
7+
8+
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls;
9+
10+
partial class AnimatedVisualPlayer
11+
{
12+
/// <summary>
13+
/// Gets or sets a value that specifies how animations are cached when the AnimatedVisualPlayer is idle (when PlayAsync is not active).
14+
/// </summary>
15+
public PlayerAnimationOptimization AnimationOptimization
16+
{
17+
get => (PlayerAnimationOptimization)GetValue(AnimationOptimizationProperty);
18+
set => SetValue(AnimationOptimizationProperty, value);
19+
}
20+
21+
/// <summary>
22+
/// Identifies the AnimationOptimization dependency property.
23+
/// </summary>
24+
public static DependencyProperty AnimationOptimizationProperty { get; } =
25+
DependencyProperty.Register(
26+
nameof(AnimationOptimization),
27+
typeof(PlayerAnimationOptimization),
28+
typeof(AnimatedVisualPlayer),
29+
new FrameworkPropertyMetadata(PlayerAnimationOptimization.Latency));
30+
31+
/// <summary>
32+
/// Gets or sets a value that indicates whether an animated visual plays immediately when it is loaded.
33+
/// </summary>
34+
public bool AutoPlay
35+
{
36+
get => (bool)GetValue(AutoPlayProperty);
37+
set => SetValue(AutoPlayProperty, value);
38+
}
39+
40+
/// <summary>
41+
/// Identifies the AutoPlay dependency property.
42+
/// </summary>
43+
public static DependencyProperty AutoPlayProperty { get; } =
44+
DependencyProperty.Register(
45+
nameof(AutoPlay),
46+
typeof(bool),
47+
typeof(AnimatedVisualPlayer),
48+
new FrameworkPropertyMetadata(true));
49+
50+
/// <summary>
51+
/// Gets optional diagnostics information about the last attempt to load an animated visual.
52+
/// </summary>
53+
public object Diagnostics => GetValue(DiagnosticsProperty);
54+
55+
/// <summary>
56+
/// Identifies the Diagnostics dependency property.
57+
/// </summary>
58+
public static DependencyProperty DiagnosticsProperty { get; } =
59+
DependencyProperty.Register(
60+
nameof(Diagnostics),
61+
typeof(object),
62+
typeof(AnimatedVisualPlayer),
63+
new FrameworkPropertyMetadata(null));
64+
65+
/// <summary>
66+
/// Gets the duration of the the currently loaded animated visual, or TimeSpan.Zero if no animated visual is loaded.
67+
/// </summary>
68+
public TimeSpan Duration => (TimeSpan)GetValue(DurationProperty);
69+
70+
/// <summary>
71+
/// Identifies the Duration dependency property.
72+
/// </summary>
73+
public static DependencyProperty DurationProperty { get; } =
74+
DependencyProperty.Register(
75+
nameof(Duration),
76+
typeof(TimeSpan),
77+
typeof(AnimatedVisualPlayer),
78+
new FrameworkPropertyMetadata(default(TimeSpan)));
79+
80+
/// <summary>
81+
/// Gets or sets content to display if an animated visual fails to load.
82+
/// </summary>
83+
public DataTemplate FallbackContent
84+
{
85+
get => (DataTemplate)GetValue(FallbackContentProperty);
86+
set => SetValue(FallbackContentProperty, value);
87+
}
88+
89+
/// <summary>
90+
/// Identifies the FallbackContent dependency property.
91+
/// </summary>
92+
public static DependencyProperty FallbackContentProperty { get; } =
93+
DependencyProperty.Register(
94+
nameof(FallbackContent),
95+
typeof(DataTemplate),
96+
typeof(AnimatedVisualPlayer),
97+
new FrameworkPropertyMetadata(null));
98+
99+
/// <summary>
100+
/// Gets a value that indicates whether an animated visual is loaded.
101+
/// </summary>
102+
public bool IsAnimatedVisualLoaded => (bool)GetValue(IsAnimatedVisualLoadedProperty);
103+
104+
/// <summary>
105+
/// Identifies the IsAnimatedVisualLoaded dependency property.
106+
/// </summary>
107+
public static DependencyProperty IsAnimatedVisualLoadedProperty { get; } =
108+
DependencyProperty.Register(nameof(IsAnimatedVisualLoaded), typeof(bool), typeof(AnimatedVisualPlayer), new FrameworkPropertyMetadata(false));
109+
110+
/// <summary>
111+
/// Gets a value that indicates whether an animated visual is loaded and a play is underway.
112+
/// </summary>
113+
public bool IsPlaying => (bool)GetValue(IsPlayingProperty);
114+
115+
/// <summary>
116+
/// Identifies the IsPlaying dependency property.
117+
/// </summary>
118+
public static DependencyProperty IsPlayingProperty { get; } =
119+
DependencyProperty.Register(
120+
nameof(IsPlaying),
121+
typeof(bool),
122+
typeof(AnimatedVisualPlayer),
123+
new FrameworkPropertyMetadata(false));
124+
125+
/// <summary>
126+
/// Gets or sets the rate at which the animation plays.
127+
/// </summary>
128+
public double PlaybackRate
129+
{
130+
get => (double)GetValue(PlaybackRateProperty);
131+
set => SetValue(PlaybackRateProperty, value);
132+
}
133+
134+
/// <summary>
135+
/// Identifies the PlaybackRate dependency property.
136+
/// </summary>
137+
public static DependencyProperty PlaybackRateProperty { get; } =
138+
DependencyProperty.Register(
139+
nameof(PlaybackRate),
140+
typeof(double),
141+
typeof(AnimatedVisualPlayer),
142+
new FrameworkPropertyMetadata(1.0));
143+
144+
/// <summary>
145+
/// Gets or sets the provider of the animated visual for the player.
146+
/// </summary>
147+
public IAnimatedVisualSource Source
148+
{
149+
get => (IAnimatedVisualSource)GetValue(SourceProperty);
150+
set => SetValue(SourceProperty, value);
151+
}
152+
153+
/// <summary>
154+
/// Identifies the Source dependency property.
155+
/// </summary>
156+
public static DependencyProperty SourceProperty { get; } =
157+
DependencyProperty.Register(
158+
nameof(Source),
159+
typeof(IAnimatedVisualSource),
160+
typeof(AnimatedVisualPlayer),
161+
new FrameworkPropertyMetadata(null));
162+
163+
/// <summary>
164+
/// Gets or sets a value that describes how an animated visual should be stretched to fill the destination rectangle.
165+
/// </summary>
166+
public Stretch Stretch
167+
{
168+
get => (Stretch)GetValue(StretchProperty);
169+
set => SetValue(StretchProperty, value);
170+
}
171+
172+
/// <summary>
173+
/// Identifies the Stretch dependency property.
174+
/// </summary>
175+
public static DependencyProperty StretchProperty { get; } =
176+
DependencyProperty.Register(
177+
nameof(Stretch),
178+
typeof(Stretch),
179+
typeof(AnimatedVisualPlayer),
180+
new FrameworkPropertyMetadata(Stretch.Uniform));
181+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls;
8+
9+
/// <summary>
10+
/// An element that displays and controls an IAnimatedVisual.
11+
/// </summary>
12+
public partial class AnimatedVisualPlayer
13+
{
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls;
8+
9+
partial class AnimatedVisualPlayer
10+
{
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls;
8+
9+
partial class AnimatedVisualPlayer
10+
{
11+
}

0 commit comments

Comments
 (0)