Example #1
0
 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();
 }
Example #2
0
 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();
     }
 }