public CrashDialog(Exception ex)
        {
            InitializeComponent();

            ContinueButton.Focus(FocusState.Programmatic);
            MoreInfo.Text = ex.Message;

            LightsSourceHelper.SetIsLightsContainer(RootGrid, true);
        }
        public ShareDialog(BaseTrack trackItem)
        {
            // Do this before the xaml is loaded, to make sure
            // the object can be binded to.
            Track = trackItem;

            // Load the XAML page
            InitializeComponent();

            LightsSourceHelper.SetIsLightsContainer(RootGrid, true);
        }
Beispiel #3
0
        /// <summary>
        ///     Creates the window and performs any protocol logic needed
        /// </summary>
        /// <param name="parameters">Param string, (soundbyte://core/user?id=454345)</param>
        /// <returns></returns>
        private async Task InitializeShellAsync(string parameters = null)
        {
            // Get the main shell
            var shell = Window.Current.Content as MainShell;

            // If the shell is null, we need to set it up.
            if (shell == null)
            {
                shell = new MainShell(parameters);

                // Hook the key pressed event for the global app
                Window.Current.CoreWindow.KeyUp += CoreWindowOnKeyUp;
            }
            else
            {
                await shell.HandleProtocolAsync(parameters);
            }

            // Set the root shell as the window content
            Window.Current.Content = shell;

            try
            {
                // Setup the lights
                LightsSourceHelper.Initialize(() => new PointerPositionSpotLight
                {
                    Active = !(!SettingsService.Instance.IsHighQualityArtwork || DeviceHelper.IsXbox)
                });

                LightsSourceHelper.SetIsLightsContainer(Window.Current.Content, true);
            }
            catch
            {
                // Temp fix around light helper already existing, proper fix later
            }

            // If on xbox display the screen to the full width and height
            if (DeviceHelper.IsXbox)
            {
                ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
            }

            // Activate the window
            Window.Current.Activate();
        }
Beispiel #4
0
        public PendingUpdateDialog()
        {
            InitializeComponent();

            LightsSourceHelper.SetIsLightsContainer(RootGrid, true);
        }