MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / ColorPicker

Method ColorPicker

Xaml/Controls/ColorPicker.cpp:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 ColorPicker::ColorPicker()
42 {
43 m_DecimalFormatter.FractionDigits(0);
44 SetValue(CustomPaletteColorsProperty(), single_threaded_observable_vector<Windows::UI::Color>());
45 m_LoadedToken = Loaded({ get_weak(), &ColorPicker::OnLoaded });
46 m_UnloadedToken = Unloaded({ get_weak(), &ColorPicker::OnUnloaded });
47 DefaultStyleKey(box_value(name_of<class_type>()));
48
49 m_ColorPropertyChangedToken.value = RegisterPropertyChangedCallback(composable_base::ColorProperty(), OnColorPropertyChanged);
50
51 UpdateCustomPalette();
52
53 static constexpr int COLOR_UPDATE_INTERVAL = 30;
54 m_DispatcherQueueTimer.Interval(std::chrono::milliseconds(COLOR_UPDATE_INTERVAL));
55 m_DispatcherQueueTimerTickToken = m_DispatcherQueueTimer.Tick({ get_weak(), &ColorPicker::OnDispatcherQueueTimerTick });
56 m_DispatcherQueueTimer.Start();
57 }
58
59 ColorPicker::~ColorPicker()
60 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected