130 BackColor = DreamineTheme.AppBackground;
131 Dock = DockStyle.Fill;
133 var layout =
new TableLayoutPanel
135 Dock = DockStyle.Fill,
138 Padding =
new Padding(24),
140 layout.RowStyles.Add(
new RowStyle(SizeType.AutoSize));
141 layout.RowStyles.Add(
new RowStyle(SizeType.AutoSize));
142 layout.RowStyles.Add(
new RowStyle(SizeType.Absolute, 180));
143 layout.RowStyles.Add(
new RowStyle(SizeType.AutoSize));
144 layout.RowStyles.Add(
new RowStyle(SizeType.AutoSize));
145 layout.RowStyles.Add(
new RowStyle(SizeType.Percent, 100));
151 ForeColor = Color.White,
152 Font =
new Font(
"Segoe UI", 22f, FontStyle.Bold),
153 Anchor = AnchorStyles.None,
154 Margin =
new Padding(0, 0, 0, 8)
159 Text =
"A button command and a checkbox binding drive the same shared state.",
161 ForeColor = Color.FromArgb(184, 198, 221),
162 Font =
new Font(
"Segoe UI", 10f),
163 Anchor = AnchorStyles.None,
164 Margin =
new Padding(0, 0, 0, 18)
167 _bulb =
new DreamineLightBulb
172 Anchor = AnchorStyles.None,
173 BackColor = DreamineTheme.AppBackground,
174 Margin =
new Padding(0, 0, 0, 6)
180 ForeColor = Color.FromArgb(141, 203, 255),
181 Font =
new Font(
"Consolas", 10f, FontStyle.Bold),
182 Anchor = AnchorStyles.None,
183 Margin =
new Padding(0, 0, 0, 18)
186 var row =
new FlowLayoutPanel
189 Anchor = AnchorStyles.None,
190 FlowDirection = FlowDirection.LeftToRight,
191 WrapContents =
false,
199 Margin =
new Padding(0, 0, 14, 0),
206 ForeColor = Color.White,
207 BackColor = DreamineTheme.AppBackground,
208 Margin =
new Padding(0, 10, 14, 0),
214 ForeColor = Color.FromArgb(217, 227, 241),
215 Font =
new Font(
"Consolas", 9f),
216 Margin =
new Padding(0, 12, 0, 0),
223 layout.Controls.Add(
_title, 0, 0);
225 layout.Controls.Add(
_bulb, 0, 2);
226 layout.Controls.Add(
_status, 0, 3);
227 layout.Controls.Add(row, 0, 4);
228 Controls.Add(layout);
230 _toggleButton.Click += (_, _) =>
_vm.ToggleCommand.Execute(
null);
231 _powerCheckBox.CheckedChanged += (_, _) =>
234 _vm.ToggleCommand.Execute(
null);