private void UpdateView() { StackPanel StaticUIPanel = new StackPanel(); StaticUIPanel.Margin = new Thickness(12, 0, 12, 0); Grid.SetRow(StaticUIPanel, 0); LayoutRoot.Children.Add(StaticUIPanel); _title = new TextBlock() { Style = (Style)App.Current.Resources["PhoneTextNormalStyle"], Margin = new Thickness(12, 0, 0, 0), Text = "DOCUMENT SEARCH" }; StaticUIPanel.Children.Add(_title); _searchTermBox = new WatermarkedTextBox("search your documents"); _searchTermBox.InputScope = GetSearchInputScope(); _searchTermBox.TextChanged += new TextChangedEventHandler(_searchTermBox_TextChanged); _searchTermBox.KeyUp += new KeyEventHandler(_searchTermBox_KeyUp); StaticUIPanel.Children.Add(_searchTermBox); ContentBox = new ListBox(); ContentBox.Margin = new Thickness(12, 0, 12, 0); ContentBox.SelectionChanged += new SelectionChangedEventHandler(ContentBox_SelectionChanged); Grid.SetRow(ContentBox, 1); LayoutRoot.Children.Add(ContentBox); }
private void UpdateView() { if (ApplicationBar == null) CreateAppBar(); TextBlock tb = new TextBlock(); tb.Text = "Specify a new name."; tb.Margin = new Thickness(12, 0, 0, 0); ContentPanel.Children.Add(tb); NewNameBox = new WatermarkedTextBox("specify a new name"); NewNameBox.SetText(_actionable.DisplayName); NewNameBox.KeyDown += new KeyEventHandler(NewNameBox_KeyDown); ContentPanel.Children.Add(NewNameBox); if (_actionable.IsTemp) { ApplicationTitle.Text = "NEW"; PageTitle.Text = "new " + _actionable.GetType().Name.ToString().ToLower(); } else { ApplicationTitle.Text = _actionable.DisplayName.ToUpper(); } }