Example #1
0
        private void UpdatePanel(ResultPanelType result)
        {
            switch (result)
            {
            case ResultPanelType.NoContent:
                Text1.SetResourceReference(TextBlock.TextProperty, "Dialog_NoContentFound_NoMatchingResultsTitle");
                Text2.SetResourceReference(TextBlock.TextProperty, "Dialog_NoContentFound_NoMatchingResultsText");
                break;

            case ResultPanelType.NoNews:
                Text1.SetResourceReference(TextBlock.TextProperty, "Dialog_NoNewsContentFound_NoMatchingResultsTitle");
                Text2.SetResourceReference(TextBlock.TextProperty, "Dialog_NoNewsContentFound_NoMatchingResultsText");
                break;

            case ResultPanelType.Loading:
                Text1.SetResourceReference(TextBlock.TextProperty, "Dialog_ResultPanel_Loading_Title");
                Text2.SetResourceReference(TextBlock.TextProperty, "Dialog_ResultPanel_Loading_Text");
                break;

            case ResultPanelType.Error:
                Text1.SetResourceReference(TextBlock.TextProperty, "Dialog_ResultPanel_Error_Title");
                Text2.SetResourceReference(TextBlock.TextProperty, "Dialog_ResultPanel_Error_Text");
                break;
            }
        }