Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfirmationDialogViewModel"/> class
        /// </summary>
        /// <param name="thingToDelete">The <see cref="Thing"/> to delete</param>
        public ConfirmationDialogViewModel(Thing thingToDelete)
        {
            this.YesCommand = ReactiveCommand.Create();
            this.YesCommand.Subscribe(_ => this.ExecuteYesCommand());

            this.NoCommand = ReactiveCommand.Create();
            this.NoCommand.Subscribe(_ => this.ExecuteNoCommand());

            var converter = new CamelCaseToSpaceConverter();

            this.DeletedThingText = (string)converter.Convert(thingToDelete.ClassKind, null, null, null);
        }
Beispiel #2
0
        /// <summary>
        /// Converts the <see cref="ClassKind"/> into a split string and preprends and appends <![CDATA[<< >>]]>
        /// </summary>
        /// <param name="value">An instance of an object which needs to be converted.</param>
        /// <param name="targetType">The parameter is not used.</param>
        /// <param name="parameter">The parameter is not used.</param>
        /// <param name="culture">The parameter is not used.</param>
        /// <returns>
        /// A split string preprended and appended with <![CDATA[<< >>]]>
        /// </returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var converter = new CamelCaseToSpaceConverter();

            return($"<<{converter.Convert(value, targetType, parameter, culture)}>>");
        }