You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'IndexerName' attribute is valid only on an indexer that is not an explicit interface member declaration
12
12
13
-
This error occurs if you use an IndexerName attribute on an indexer that was an explicit implementation of an interface. This error may be avoided by removing the interface name from the declaration of the indexer, if possible. For more information, see the [IndexerNameAttribute Class](xref:System.Runtime.CompilerServices.IndexerNameAttribute).
13
+
This error occurs if you use an IndexerName attribute on an indexer that was an explicit implementation of an interface. This error may be avoided by removing the interface name from the declaration of the indexer, if possible. For more information, see the [IndexerNameAttribute Class](xref:System.Runtime.CompilerServices.IndexerNameAttribute).
Two indexers have different names; the IndexerName attribute must be used with the same name on every indexer within a type
12
12
13
-
The values passed to the **IndexerName** attribute must be the same for all indexers in a type. For more information on the **IndexerName** attribute, see [IndexerNameAttribute Class](xref:System.Runtime.CompilerServices.IndexerNameAttribute).
13
+
The values passed to the **IndexerName** attribute must be the same for all indexers in a type. For more information on the **IndexerName** attribute, see [IndexerNameAttribute Class](xref:System.Runtime.CompilerServices.IndexerNameAttribute).
Copy file name to clipboardExpand all lines: docs/csharp/programming-guide/concepts/linq/how-to-debug-empty-query-results-sets.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ End of result set
44
44
## Example
45
45
This example shows creation of XML in a namespace, and a query that is coded properly.
46
46
47
-
The solution is to declare and initialize an <xref:System.Xml.Linq.XNamespace> object, and to use it when specifying <xref:System.Xml.Linq.XName> objects. In this case, the argument to the <xref:System.Xml.Linq.XElement.Elements%2A> method is an <xref:System.Xml.Linq.XName> object.
47
+
The solution is to declare and initialize an <xref:System.Xml.Linq.XNamespace> object, and to use it when specifying <xref:System.Xml.Linq.XName> objects. In this case, the argument to the <xref:System.Xml.Linq.XContainer.Elements%2A> method is an <xref:System.Xml.Linq.XName> object.
If the method does not take <xref:System.Xml.Linq.SaveOptions> as an argument, then the method will format (indent) the serialized XML. In this case, all insignificant white space in the XML tree is discarded.
Copy file name to clipboardExpand all lines: docs/csharp/programming-guide/concepts/linq/scope-of-default-namespaces.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ End of result set
47
47
## Example
48
48
This example shows the creation of XML in a namespace, and a query that is coded properly.
49
49
50
-
In contrast to the incorrectly coded example above, the correct approach when using C# is to declare and initialize an <xref:System.Xml.Linq.XNamespace> object, and to use it when specifying <xref:System.Xml.Linq.XName> objects. In this case, the argument to the <xref:System.Xml.Linq.XElement.Elements%2A> method is an <xref:System.Xml.Linq.XName> object.
50
+
In contrast to the incorrectly coded example above, the correct approach when using C# is to declare and initialize an <xref:System.Xml.Linq.XNamespace> object, and to use it when specifying <xref:System.Xml.Linq.XName> objects. In this case, the argument to the <xref:System.Xml.Linq.XContainer.Elements%2A> method is an <xref:System.Xml.Linq.XName> object.
To apply an animation to an object, you create a <xref:System.Windows.Media.Animation.Storyboard> and use the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> attached properties to specify the object and property to animate.
100
+
To apply an animation to an object, you create a <xref:System.Windows.Media.Animation.Storyboard> and use the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> attached properties to specify the object and property to animate.
101
101
102
102
1. Create the <xref:System.Windows.Media.Animation.Storyboard> and add the animation as its child. The following shows how to create the <xref:System.Windows.Media.Animation.Storyboard> in XAML.
3. Use the <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> attached property to specify the property to animate. The following shows how the animation is configured to target the <xref:System.Windows.UIElement.Opacity%2A> property of the <xref:System.Windows.Shapes.Rectangle> in XAML.
125
+
3. Use the <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> attached property to specify the property to animate. The following shows how the animation is configured to target the <xref:System.Windows.UIElement.Opacity%2A> property of the <xref:System.Windows.Shapes.Rectangle> in XAML.
For more information about <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> syntax and for additional examples, see the [Storyboards Overview](../../../../docs/framework/wpf/graphics-multimedia/storyboards-overview.md).
134
+
For more information about <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> syntax and for additional examples, see the [Storyboards Overview](../../../../docs/framework/wpf/graphics-multimedia/storyboards-overview.md).
135
135
136
136
<aname="opacity_animation_step3"></a>
137
137
### Part 3 (XAML): Associate the Storyboard with a Trigger
The previous sections describe the different types of animations and their timing properties. This section shows how to apply the animation to the property that you want to animate. <xref:System.Windows.Media.Animation.Storyboard> objects provide one way to apply animations to properties. A <xref:System.Windows.Media.Animation.Storyboard> is a *container timeline* that provides targeting information for the animations it contains.
255
255
256
256
### Targeting Objects and Properties
257
-
The <xref:System.Windows.Media.Animation.Storyboard> class provides the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> attached properties. By setting these properties on an animation, you tell the animation what to animate. However, before an animation can target an object, the object must usually be given a name.
257
+
The <xref:System.Windows.Media.Animation.Storyboard> class provides the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> attached properties. By setting these properties on an animation, you tell the animation what to animate. However, before an animation can target an object, the object must usually be given a name.
258
258
259
259
Assigning a name to a <xref:System.Windows.FrameworkElement> differs from assigning a name to a <xref:System.Windows.Freezable> object. Most controls and panels are framework elements; however, most purely graphical objects, such as brushes, transforms, and geometries, are freezable objects. If you are not sure whether a type is a <xref:System.Windows.FrameworkElement> or a <xref:System.Windows.Freezable>, refer to the **Inheritance Hierarchy** section of its reference documentation.
Refer to the example in the previous section that showed how to animate the <xref:System.Windows.UIElement.Opacity%2A> of a rectangle. When the rectangle in the previous example is loaded, its event trigger applies the <xref:System.Windows.Media.Animation.Storyboard>. The timing system creates a copy of the <xref:System.Windows.Media.Animation.Storyboard> and its animation. These copies are frozen (made read-only) and <xref:System.Windows.Media.Animation.Clock> objects are created from them. These clocks do the actual work of animating the targeted properties.
298
298
299
-
The timing system creates a clock for the <xref:System.Windows.Media.Animation.DoubleAnimation> and applies it to the object and property that is specified by the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> of the <xref:System.Windows.Media.Animation.DoubleAnimation>. In this case, the timing system applies the clock to the <xref:System.Windows.UIElement.Opacity%2A> property of the object that is named "MyRectangle."
299
+
The timing system creates a clock for the <xref:System.Windows.Media.Animation.DoubleAnimation> and applies it to the object and property that is specified by the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> of the <xref:System.Windows.Media.Animation.DoubleAnimation>. In this case, the timing system applies the clock to the <xref:System.Windows.UIElement.Opacity%2A> property of the object that is named "MyRectangle."
300
300
301
301
Although a clock is also created for the <xref:System.Windows.Media.Animation.Storyboard>, the clock is not applied to any properties. Its purpose is to control its child clock, the clock that is created for the <xref:System.Windows.Media.Animation.DoubleAnimation>.
# How to: Animate a Property by Using a Storyboard
13
13
This example shows how to use a <xref:System.Windows.Media.Animation.Storyboard> to animate properties. To animate a property by using a <xref:System.Windows.Media.Animation.Storyboard>, create an animation for each property that you want to animate and also create a <xref:System.Windows.Media.Animation.Storyboard> to contain the animations.
14
14
15
-
The type of property determines the type of animation to use. For example, to animate a property that takes <xref:System.Double> values, use a <xref:System.Windows.Media.Animation.DoubleAnimation>. The <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> attached properties specify the object and property to which the animation is applied.
15
+
The type of property determines the type of animation to use. For example, to animate a property that takes <xref:System.Double> values, use a <xref:System.Windows.Media.Animation.DoubleAnimation>. The <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> attached properties specify the object and property to which the animation is applied.
16
16
17
17
To start a storyboard in [!INCLUDE[TLA#tla_xaml](../../../../includes/tlasharptla-xaml-md.md)], use a <xref:System.Windows.Media.Animation.BeginStoryboard> action and an <xref:System.Windows.EventTrigger>. The <xref:System.Windows.EventTrigger> begins the <xref:System.Windows.Media.Animation.BeginStoryboard> action when the event that is specified by its <xref:System.Windows.EventTrigger.RoutedEvent%2A> property occurs. The <xref:System.Windows.Media.Animation.BeginStoryboard> action starts the <xref:System.Windows.Media.Animation.Storyboard>.
Copy file name to clipboardExpand all lines: docs/framework/wpf/graphics-multimedia/property-animation-techniques-overview.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ This topic describes the different approaches for animating properties: storyboa
38
38
39
39
1. Declare a <xref:System.Windows.Media.Animation.Storyboard> and one or more animations.
40
40
41
-
2. Use the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty%2A> attached properties to specify the target object and property of each animation.
41
+
2. Use the <xref:System.Windows.Media.Animation.Storyboard.TargetName%2A> and <xref:System.Windows.Media.Animation.Storyboard.TargetProperty> attached properties to specify the target object and property of each animation.
42
42
43
43
3. (Code only) Define a <xref:System.Windows.NameScope> for a <xref:System.Windows.FrameworkElement> or <xref:System.Windows.FrameworkContentElement>. Register the names of the objects to animate with that <xref:System.Windows.FrameworkElement> or <xref:System.Windows.FrameworkContentElement>.
0 commit comments