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

Method OnApplyTemplate

Xaml/Controls/FocusBorderColorSpectrum.cpp:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace winrt::TranslucentTB::Xaml::Controls::implementation
9{
10 void FocusBorderColorSpectrum::OnApplyTemplate()
11 {
12 m_SizingGridSizeChangedRevoker.revoke();
13
14 m_FocusBorder = GetTemplateChild(L"FocusBorder").try_as<wuxc::Border>();
15
16 const auto sizingGrid = GetTemplateChild(L"SizingGrid").try_as<wux::FrameworkElement>();
17
18 base_type::OnApplyTemplate();
19
20 if (m_FocusBorder && sizingGrid)
21 {
22 UpdateFocusBorder(sizingGrid);
23 m_SizingGridSizeChangedRevoker = sizingGrid.SizeChanged(winrt::auto_revoke, { get_weak(), &FocusBorderColorSpectrum::OnSizingGridSizeChanged });
24 }
25 }
26
27 void FocusBorderColorSpectrum::OnSizingGridSizeChanged(const IInspectable &sender, const wux::SizeChangedEventArgs &)
28 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected