Beispiel #1
0
        public NewWindowPage()
        {
            this.InitializeComponent();
            //----< Transparent Title >----

            //using Windows.UI.ViewManagement;

            //window as default-size

            Windows.UI.ViewManagement.ApplicationViewTitleBar uwpTitleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;

            uwpTitleBar.ButtonBackgroundColor = Windows.UI.Colors.Transparent;

            uwpTitleBar.BackgroundColor = Windows.UI.Colors.Transparent;


            //using Windows.ApplicationModel.Core

            Windows.ApplicationModel.Core.CoreApplicationViewTitleBar coreTitleBar = Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().TitleBar;

            coreTitleBar.ExtendViewIntoTitleBar = true;

            //----</ Transparent Title >----
            Setup();
        }
Beispiel #2
0
        public MainPage()
        {
            var bounds = ApplicationView.GetForCurrentView().VisibleBounds;

            ApplicationView.PreferredLaunchViewSize      = new Size(bounds.Width, bounds.Height);
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
            this.InitializeComponent();
            Windows.UI.ViewManagement.ApplicationView appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
            // установка заголовка
            appView.Title = "Хамелеон";
            // получаем ссылку на TitleBar
            Windows.UI.ViewManagement.ApplicationViewTitleBar titleBar = appView.TitleBar;
            // установка цвета панели
            titleBar.BackgroundColor       = Windows.UI.Colors.Black;
            titleBar.ButtonBackgroundColor = Windows.UI.Colors.Black;
            //устанавливает предпочтительные границы для окна приложения
            //appView.SetDesiredBoundsMode();
        }