public static void SetResolution(ResolutionInfo resolution) { Document.Current.History.BeginTransaction(); Core.Operations.SetProperty.Perform(Document.Current.RootNode, nameof(Widget.Size), resolution.Size); SetMarker(Document.Current.RootNode, resolution.MarkerId); Document.Current.History.EndTransaction(); }
public static void SetResolution(ResolutionInfo resolution) { using (Document.Current.History.BeginTransaction()) { SetProperty.Perform(Document.Current.RootNode, nameof(Widget.Size), resolution.Size); SetMarker(Document.Current.RootNode, resolution.MarkerId); Document.Current.History.CommitTransaction(); } }