mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-06 23:43:07 +02:00
Merge pull request #1135 from dotnet/adegeo-links
Correct .NET Framework links that pointed to old .NET 5 URLs
This commit is contained in:
@@ -288,7 +288,7 @@ Assigning a name to a <xref:System.Windows.FrameworkElement> differs from assign
|
||||
|
||||
- To make a <xref:System.Windows.FrameworkElement> an animation target, you give it a name by setting its <xref:System.Windows.FrameworkElement.Name%2A> property. In code, you must also use the <xref:System.Windows.FrameworkElement.RegisterName%2A> method to register the element name with the page to which it belongs.
|
||||
|
||||
- To make a <xref:System.Windows.Freezable> object an animation target in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)], you use the [x:Name Directive](/dotnet/desktop-wpf/xaml-services/xname-directive) to assign it a name. In code, you just use the <xref:System.Windows.FrameworkElement.RegisterName%2A> method to register the object with the page to which it belongs.
|
||||
- To make a <xref:System.Windows.Freezable> object an animation target in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)], you use the [x:Name Directive](/dotnet/desktop/xaml-services/xname-directive) to assign it a name. In code, you just use the <xref:System.Windows.FrameworkElement.RegisterName%2A> method to register the object with the page to which it belongs.
|
||||
|
||||
The sections that follow provide an example of naming an element in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)] and code. For more detailed information about naming and targeting, see the [Storyboards Overview](storyboards-overview.md).
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ This example shows how to use a <xref:System.Windows.Media.Animation.Storyboard>
|
||||
[!code-xaml[AnimatePropertyStoryboards#1](~/samples/snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/StoryboardExample.xaml#1)]
|
||||
|
||||
> [!NOTE]
|
||||
> Although animations can target both a <xref:System.Windows.FrameworkElement> object, such as a <xref:System.Windows.Controls.Control> or <xref:System.Windows.Controls.Panel>, and a <xref:System.Windows.Freezable> object, such as a <xref:System.Windows.Media.Brush> or <xref:System.Windows.Media.Transform>, only framework elements have a <xref:System.Windows.FrameworkElement.Name%2A> property. To assign a name to a freezable so that it can be targeted by an animation, use the [x:Name Directive](/dotnet/desktop-wpf/xaml-services/xname-directive), as the previous example shows.
|
||||
> Although animations can target both a <xref:System.Windows.FrameworkElement> object, such as a <xref:System.Windows.Controls.Control> or <xref:System.Windows.Controls.Panel>, and a <xref:System.Windows.Freezable> object, such as a <xref:System.Windows.Media.Brush> or <xref:System.Windows.Media.Transform>, only framework elements have a <xref:System.Windows.FrameworkElement.Name%2A> property. To assign a name to a freezable so that it can be targeted by an animation, use the [x:Name Directive](/dotnet/desktop/xaml-services/xname-directive), as the previous example shows.
|
||||
|
||||
If you use code, you must create a <xref:System.Windows.NameScope> for a <xref:System.Windows.FrameworkElement> and register the names of the objects to animate with that <xref:System.Windows.FrameworkElement>. To start the animations in code, use a <xref:System.Windows.Media.Animation.BeginStoryboard> action with an <xref:System.Windows.EventTrigger>. Optionally, you can use an event handler and the <xref:System.Windows.Media.Animation.Storyboard.Begin%2A> method of <xref:System.Windows.Media.Animation.Storyboard>. The following example shows how to use the <xref:System.Windows.Media.Animation.Storyboard.Begin%2A> method.
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@ In the following example, several animations are defined within a style and appl
|
||||
|
||||
Note that when animating within a style, it's possible to target objects that don't exist. For example, suppose your style uses a <xref:System.Windows.Media.SolidColorBrush> to set a Button's background property, but at some point the style is overridden and the button's background is set with a <xref:System.Windows.Media.LinearGradientBrush>. Trying to animate the <xref:System.Windows.Media.SolidColorBrush> won't throw an exception; the animation will simply fail silently.
|
||||
|
||||
For more information about storyboard targeting syntax, see the [Storyboards Overview](storyboards-overview.md). For more information about animation, see the [Animation Overview](animation-overview.md). For more information about styles, see the [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
|
||||
For more information about storyboard targeting syntax, see the [Storyboards Overview](storyboards-overview.md). For more information about animation, see the [Animation Overview](animation-overview.md). For more information about styles, see the [Styling and Templating](../controls/styles-templates-overview.md).
|
||||
|
||||
@@ -107,7 +107,7 @@ After it has a name, you can animate a property of that element.
|
||||
|
||||
<xref:System.Windows.Freezable> types are those classes that inherit from the <xref:System.Windows.Freezable> class. Examples of <xref:System.Windows.Freezable> include <xref:System.Windows.Media.SolidColorBrush>, <xref:System.Windows.Media.RotateTransform>, and <xref:System.Windows.Media.GradientStop>.
|
||||
|
||||
To enable the targeting of a <xref:System.Windows.Freezable> by an animation in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)], you use the [x:Name Directive](/dotnet/desktop-wpf/xaml-services/xname-directive) to assign it a name. In code, you use the <xref:System.Windows.NameScope.RegisterName%2A> method to register its name with the element for which you've created a <xref:System.Windows.NameScope>.
|
||||
To enable the targeting of a <xref:System.Windows.Freezable> by an animation in [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)], you use the [x:Name Directive](/dotnet/desktop/xaml-services/xname-directive) to assign it a name. In code, you use the <xref:System.Windows.NameScope.RegisterName%2A> method to register its name with the element for which you've created a <xref:System.Windows.NameScope>.
|
||||
|
||||
The following example assigns a name to a <xref:System.Windows.Freezable> object.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ This topic describes the timing behaviors of animations and other <xref:System.W
|
||||
|
||||
<a name="timelinebegin"></a>
|
||||
## The BeginTime Property
|
||||
The <xref:System.Windows.Media.Animation.Timeline.BeginTime%2A> property enables you to specify when a timeline starts. A timeline's begin time is relative to its parent timeline. A begin time of zero seconds means the timeline starts as soon as it parent starts; any other value creates an offset between when the parent timeline starts playing and when the child timeline plays. For example, a begin time of two seconds means the timeline starts playing when its parent has reached a time of two seconds. By default, all timelines have a begin time of zero seconds. You may also set a timeline's begin time to `null`, which prevents the timeline from starting. In [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)], you specify null using the [x:Null Markup Extension](/dotnet/desktop-wpf/xaml-services/xnull-markup-extension).
|
||||
The <xref:System.Windows.Media.Animation.Timeline.BeginTime%2A> property enables you to specify when a timeline starts. A timeline's begin time is relative to its parent timeline. A begin time of zero seconds means the timeline starts as soon as it parent starts; any other value creates an offset between when the parent timeline starts playing and when the child timeline plays. For example, a begin time of two seconds means the timeline starts playing when its parent has reached a time of two seconds. By default, all timelines have a begin time of zero seconds. You may also set a timeline's begin time to `null`, which prevents the timeline from starting. In [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)], you specify null using the [x:Null Markup Extension](/dotnet/desktop/xaml-services/xnull-markup-extension).
|
||||
|
||||
Note that the begin time is not applied each time a timeline repeats because of its <xref:System.Windows.Media.Animation.Timeline.RepeatBehavior%2A> setting. If you were to create an animation with a <xref:System.Windows.Media.Animation.Timeline.BeginTime%2A> of 10 seconds and a <xref:System.Windows.Media.Animation.RepeatBehavior> of <xref:System.Windows.Media.Animation.RepeatBehavior.Forever%2A>, there would be a 10-second delay before the animation played for the first time, but not for each successive repetition. However, if the animation's parent timeline were to restart or repeat, the 10-second delay would occur.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user