当前位置: 首页>>代码示例>>C#>>正文


C# MetroWindow类代码示例

本文整理汇总了C#中MetroWindow的典型用法代码示例。如果您正苦于以下问题:C# MetroWindow类的具体用法?C# MetroWindow怎么用?C# MetroWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MetroWindow类属于命名空间,在下文中一共展示了MetroWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MessageDialog

        internal MessageDialog(MetroWindow parentWindow, MetroDialogSettings settings)
            : base(parentWindow, settings)
        {
            InitializeComponent();

            PART_MessageScrollViewer.Height = DialogSettings.MaximumBodyHeight;
        }
开发者ID:Acaspita,项目名称:MahApps.Metro,代码行数:7,代码来源:MessageDialog.cs

示例2: BaseMetroDialog

        /// <summary>
        /// Initializes a new MahApps.Metro.Controls.BaseMetroDialog.
        /// </summary>
        /// <param name="owningWindow">The window that is the parent of the dialog.</param>
        /// <param name="settings">The settings for the message dialog.</param>
        protected BaseMetroDialog(MetroWindow owningWindow, MetroDialogSettings settings)
        {
            DialogSettings = settings ?? owningWindow.MetroDialogOptions;

            OwningWindow = owningWindow;

            Initialize();
        }
开发者ID:naydnabil,项目名称:MahApps.Metro,代码行数:13,代码来源:BaseMetroDialog.cs

示例3: LoginDialog

 internal LoginDialog(MetroWindow parentWindow, LoginDialogSettings settings)
     : base(parentWindow, settings)
 {
     InitializeComponent();
     Username = settings.InitialUsername;
     UsernameWatermark = settings.UsernameWatermark;
     PasswordWatermark = settings.PasswordWatermark;
     NegativeButtonButtonVisibility = settings.NegativeButtonVisibility;
 }
开发者ID:sonyraj,项目名称:MahApps.Metro,代码行数:9,代码来源:LoginDialog.cs

示例4: ProgressDialog

        //private const string PART_AffirmativeButton = "PART_AffirmativeButton";
        //private const string PART_NegativeButton = "PART_NegativeButton";

        //private Button AffirmativeButton = null;
        //private Button NegativeButton = null;

        //static MessageDialog()
        //{
        //    //DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageDialog), new FrameworkPropertyMetadata(typeof(MessageDialog)));
        //}
        internal ProgressDialog(MetroWindow parentWindow, MetroDialogSettings settings) : base(parentWindow, settings)
        {
            InitializeComponent();

            try
            {
                ProgressBarForeground = this.FindResource("AccentColorBrush") as Brush; //Выбо цвета для шариков
            }
            catch (Exception) { }
        }
开发者ID:korner-brazers,项目名称:VK-HashTag,代码行数:20,代码来源:ProgressDialog.cs

示例5: LoginDialog

 internal LoginDialog(MetroWindow parentWindow, LoginDialogSettings settings)
     : base(parentWindow, settings)
 {
     InitializeComponent();
     Username = settings.InitialUsername;
     Password = settings.InitialPassword;
     UsernameWatermark = settings.UsernameWatermark;
     PasswordWatermark = settings.PasswordWatermark;
     NegativeButtonButtonVisibility = settings.NegativeButtonVisibility;
     ShouldHideUsername = settings.ShouldHideUsername;
     RememberCheckBoxVisibility = settings.RememberCheckBoxVisibility;
     RememberCheckBoxText = settings.RememberCheckBoxText;
 }
开发者ID:zhihuawang,项目名称:MahApps.Metro,代码行数:13,代码来源:LoginDialog.cs

示例6: BaseMetroDialog

 /// <summary>
 /// Initializes a new MahApps.Metro.Controls.BaseMetroDialog.
 /// </summary>
 /// <param name="owningWindow">The window that is the parent of the dialog.</param>
 public BaseMetroDialog(MetroWindow owningWindow)
 {
     switch (owningWindow.MetroDialogOptions.ColorScheme)
     {
         case MetroDialogColorScheme.Theme:
             this.SetResourceReference(BackgroundProperty, "WhiteColorBrush");
             break;
         case MetroDialogColorScheme.Accented:
             this.SetResourceReference(BackgroundProperty, "AccentColorBrush");
             this.SetResourceReference(ForegroundProperty, "WhiteColorBrush");
             break;
     }
 }
开发者ID:huanshifeichen,项目名称:MahApps.Metro,代码行数:17,代码来源:BaseMetroDialog.cs

示例7: ProgressDialog

        //private const string PART_AffirmativeButton = "PART_AffirmativeButton";
        //private const string PART_NegativeButton = "PART_NegativeButton";

        //private Button AffirmativeButton = null;
        //private Button NegativeButton = null;

        //static MessageDialog()
        //{
        //    //DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageDialog), new FrameworkPropertyMetadata(typeof(MessageDialog)));
        //}
        internal ProgressDialog(MetroWindow parentWindow, MetroDialogSettings settings)
            : base(parentWindow, settings)
        {
            InitializeComponent();

            if (parentWindow.MetroDialogOptions.ColorScheme == MetroDialogColorScheme.Theme)
            {
                try
                {
                    ProgressBarForeground = this.FindResource("AccentColorBrush") as Brush;
                }
                catch (Exception) { }
            }
            else
                ProgressBarForeground = Brushes.White;
        }
开发者ID:bendetat,项目名称:MahApps.Metro,代码行数:26,代码来源:ProgressDialog.cs

示例8: BaseMetroDialog

        /// <summary>
        /// Initializes a new MahApps.Metro.Controls.BaseMetroDialog.
        /// </summary>
        /// <param name="owningWindow">The window that is the parent of the dialog.</param>
        public BaseMetroDialog(MetroWindow owningWindow, MetroDialogSettings settings)
        {
            DialogSettings = settings == null ? owningWindow.MetroDialogOptions : settings;

            switch (DialogSettings.ColorScheme)
            {
                case MetroDialogColorScheme.Theme:
                    this.SetResourceReference(BackgroundProperty, "WhiteColorBrush");
                    break;
                case MetroDialogColorScheme.Accented:
                    this.SetResourceReference(BackgroundProperty, "AccentColorBrush");
                    this.SetResourceReference(ForegroundProperty, "IdealForegroundColorBrush");
                    break;
            }

            OwningWindow = owningWindow;
        }
开发者ID:Boohyeah,项目名称:MahApps.Metro,代码行数:21,代码来源:BaseMetroDialog.cs

示例9: LoginDialog

 internal LoginDialog(MetroWindow parentWindow, LoginDialogSettings settings)
     : base(parentWindow, settings)
 {
     InitializeComponent();
     Username = settings.InitialUsername;
     UsernameWatermark = settings.UsernameWatermark;
     PasswordWatermark = settings.PasswordWatermark;
     NegativeButtonButtonVisibility = settings.NegativeButtonVisibility;
     if (settings.EnablePasswordPreview)
     {
         object resource = Application.Current.FindResource("Win8MetroPasswordBox");
         if (resource != null && resource.GetType() == typeof(Style))
         {
             PART_TextBox2.Style = (Style)resource;
         }
     }
 }
开发者ID:djengineerllc,项目名称:MahApps.Metro,代码行数:17,代码来源:LoginDialog.cs

示例10: SetupAndOpenDialog

        public static SizeChangedEventHandler SetupAndOpenDialog(MetroWindow window, BaseMetroDialog dialog)
        {
            dialog.SetValue(Panel.ZIndexProperty, (int)window.overlayBox.GetValue(Panel.ZIndexProperty) + 1);
            dialog.MinHeight = window.ActualHeight / 4.0;
            dialog.MaxHeight = window.ActualHeight;

            SizeChangedEventHandler sizeHandler = (sender, args) =>
            {
                dialog.MinHeight = window.ActualHeight / 4.0;
                dialog.MaxHeight = window.ActualHeight;
            };

            window.SizeChanged += sizeHandler;

            window.metroDialogContainer.Children.Add(dialog); //add the dialog to the container

            dialog.OnShown();

            return sizeHandler;
        }
开发者ID:darknesstiller,项目名称:MetodoDeGauss,代码行数:20,代码来源:DialogManager.cs

示例11: SetupAndOpenDialog

        private static SizeChangedEventHandler SetupAndOpenDialog(MetroWindow window, BaseMetroDialog dialog)
        {
            dialog.SetValue(Panel.ZIndexProperty, (int)window.overlayBox.GetValue(Panel.ZIndexProperty) + 1);
            dialog.MinHeight = window.ActualHeight / 4.0;
            dialog.MaxHeight = window.ActualHeight;

            SizeChangedEventHandler sizeHandler = null; //an event handler for auto resizing an open dialog.
            sizeHandler = new SizeChangedEventHandler((sender, args) =>
            {
                dialog.MinHeight = window.ActualHeight / 4.0;
                dialog.MaxHeight = window.ActualHeight;
            });

            window.SizeChanged += sizeHandler;

            //window.overlayBox.Visibility = Visibility.Visible; //activate the overlay effect

            window.metroDialogContainer.Children.Add(dialog); //add the dialog to the container

            dialog.OnShown();

            return sizeHandler;
        }
开发者ID:NExPlain,项目名称:MahApps.Metro,代码行数:23,代码来源:DialogManager.cs

示例12: HandleOverlayOnShow

 private static Task HandleOverlayOnShow(MetroDialogSettings settings, MetroWindow window)
 {
     return (settings == null || settings.UseAnimations ? window.ShowOverlayAsync() : Task.Factory.StartNew(() => window.Dispatcher.Invoke(new Action(() => window.ShowOverlay()))));
 }
开发者ID:NExPlain,项目名称:MahApps.Metro,代码行数:4,代码来源:DialogManager.cs

示例13: MessageDialog

        //private const string PART_AffirmativeButton = "PART_AffirmativeButton";
        //private const string PART_NegativeButton = "PART_NegativeButton";

        //private Button AffirmativeButton = null;
        //private Button NegativeButton = null;

        //static MessageDialog()
        //{
        //    //DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageDialog), new FrameworkPropertyMetadata(typeof(MessageDialog)));
        //}
        internal MessageDialog(MetroWindow parentWindow)
            : base(parentWindow)
        {
            InitializeComponent();
        }
开发者ID:Niahm,项目名称:MahApps.Metro,代码行数:15,代码来源:MessageDialog.cs

示例14: CustomDialog

 public CustomDialog(MetroWindow parentWindow)
     : this(parentWindow, null)
 {
 }
开发者ID:MahApps,项目名称:MahApps.Metro,代码行数:4,代码来源:CustomDialog.cs

示例15: LoginDialog

 internal LoginDialog(MetroWindow parentWindow)
     : this(parentWindow, null)
 {
 }
开发者ID:MahApps,项目名称:MahApps.Metro,代码行数:4,代码来源:LoginDialog.cs


注:本文中的MetroWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。