public virtual void Initialize() { var xaml = XamlWriterHelper.GetXamlAsXElement(this.TriggerAction).RemoveNamespaces(); this.DescriptiveValue = xaml.ToString(SaveOptions.DisableFormatting); this.ToolTip = xaml.ToString(SaveOptions.None); }
private void HandleCopyXaml(object sender, ExecutedRoutedEventArgs e) { try { var xaml = XamlWriterHelper.GetXamlAsString(((PropertyInformation)e.Parameter).Value); ClipboardHelper.SetText(xaml); } catch (Exception exception) { ErrorDialog.ShowExceptionMessageBox(exception); } }