mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Context Flyout fix for Calculation results
This commit is contained in:
parent
f30e9494ce
commit
622772d76f
2 changed files with 7 additions and 0 deletions
|
@ -127,6 +127,7 @@ void CalculationResult::OnApplyTemplate()
|
||||||
m_textBlock = dynamic_cast<TextBlock ^>(GetTemplateChild("NormalOutput"));
|
m_textBlock = dynamic_cast<TextBlock ^>(GetTemplateChild("NormalOutput"));
|
||||||
if (m_textBlock)
|
if (m_textBlock)
|
||||||
{
|
{
|
||||||
|
m_textBlock->ContextMenuOpening += ref new ContextMenuOpeningEventHandler(this, &CalculationResult::OnContextMenuOpening);
|
||||||
m_textBlock->Visibility = ::Visibility::Visible;
|
m_textBlock->Visibility = ::Visibility::Visible;
|
||||||
m_textBlockSizeChangedToken = m_textBlock->SizeChanged += ref new SizeChangedEventHandler(this, &CalculationResult::OnTextBlockSizeChanged);
|
m_textBlockSizeChangedToken = m_textBlock->SizeChanged += ref new SizeChangedEventHandler(this, &CalculationResult::OnTextBlockSizeChanged);
|
||||||
}
|
}
|
||||||
|
@ -417,3 +418,8 @@ void CalculationResult::OnTextBlockSizeChanged(Object ^ /*sender*/, SizeChangedE
|
||||||
{
|
{
|
||||||
UpdateScrollButtons();
|
UpdateScrollButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CalculationResult::OnContextMenuOpening(Platform::Object ^ sender, Windows::UI::Xaml::Controls::ContextMenuEventArgs ^ e)
|
||||||
|
{
|
||||||
|
e->Handled = true;
|
||||||
|
}
|
|
@ -59,6 +59,7 @@ namespace CalculatorApp
|
||||||
void OnPointerEntered(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ e);
|
void OnPointerEntered(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ e);
|
||||||
void OnPointerExited(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ e);
|
void OnPointerExited(Platform::Object ^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs ^ e);
|
||||||
void ModifyFontAndMargin(Windows::UI::Xaml::Controls::TextBlock ^ textBlock, double fontChange);
|
void ModifyFontAndMargin(Windows::UI::Xaml::Controls::TextBlock ^ textBlock, double fontChange);
|
||||||
|
void OnContextMenuOpening(Platform::Object ^ sender, Windows::UI::Xaml::Controls::ContextMenuEventArgs ^ e);
|
||||||
void UpdateScrollButtons();
|
void UpdateScrollButtons();
|
||||||
void ScrollLeft();
|
void ScrollLeft();
|
||||||
void ScrollRight();
|
void ScrollRight();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue