﻿/*****************************************************************************
*       Copyright 1985, 2020 Precisely.
*       All rights reserved.
*
*       This document contains unpublished, confidential, and proprietary
*       information of Precisely. No disclosure or use of any portion of
*       the contents of this document may be made without the express 
*       written consent of Precisely.
*****************************************************************************/
using System;
using System.Collections.Generic;
using System.Windows.Data;

namespace MapInfo.MiPro.Samples
{
	public class StyleKeyDescriptionProvider : IValueConverter
	{
		private static Dictionary<string, string> _resourceDescriptonList = new Dictionary<string, string>();

		static StyleKeyDescriptionProvider()
		{
			_resourceDescriptonList.Add("RibbonWindowTitleBackground", "Background color of Main Window Title");
			_resourceDescriptonList.Add("WindowHeaderBackground", "Default background color of Tool window header");
			_resourceDescriptonList.Add("DocumentWindowHeaderBackground", "Default background color of Document window header");
			_resourceDescriptonList.Add("ActiveWindowHeaderBackground", "Background color of Active Window");
			_resourceDescriptonList.Add("ActiveWindowHeaderForeground", "Foreground color of Active Window");
			_resourceDescriptonList.Add("BackStageColor", "Background color of the BackStage sidebar, Status Bar and the text color of the Ribbon Tabs");
			_resourceDescriptonList.Add("BackStageSelectColor", "Selected tab background color and separator background color on the BackStage");
			_resourceDescriptonList.Add("BrowserSelectedItemBackground", "Highlight color of the selected row(s) in the Browser");
			_resourceDescriptonList.Add("BrowserSelectedItemForeground", "Foreground color of the selected row(s) in the Browser");
			_resourceDescriptonList.Add("SidePanelBackground", "Background color of the side panel of an Auto-Hidden Window ");
			_resourceDescriptonList.Add("TabSwitchActiveWindowLabelForeground", "Label Foreground color to Indicate Active Window in tab switch control of Docking Manager");
			_resourceDescriptonList.Add("TabPanelBackground", "Background color of the document window tab panel");
			_resourceDescriptonList.Add("LastDocumentWindowTabItemBackground", "Tab Item header background color of the last document window tab panel, if it's not the Active Window");
			_resourceDescriptonList.Add("LastDocumentWindowTabItemForeground", "Tab Item header foreground color of the last document window tab panel, if it's not the Active Window");
			_resourceDescriptonList.Add("CurrentTabBackground", "Background color of the currently selected tab in a tab group, If it's not the Active Window");
			_resourceDescriptonList.Add("CurrentTabForeground", "Forground color the currently selected tab in a tab group, If it's not the Active Window");
			_resourceDescriptonList.Add("TabItemBackground", "Default background color tab in a tab group");
			_resourceDescriptonList.Add("TabItemForeground", "Default foreground color tab in a tab group");
			_resourceDescriptonList.Add("TabItemHoverBackground", "Default background color of tab on mouse hover in a tab group");
			_resourceDescriptonList.Add("TabItemHoverForeground", "Default foreground color of tab on mouse hover in a tab group");
			_resourceDescriptonList.Add("RibbonBackground", "Background color of ribbon");
			_resourceDescriptonList.Add("RibbonStatusBarBackground", "Status bar background color of ribbon");
			_resourceDescriptonList.Add("RibbonStatusBarForeground", "Status bar foreground color of ribbon");
			_resourceDescriptonList.Add("ActiveRibbonTabBackground", "Background color of active ribbon tab");
			_resourceDescriptonList.Add("InactiveRibbonTabBackground", "Background color of inactive ribbon tab");
			_resourceDescriptonList.Add("RibbonTabHoverBackground", "Background color of ribbon tab on mouse hover");
			_resourceDescriptonList.Add("ContextualTabGroupLayerBackColor", "Background color of the Layer Contextual Tab Group");
			_resourceDescriptonList.Add("ContextualTabGroupLegendBackColor", "Background color of the Legend Contextual Tab Group");
			_resourceDescriptonList.Add("SelectedItemBackground", "Background color of selected item in Table List, Window List, Connection List, and Layer Control");
			_resourceDescriptonList.Add("ItemHoverBackground", "Background color on mouse hover on any item in Table List, Window List, Connection List, and Layer Control");
			_resourceDescriptonList.Add("InactiveSelectedItemBackground", "Background color of selected item in inactive Table List, Window List, Connection List, and Layer Control");
		}
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			if (value != null && value is PropertyItem)
			{
				var propertyName = ((PropertyItem)value).Name;
				if (_resourceDescriptonList.ContainsKey(propertyName))
					return _resourceDescriptonList[propertyName];
				return propertyName;
			}
			return string.Empty;
		}

		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}
