Click here to Skip to main content
15,885,309 members
Articles / Desktop Programming / WPF

Vector Brush Library

Rate me:
Please Sign up or sign in to vote.
5.00/5 (20 votes)
25 Apr 2014CPOL6 min read 44.8K   2.1K   56  
How to conveniently produce and use a vector Icon Library, with sample Icons
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using IconLibraryHelper.Generators;

namespace IconLibraryHelper
{
    /// <summary>
    /// Interaction logic for DiaAddResource.xaml
    /// </summary>
    public partial class DiaAddResource : Window
    {
        public DiaAddResource()
        {
            InitializeComponent();
        }

        public  LibraryResourcesItem CreateLibraryResourcesItem()
        {
            LibraryResourcesItem item = new LibraryResourcesItem();
            item.ResourceName = txtResourceName.Text;
            item.ResourceType = txtResourceType.Text;
            return item;

        }

        public GenericItem CreateGenericItem()
        {
            GenericItem item = new GenericItem()
            {
                ResourceName = txtResourceName.Text 
            };
            return item;


        }


        public SatelliteResourceDictionaryItem CreateSatelliteResourceDictionaryItem()
        {
            SatelliteResourceDictionaryItem item = new SatelliteResourceDictionaryItem()
            {
                ResourceName = txtResourceName.Text
            };
            return item;

        }


        public ResourceItem CreateResourceItem()
        {
            ResourceItem item = new ResourceItem()
            {
                ResourceName = txtResourceName.Text,
                ResourceType = txtResourceType.Text

            };
            return item;

        }
        private void btOk_Click(object sender, RoutedEventArgs e)
        {
            if (txtResourceName.Text != "")
            {
                DialogResult = true;
            }
           
        }

        private void btCancel_Click(object sender, RoutedEventArgs e)
        {
           
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Properties.Settings.Default.Save();
        }

        
    }

    
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Written software for what seems like forever. I'm currenly infatuated with WPF. Hopefully my affections are returned.

Comments and Discussions