/// <summary> /// Called when we should show something /// </summary> /// <param name="link"></param> public void ShowContent(string link) { // Make sure we are in the correct state lock(this) { if(State != GlobalContentStates.Idle) { return; } State = GlobalContentStates.Opening; } // Create the content control m_contentControl = new FlipViewContentControl(); // Disable full screen m_contentControl.CanGoFullScreen = false; // This isn't great, but for now mock a post Post post = new Post() { Url = link, Id = "quinn" }; // Add the control to the UI ui_contentRoot.Children.Add(m_contentControl); // Set the post to begin loading m_contentControl.FlipPost = post; m_contentControl.IsVisible = true; // Show the panel ToggleShown(true); }
/// <summary> /// Called when we should show something /// </summary> /// <param name="link"></param> public void ShowContent(string link) { // Make sure we are in the correct state lock (this) { if (State != GlobalContentStates.Idle) { return; } State = GlobalContentStates.Opening; } // Create the content control m_contentControl = new FlipViewContentControl(); // Disable full screen m_contentControl.CanGoFullScreen = false; // This isn't great, but for now mock a post Post post = new Post() { Url = link, Id = "quinn" }; // Add the control to the UI ui_contentRoot.Children.Add(m_contentControl); // Set the post to begin loading m_contentControl.FlipPost = post; m_contentControl.IsVisible = true; // Show the panel ToggleShown(true); }
/// <summary> /// Called when the /// </summary> private void Animation_Completed(object sender, object e) { lock (this) { switch (State) { case GlobalContentStates.Opening: State = GlobalContentStates.Showing; break; case GlobalContentStates.Closing: State = GlobalContentStates.Idle; CloseComplete(); break; case GlobalContentStates.Idle: break; case GlobalContentStates.Showing: break; default: throw new ArgumentOutOfRangeException(); } } }
public void Close() { // Make sure we can close lock (this) { if (State != GlobalContentStates.Showing) { return; } State = GlobalContentStates.Closing; } ToggleShown(false); }
/// <summary> /// Called when the /// </summary> private void Animation_Completed(object sender, object e) { lock (this) { if (State == GlobalContentStates.Opening) { State = GlobalContentStates.Showing; } else if (State == GlobalContentStates.Closing) { State = GlobalContentStates.Idle; CloseComplete(); } } }
public void Close() { // Make sure we can close lock (this) { if (State != GlobalContentStates.Showing) { return; } State = GlobalContentStates.Closing; } // Remove the content Task.Run(() => { ContentPanelMaster.Current.RemoveAllowedContent(m_source.Id); }); ToggleShown(false); }
/// <summary> /// Called when we should show something /// </summary> /// <param name="link"></param> public void ShowContent(string link) { // Make sure we are in the correct state lock (this) { if (State != GlobalContentStates.Idle) { return; } State = GlobalContentStates.Opening; } //// Create the content control //m_contentControl = new ContentPanelHost(); //// Disable full screen //m_contentControl.CanGoFullscreen = false; //// This isn't great, but for now mock a post //m_source = ContentPanelSource.CreateFromUrl(link); //// Approve the content to be shown //Task.Run(() => //{ // ContentPanelMaster.Current.AddAllowedContent(m_source); //}); //// Add the control to the UI //ui_contentRoot.Children.Add(m_contentControl); //// Set the post to begin loading //m_contentControl.SourceId = m_source.Id; //m_contentControl.IsVisible = true; ui_webView.Navigate(new Uri(link)); // Show the panel ToggleShown(true); }
/// <summary> /// Called when we should show something /// </summary> /// <param name="link"></param> public void ShowContent(string link) { // Make sure we are in the correct state lock(this) { if(State != GlobalContentStates.Idle) { return; } State = GlobalContentStates.Opening; } // Create the content control m_contentControl = new ContentPanelHost(); // Disable full screen m_contentControl.CanGoFullscreen = false; // This isn't great, but for now mock a post m_source = ContentPanelSource.CreateFromUrl(link); // Approve the content to be shown Task.Run(() => { ContentPanelMaster.Current.AddAllowedContent(m_source); }); // Add the control to the UI ui_contentRoot.Children.Add(m_contentControl); // Set the post to begin loading m_contentControl.SourceId = m_source.Id; m_contentControl.IsVisible = true; // Show the panel ToggleShown(true); }