Click or drag to resize
weroSoft AG, Software
StaticImageResourceExtension Class
The documentation is integral part of the weroSoft product documentation. This part is intended to be used by developers only.
Provides a XAML Extension for binding an image from a statically defined pack URI.
Inheritance Hierarchy
SystemObject
  System.Windows.MarkupMarkupExtension
    WeroSoft.Resources.AccessorsStaticImageResourceExtension

Namespace:  WeroSoft.Resources.Accessors
Assembly:  WeroSoft.Resource.Library (in WeroSoft.Resource.Library.dll) Version: 2.20.1.1 (2.20.0119.1)
Syntax
C#
public sealed class StaticImageResourceExtension : MarkupExtension
Remarks
This extension provides an object of the type ImageSource. Use this extension in XAML as shown below. Note, that images are commonly only available for size 36 or 72. This means that the image are sized either in 36x36 pixels or 72x72 pixels.
<UserControl x:Class="WeroSoft.Workflow.Desktop.WorkflowSelectorControl"

             xmlns:wres="http://schemas.weroSoft.net/xaml/resource/accessors"
                ... >

        <StackPanel x:Name="ControlArea" Grid.Row="3" Orientation="Horizontal" Margin="5 0 0 0">

             <!-- Button grouping -->
             <ToggleButton IsEnabled = "{Binding ElementName=PART_WorkflowSelector, Path=IsGroupingEnabled}" Click="Grouping_Clicked">
                 <Image Source = "{wres:StaticImageResource PackUri={x:Static wres:ActionImagePackUri.SortGrouping36}}" />
             </ToggleButton >
        ...

The StaticImageResourceExtension type exposes the following members.

Constructors
  NameDescription
Public methodStaticImageResourceExtension
Initializes a new instance of the StaticImageResourceExtension class
Top
Properties
  NameDescription
Public propertyPackUri
Gets or sets the pack-URI of the image to be loaded.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodProvideValue
Returns an object that is provided as the value of the target property for this markup extension.
(Overrides MarkupExtensionProvideValue(IServiceProvider).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodClone(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodCloneT(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodConvert (Defined by DataConverterExtensions.)
Public Extension MethodDynamicCast
Dynamically casts a reference to another type.
(Defined by TypeManagerHelper.)
Public Extension MethodGetFieldValue(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetFieldValueT(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValue(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValueT(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodInject(Type, Object)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInject(Type, Object, Boolean)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInjectField
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Type, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInvoke(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodInvokeTResult(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodSetFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetPropertyValue
Sets the data object on a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetReadOnlyFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Top
See Also