Class DesignTimeResourceDictionary
Represents a ResourceDictionary that provides resources at design time.
public class DesignTimeResourceDictionary : ResourceDictionary, IDictionary, ICollection, IEnumerable, ISupportInitialize, IUriContext, INameScope
- Inheritance
-
DesignTimeResourceDictionary
- Implements
- Inherited Members
Examples
Add a design time resource dictionary to a user control (XAML).
<UserControl xmlns:lc="clr-namespace:Loehnert.Controls;assembly=Loehnert.Controls">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<lc:DesignTimeResourceDictionary DesignTimeSource = "pack://application:,,,/Loehnert.Lisrt;component/Framework/Themes/LoehnertTheme/LoehnertTheme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<!-- Your Code -->
<UserControl>
Properties
DesignTimeSource
Gets or sets the design time source as uri.
public string DesignTimeSource { get; set; }
Property Value
- string
The design time source.
Source
Gets or sets the uniform resource identifier (URI) to load resources from.
public Uri Source { get; set; }
Property Value
Exceptions
- InvalidOperationException
Always thrown. Use DesignTimeSource instead.