Defines whether Windows themes are used.
Get
| C# | bool Boolean = object.UseThemes; |
| VB.NET | Boolean = object.UseThemes As Boolean |
| C++ | VARIANT_BOOL Boolean = object->UseThemes; VARIANT_BOOL Boolean = object->GetUseThemes(); |
| C | HRESULT object->get_UseThemes(VARIANT_BOOL* Boolean); |
Put
| C# | bool object.UseThemes = Boolean; |
| VB.NET | object.UseThemes = Boolean As Boolean |
| C++ | VARIANT_BOOL object->UseThemes = Boolean; void object->PutUseThemes(VARIANT_BOOL Boolean); |
| C | HRESULT object->put_UseThemes(VARIANT_BOOL Boolean); |
object
Boolean
Defines whether Windows themes are used.
The UseThemes property defines whether the control uses the current Windows theme (visual styles). The default is True. p With themes, a date field control draws its check box, buttons and border using the theme, and a calendar (a month calendar control or the dropdown calendar of a date field control) draws the selected day, the day under the mouse and today's marker using the theme of the Windows month calendar control. A calendar uses the theme only in light mode and only as long as the application doesn't define the colors BackColor, SelectedBackColor, HotBackColor and TodayColor. p Without themes, the parts are drawn in the classic style. Themes are not used in high contrast mode (HighContrastMode).
comboViews.Items.AddRange(new object[] { "All", "Month and year", "Month only" });
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews));
checkTrailing.Checked = cal.ShowTrailingDates;
checkTodayButton.Checked = cal.ShowTodayButton;
checkHighlightToday.Checked = cal.HighlightToday;
checkClearButton.Checked = cal.ShowClearButton;
checkDropOnFocus.Checked = fieldDate.DropOnFocus;
checkAutoAdvance.Checked = fieldDate.AutoAdvance;
checkThemes.Checked = sftCalendar.UseThemes;
initialized = true;
ShowSelection();
DoLayout();
}
// The calendar sizes itself to its months, so its group box, the selection text, the Close button and the form follow it.
comboViews.Items.AddRange(New Object() {"All", "Month and year", "Month only"})
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews))
checkTrailing.Checked = cal.ShowTrailingDates
checkTodayButton.Checked = cal.ShowTodayButton
checkHighlightToday.Checked = cal.HighlightToday
checkClearButton.Checked = cal.ShowClearButton
checkDropOnFocus.Checked = fieldDate.DropOnFocus
checkAutoAdvance.Checked = fieldDate.AutoAdvance
checkThemes.Checked = sftCalendar.UseThemes
initialized = True
ShowSelection()
DoLayout()
End Sub
' The calendar sizes itself to its months, so its group box, the selection text, the Close button and the form follow it.See Also SftCalendar Object | Object Hierarchy | Using Themes