/// <summary> /// Called by the container (calling code) in order to show the view to the user. /// The base implementation of this method contains code to initialize common elements of each view /// and then it calls view-specific control construction. /// </summary> public virtual void Show() { #region Common elements of the view if (!string.IsNullOrEmpty(ViewDescription)) { var infoPanel = GetViewElement <Grid>(viewHandlerPrivateView, "InfoPanel"); //var infoIcon = infoPanel.Children.AddAndReference(ResourceHelper.GetImage(IconType.Info, 32, 32)); var viewDescriptionPlaceholder = infoPanel.Children.AddAndReference(UITheme.CreateTextBlock()); viewDescriptionPlaceholder.Text = ViewDescription; Grid.SetColumn(viewDescriptionPlaceholder, 1); //If the description appears above, the implementor's view should occupy row number 1 (in 0-based index numbering) Grid.SetRow(ViewContainer, 1); } #endregion //Load the resource definition provided by the implementor. //If the implementor has not overridden the ResourceName, property, it will load //the generic 'Not implemented' UI. LoadResource(ResourceName); //View-specific layout. Reveal(); }