• HOME
  • PRODUCTS
  • DEMOS
  • DOWNLOAD
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
Search Results for

    Show / Hide Table of Contents

    IsSmartDiffCodeSerializationRequired Property

    IsSmartDiffCodeSerializationRequired

    Gets or sets method used to identify whether FormDesignerControl content should be saved only by taking into account code difference.

    Declaration
    [Browsable(false)]
    public Func<IFormDesignerControl, bool> IsSmartDiffCodeSerializationRequired { get; set; }
    Property Value
    Type Description
    System.Func<IFormDesignerControl, System.Boolean>
    Implements
    IFormDesignerControl.IsSmartDiffCodeSerializationRequired
    Remarks

    When the Form Designer's content is changed and AutoSaveToSource is true, Form Designer attempts to save its content to the source automatically. IsSmartDiffCodeSerializationRequired allows you to specify whether the designer should translate a list of changes to the underlying source file rather than the entire content. This is particularly useful when the source of the designed form is displayed in the code editor, making changed lines clearly marked.

    Examples

    Here is how to use a IsSmartDiffCodeSerializationRequired in the C# code:

    using System;
    
    using Alternet.Editor.Wpf;
    
    public partial class MainWindow : Window
    {
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var formDesigner = new Alternet.FormDesigner.Wpf.FormDesignerControl();
            formDesigner.IsSmartDiffCodeSerializationRequired = d => ((ITextSource)((EditorFormDesignerDataSource)d.Source).XamlTextSource).Edits.Any();
        }
    }
    

    Here is how to use a IsSmartDiffCodeSerializationRequired in the Visual Basic code:

    Imports System
    Imports Alternet.Editor.Wpf
    
    Partial Public Class MainWindow
        Inherits Window
    
        Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim formDesigner = New Alternet.FormDesigner.Wpf.FormDesignerControl()
            formDesigner.IsSmartDiffCodeSerializationRequired = Function(d) (CType((CType(d.Source, EditorFormDesignerDataSource)).XamlTextSource, ITextSource)).Edits.Any()
        End Sub
    End Class
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF