public StoreSettingViewModel(StoreSetting item)
        {
            InnerItem = item;

            AvailableValueTypes = new string[] { textShortText, textLongText, textInteger, textDecimal, textBoolean, textDateTime, textXML };
            IsValueTypeChangeable = AvailableValueTypes.All(x => x != InnerItem.ValueType);

            UpdateInputControlsVisibility();
        }
		protected override void InitializePropertiesForViewing()
		{
			// setting "FilteredBrowsing"
			var textSettingNameFilteredNavigation = "FilteredBrowsing";
			var listSettings =
				InnerItem.Settings.Where(
					x => x.ValueType == StoreSettingViewModel.textXML && x.Name == textSettingNameFilteredNavigation).ToList();
			if (listSettings.Count == 0)
			{
				SettingFilteredNavigation = EntityFactory.CreateEntity<StoreSetting>();
				SettingFilteredNavigation.Name = textSettingNameFilteredNavigation;
				SettingFilteredNavigation.ValueType = StoreSettingViewModel.textXML;
				//SettingEnableCVV.LongTextValue = "";
				InnerItem.Settings.Add(SettingFilteredNavigation);
			}
			else
				SettingFilteredNavigation = listSettings[0];
			OnPropertyChanged("SettingFilteredNavigation");
		}
		private void RaiseStoreSettingDeleteInteractionRequest(StoreSetting item)
		{
			var confirmation = new ConditionalConfirmation
			{
				Content = string.Format("Are you sure you want to delete Store Setting '{0}'?", item.Name),
				Title = "Delete confirmation"
			};

			CommonConfirmRequest.Raise(confirmation, (x) =>
			{
				if (x.Confirmed)
				{
					InnerItem.Settings.Remove(item);
				}
			});
		}
		private bool RaiseStoreSettingEditInteractionRequest(StoreSetting item, string title)
		{
			bool result = false;
			var itemVM = _settingVmFactory.GetViewModelInstance(
				new KeyValuePair<string, object>("item", item)
				);
			var confirmation = new ConditionalConfirmation(itemVM.InnerItem.Validate);
			confirmation.Title = title;
			confirmation.Content = itemVM;

			CommonConfirmRequest.Raise(confirmation, (x) =>
			{
				result = x.Confirmed;
			});

			return result;
		}
		private void RaiseStoreSettingEditInteractionRequest(StoreSetting originalItem)
		{
			var item = originalItem.DeepClone(EntityFactory as IKnownSerializationTypes);
			if (RaiseStoreSettingEditInteractionRequest(item, "Edit Store Setting"))
			{

				// copy all values to original:
				OnUIThread(() => originalItem.InjectFrom<CloneInjection>(item));
				originalItem.ValueType = originalItem.ValueType;

				IsModified = true;
			}
		}