Exemplo n.º 1
0
        // Static constructor.
        static TropicalAquarium()
        {
            // Create a new metadata instance with a modified default value.
            FrameworkPropertyMetadata newPropertyMetadata = new(
                defaultValue : new Uri("http://www.contoso.com/tropical-aquarium-graphic.jpg"));

            // Call OverrideMetadata on the dependency property identifier.
            // Pass in the type for which the new metadata will be applied
            // and the new metadata instance.
            AquariumGraphicProperty.OverrideMetadata(
                forType: typeof(TropicalAquarium),
                typeMetadata: newPropertyMetadata);
        }
Exemplo n.º 2
0
 static Fish()
 {
     AquariumGraphicProperty.OverrideMetadata(typeof(Fish), new FrameworkPropertyMetadata(new System.Uri("fish.gif", UriKind.RelativeOrAbsolute), FrameworkPropertyMetadataOptions.AffectsRender));
 }
Exemplo n.º 3
0
 set => SetValue(AquariumGraphicProperty, value);