public CrtLayout12(IStreamReader reader, RecordType id, ushort length) : base(reader, id, length) { this.frtHeader = new FrtHeader(reader); this.dwCheckSum = reader.ReadUInt32(); ushort flags = reader.ReadUInt16(); this.fLayoutTargetInner = Utils.BitmaskToBool(flags, 0x1); this.autolayouttype = (AutoLayoutType)Utils.BitmaskToInt(flags, 0xE); if (id == RecordType.CrtLayout12A) { this.xTL = reader.ReadInt16(); this.yTL = reader.ReadInt16(); this.xBR = reader.ReadInt16(); this.yBR = reader.ReadInt16(); } this.wXMode = (CrtLayout12Mode)reader.ReadUInt16(); this.wYMode = (CrtLayout12Mode)reader.ReadUInt16(); this.wWidthMode = (CrtLayout12Mode)reader.ReadUInt16(); this.wHeightMode = (CrtLayout12Mode)reader.ReadUInt16(); this.x = reader.ReadDouble(); this.y = reader.ReadDouble(); this.dx = reader.ReadDouble(); this.dy = reader.ReadDouble(); reader.ReadBytes(2); //reserved // assert that the correct number of bytes has been read from the stream Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position); }
public static void SetAutoLayoutType(DependencyObject obj, AutoLayoutType value) => obj.SetValue(AutoLayoutTypeProperty, value);