EditorResources.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / View / EditorResources.cs / 1305376 / EditorResources.cs

                            //---------------------------------------------------------------- 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//---------------------------------------------------------------

namespace System.Activities.Presentation.View 
{
    using System; 
    using System.Collections.Generic; 
    using System.Linq;
    using System.Text; 
    using System.Windows;
    using System.Runtime;

    class EditorResources 
    {
        private static ResourceDictionary resources; 
        internal static ResourceDictionary GetResources() 
        {
            if (resources == null) 
            {
                Uri resourceLocator = new Uri(
                    string.Concat(
                    typeof(EditorResources).Assembly.GetName().Name, 
                    @";component/System/Activities/Presentation/View/EditorResources.xaml"),
                    UriKind.RelativeOrAbsolute); 
                resources = (ResourceDictionary)Application.LoadComponent(resourceLocator); 
            }
            Fx.Assert(resources != null, "Could not load argument value editor resources."); 
            return resources;
        }
        static ResourceDictionary icons;
        internal static ResourceDictionary GetIcons() 
        {
            if (null == icons) 
            { 
                Uri resourceLocator = new Uri(
                    string.Concat( 
                    typeof(EditorResources).Assembly.GetName().Name,
                    @";component/Themes/Icons.xaml"),
                    UriKind.RelativeOrAbsolute);
                icons = (ResourceDictionary)Application.LoadComponent(resourceLocator); 
            }
            Fx.Assert(icons!= null, "Could not load icon resources."); 
            return icons; 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK