Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9244313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:59:47+00:00 2026-06-18T08:59:47+00:00

I am working on a Windows 8 metro app and having multiple SettingsFlyout items

  • 0

I am working on a Windows 8 metro app and having multiple SettingsFlyout items which get added by below mentioned code

SettingsCommand cmd1 = new SettingsCommand("sample", "Color Settings", (x) =>
        {
            // create a new instance of the flyout
            SettingsFlyout settings = new SettingsFlyout();
            // set the desired width.  If you leave this out, you will get Narrow (346px)
            // optionally change header and content background colors away from defaults (recommended)
            // if using Callisto's AppManifestHelper you can grab the element from some member var you held it in
            // settings.HeaderBrush = new SolidColorBrush(App.VisualElements.BackgroundColor);
            settings.HeaderBrush = new SolidColorBrush(Colors.Black);
            settings.HeaderText = string.Format("Color Settings", App.VisualElements.DisplayName);
            settings.Background = new SolidColorBrush(_background);
            settings.Margin = new Thickness(0);
            // provide some logo (preferrably the smallogo the app uses)
            BitmapImage bmp = new BitmapImage(App.VisualElements.SmallLogoUri);
            settings.SmallLogoImageSource = bmp;

            // set the content for the flyout
            settings.Content = new ColorSettings();
            settings.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch;

            // open it
            settings.IsOpen = true;

            // this is only for the test app and not needed
            // you would not use this code in your real app
            // ObjectTracker.Track(settings);
        });

Currently using (SettingsPane.Show()) i can be able to show the added flyout items list but I want to programmatically open any setting Flyout item instead of opening a flyout list.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:59:48+00:00Added an answer on June 18, 2026 at 8:59 am

    Create a new class

    public class SettingsFlyout
    {
        private const int _width = 346;
        private Popup _popup;
    
        /// <summary>
        /// Show the Flyout with the UserControl as content
        /// </summary>
        /// <param name="control"></param>
        public void ShowFlyout(UserControl control)
        {
            _popup = new Popup();
            _popup.Closed += OnPopupClosed;
            Window.Current.Activated += OnWindowActivated;
            _popup.IsLightDismissEnabled = true;
            _popup.Width = _width;
            _popup.Height = Window.Current.Bounds.Height;
    
            control.Width = _width;
            control.Height = Window.Current.Bounds.Height;
    
            _popup.Child = control;
            _popup.SetValue(Canvas.LeftProperty, Window.Current.Bounds.Width - _width);
            _popup.SetValue(Canvas.TopProperty, 0);
            _popup.IsOpen = true;
        }
    
        private void OnWindowActivated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
        {
            if (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)
            {
                _popup.IsOpen = false;
            }
        }
    
        void OnPopupClosed(object sender, object e)
        {
            Window.Current.Activated -= OnWindowActivated;
        }
    }
    

    In a XAML page take a button and then write the button click event.

    private void Button_Click_1(object sender, RoutedEventArgs e)
    {
        SettingsFlyout flyout = new SettingsFlyout();
        flyout.ShowFlyout(new FlyoutContentUserControl());
    }
    

    Please note one thing FlyoutContentUserControl is the user control which you would like to show.

    Credits goes to Q42.WinRT

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a C# Metro style app for Windows 8, and I'm having
Has anyone managed to get Ninject working in Metro Style app using the Windows
I am working on a Windows 8 Metro Newsreader-App (with C# and XAML). I
I am working on an app in Windows 8 Metro Style app. I need
I am working on a Metro-app for Windows 8 and using MS Visual Studio
I've been trying to get something working in a windows 8 metro style application,
I am working on a Metro Style App for Windows 8. If I go
I'm working windows phone 7 app which loads an image inside a HyperlinkButton. This
I'm working on windows 8 metro style app. I want to show a save
I am working on a Windows 8 Metro App with HTML and JavaScript but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.