Refactored XAML x:Names (#433)

Description of the changes:
-Refactored all x:Names to use the generally accepted Pascal-Casing

How changes were validated:
Unit Tests
Manual Tests
This commit is contained in:
Lance McCarthy
2019-04-18 19:01:47 -04:00
committed by Daniel Belcher
parent de65db6197
commit 8520d3fc74
22 changed files with 544 additions and 543 deletions

View File

@@ -72,7 +72,7 @@ void CalculationResult::OnApplyTemplate()
{
m_textContainer->LayoutUpdated -= m_textContainerLayoutChangedToken;
}
m_textContainer = dynamic_cast<ScrollViewer^>(GetTemplateChild("textContainer"));
m_textContainer = dynamic_cast<ScrollViewer^>(GetTemplateChild("TextContainer"));
if (m_textContainer)
{
m_textContainer->SizeChanged += ref new SizeChangedEventHandler(this, &CalculationResult::TextContainerSizeChanged);
@@ -81,9 +81,9 @@ void CalculationResult::OnApplyTemplate()
m_textContainerLayoutChangedToken = m_textContainer->LayoutUpdated += ref new EventHandler<Object^>(this, &CalculationResult::OnTextContainerLayoutUpdated);
m_textContainer->ChangeView(m_textContainer->ExtentWidth - m_textContainer->ViewportWidth,nullptr,nullptr);
m_scrollLeft = dynamic_cast<HyperlinkButton^>(GetTemplateChild("scrollLeft"));
m_scrollRight = dynamic_cast<HyperlinkButton^>(GetTemplateChild("scrollRight"));
auto borderContainer = dynamic_cast<UIElement^>(GetTemplateChild("border"));
m_scrollLeft = dynamic_cast<HyperlinkButton^>(GetTemplateChild("ScrollLeft"));
m_scrollRight = dynamic_cast<HyperlinkButton^>(GetTemplateChild("ScrollRight"));
auto borderContainer = dynamic_cast<UIElement^>(GetTemplateChild("Border"));
if (m_scrollLeft && m_scrollRight)
{
m_scrollLeft->Click += ref new RoutedEventHandler(this, &CalculationResult::OnScrollClick);
@@ -91,7 +91,7 @@ void CalculationResult::OnApplyTemplate()
borderContainer->PointerEntered += ref new PointerEventHandler(this, &CalculationResult::OnPointerEntered);
borderContainer->PointerExited += ref new PointerEventHandler(this, &CalculationResult::OnPointerExited);
}
m_textBlock = dynamic_cast<TextBlock^>(m_textContainer->FindName("normalOutput"));
m_textBlock = dynamic_cast<TextBlock^>(m_textContainer->FindName("NormalOutput"));
if (m_textBlock)
{
m_textBlock->Visibility = ::Visibility::Visible;

View File

@@ -32,7 +32,7 @@ void OverflowTextBlock::OnApplyTemplate()
{
UnregisterEventHandlers();
auto uiElement = GetTemplateChild("expressionContainer");
auto uiElement = GetTemplateChild("ExpressionContainer");
if (uiElement != nullptr)
{
m_expressionContainer = safe_cast<ScrollViewer^>(uiElement);
@@ -40,17 +40,17 @@ void OverflowTextBlock::OnApplyTemplate()
m_containerViewChangedToken = m_expressionContainer->ViewChanged += ref new EventHandler<ScrollViewerViewChangedEventArgs ^>(this, &OverflowTextBlock::OnViewChanged);
}
uiElement = GetTemplateChild("scrollLeft");
uiElement = GetTemplateChild("ScrollLeft");
if (uiElement != nullptr)
{
m_scrollLeft = safe_cast<Button^>(uiElement);
m_scrollLeftClickEventToken = m_scrollLeft->Click += ref new RoutedEventHandler(this, &OverflowTextBlock::OnScrollClick);
}
uiElement = GetTemplateChild("scrollRight");
uiElement = GetTemplateChild("ScrollRight");
if (uiElement != nullptr)
{
m_scrollRight = safe_cast<Button^>(GetTemplateChild("scrollRight"));
m_scrollRight = safe_cast<Button^>(uiElement);
m_scrollRightClickEventToken = m_scrollRight->Click += ref new RoutedEventHandler(this, &OverflowTextBlock::OnScrollClick);
}