You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think GetTemplateChild was a public function, but since 2.0.240111.5 it has been changed to protected, so I cannot access it from outside the class.
Is there a workaround for this?
Reproducible example
.xaml
<ColorPicker x:Name="MemoColorPicker" Grid.Row="0" Grid.Column="1" Margin="20,10,30,0"
ColorSpectrumShape="Box" IsAlphaSliderVisible="False" IsColorPreviewVisible="False"
IsColorChannelTextInputVisible="False" IsHexInputVisible="False" IsColorSliderVisible="False"/>
.cpp
auto spectrum = MemoColorPicker().GetTemplateChild(L"ColorSpectrum").try_as<Controls::Primitives::ColorSpectrum>();
if (spectrum != nullptr) {
auto tool_chip = spectrum.GetTemplateChild(L"ColorNameToolTip").try_as<Controls::ToolTip>();
if (tool_chip != nullptr) tool_chip.Visibility(Visibility::Collapsed);
}