public void DisableCompact() { this.Width = savedWidthHeight; this.Height = savedWidthHeight; this.Margin = savedMargin; IconContentControl icon = (IconContentControl)this.Content; icon.IconWidth = savedIconWidthHeight; icon.IconHeight = savedIconWidthHeight; }
public void EnableCompact() { savedWidthHeight = this.Width; savedMargin = this.Margin; this.Width = COMPACT_WIDTH_HEIGHT; this.Height = COMPACT_WIDTH_HEIGHT; this.Margin = new Thickness(COMPACT_MARGIN_LEFT, COMPACT_MARGIN_TOP, COMPACT_MARGIN_RIGHT, COMPACT_MARGIN_BOTTOM); IconContentControl icon = (IconContentControl)this.Content; savedIconWidthHeight = icon.IconWidth; icon.IconWidth = COMPACT_ICON_WIDTH_HEIGHT; icon.IconHeight = COMPACT_ICON_WIDTH_HEIGHT; }