• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Primitives.Popup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EventTest

		public void EventTest ()
		{
			TestPage.Width = 1000;
			TestPanel.Height = 1000;
			TestPanel.Background = new SolidColorBrush (Colors.Green);
			List<string> list = new List<string> ();
			Canvas c = new Canvas ();
			Rectangle r = new Rectangle { Width = 100, Height = 100, Fill = new SolidColorBrush (Colors.Blue) };
			c.Children.Add (r);
			Popup p = new Popup { Child = c };

			TestPage.MouseLeftButtonDown += delegate { list.Add ("PageDown"); };
			TestPage.MouseLeftButtonUp += delegate { list.Add ("PageUp"); };

			TestPanel.MouseLeftButtonDown += delegate { list.Add ("PanelDown"); };
			TestPanel.MouseLeftButtonUp += delegate { list.Add ("PanelUp"); };

			p.MouseLeftButtonDown += delegate { list.Add ("PopupDown"); };
			p.MouseLeftButtonUp += delegate { list.Add ("PopupUp"); };

			c.MouseLeftButtonDown += delegate { list.Add ("CanvasDown"); };
			c.MouseLeftButtonUp += delegate { list.Add ("CanvasUp"); };

			r.MouseLeftButtonDown += delegate { list.Add ("RectDown"); };
			r.MouseLeftButtonUp += delegate { list.Add ("RectUp"); };

			p.IsOpen = true;
			Enqueue (() => {
				// Fake a click - Only the canvas and rectangle see it
			});
		}
开发者ID:dfr0,项目名称:moon,代码行数:31,代码来源:PopupTest.cs


示例2: Show

 public void Show(FrameworkElement popupContent)
 {
     _PopupContent = popupContent;
     _Popup = new Popup();
     _Popup.Child = this;
     _Popup.IsOpen = true;
 }
开发者ID:ziibinj,项目名称:DataEncryptWindowsPhoneDemo,代码行数:7,代码来源:PopupCotainer.xaml.cs


示例3: CreateAndDisplayPopup

        private static void CreateAndDisplayPopup()
        {
            popupControl = new Popup();

            popupContentPanel = new StackPanel()
            {
                Orientation = Orientation.Horizontal,
                VerticalAlignment = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left,
                Background = new SolidColorBrush(settings.BackgroundColor)
            };

            popupContentPanel.Children.Add(GenerateTextBlockForPopup(Colors.White, "Current: "));
            textblockCurrentMemoryUsage = GenerateTextBlockForPopup(Colors.White, "N/A");
            popupContentPanel.Children.Add(textblockCurrentMemoryUsage);

            popupContentPanel.Children.Add(GenerateTextBlockForPopup(Colors.Yellow, "Peak: "));
            textblockPeakMemoryUsage = GenerateTextBlockForPopup(Colors.Yellow, "N/A");
            popupContentPanel.Children.Add(textblockPeakMemoryUsage);

            popupContentPanel.Children.Add(GenerateTextBlockForPopup(Colors.Orange, "Bat: "));
            textblockBatteryRemainingChargePercent = GenerateTextBlockForPopup(Colors.Orange, "N/A");
            popupContentPanel.Children.Add(textblockBatteryRemainingChargePercent);

            popupControl.Child = popupContentPanel;

            popupControl.IsOpen = true;
        }
开发者ID:jevgenidotnet,项目名称:WPPerfLab,代码行数:28,代码来源:MemoryProfiler.cs


示例4: CursorService

 static CursorService()
 {
     CursorPopup = new Popup();
     CursorPopup.IsHitTestVisible = false;
     CursorPopup.Cursor = Cursors.None;
     Canvas.SetZIndex(CursorPopup, 1000000);
 }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:7,代码来源:CursorService.cs


示例5: SplashScreen

        public SplashScreen()
        {
            LoadConfigPrefs();

            Image SplashScreen = new Image()
            {
                Height = Application.Current.Host.Content.ActualHeight,
                Width = Application.Current.Host.Content.ActualWidth,
                Stretch = Stretch.Fill
            };

            var imageResource = GetSplashScreenImageResource();
            if (imageResource != null)
            {
                BitmapImage splash_image = new BitmapImage();
                splash_image.SetSource(imageResource.Stream);
                SplashScreen.Source = splash_image;
            }

            // Instansiate the popup and set the Child property of Popup to SplashScreen
            popup = new Popup() { IsOpen = false,
                                  Child = SplashScreen,
                                  HorizontalAlignment = HorizontalAlignment.Stretch,
                                  VerticalAlignment = VerticalAlignment.Center

            };
        }
开发者ID:Carlosps,项目名称:ionicDataBase,代码行数:27,代码来源:SplashScreen.cs


示例6: ValidateSecurityTokenAsync

        public static Task<bool> ValidateSecurityTokenAsync(this PhoneApplicationFrame rootFrame, RequestSecurityTokenResponseStore tokenStore, string realm, string serviceNamespace, string acsHostUrl)
        {
            //if (!tokenStore.ContainsValidRequestSecurityTokenResponse())
            //{
            AccessControlServiceSignIn.RequestSecurityTokenResponseCompleted += AccessControlServiceSignIn_RequestSecurityTokenResponseCompleted;

            var signInPage = new SignInPage(tokenStore.IsTokenExpired,realm,serviceNamespace,acsHostUrl);
            var acsPopup = new Popup() { IsOpen = true, Child = signInPage };

            Task<bool> task = Task<bool>.Factory.StartNew(() =>
            {
                authenticateFinishedEvent.WaitOne();
                rootFrame.Dispatcher.BeginInvoke(() =>
                {
                    acsPopup.IsOpen = false;
                    signInPage = null;
                    acsPopup = null;
                }
                );
                return tokenStore.ContainsValidRequestSecurityTokenResponse();
            });

            return task;
            //}
            //return Task<bool>.Factory.StartNew(() => { return true; }); ;
        }
开发者ID:sabbour,项目名称:SWTOAuth,代码行数:26,代码来源:SignInHandler.cs


示例7: BuildPopup

        private void BuildPopup()
        {
            _groupSelectorPopup = new Popup();
            _border = new Border() { Background = new SolidColorBrush(Color.FromArgb(0xa0, 0, 0, 0)) };
            GestureListener listener = GestureService.GetGestureListener(_border);
            listener.GestureBegin += HandleGesture;
            listener.GestureCompleted += HandleGesture;
            listener.DoubleTap += HandleGesture;
            listener.DragCompleted += HandleGesture;
            listener.DragDelta += HandleGesture;
            listener.DragStarted += HandleGesture;
            listener.Flick += HandleGesture;
            listener.Hold += HandleGesture;
            listener.PinchCompleted += HandleGesture;
            listener.PinchDelta += HandleGesture;
            listener.PinchStarted += HandleGesture;
            listener.Tap += HandleGesture;

            _itemsControl = new LongListSelectorItemsControl();
            _itemsControl.ItemTemplate = GroupItemTemplate;
            _itemsControl.ItemsPanel = GroupItemsPanel;
            _itemsControl.ItemsSource = ItemsSource;

            _itemsControl.GroupSelected += itemsControl_GroupSelected;

            _groupSelectorPopup.Child = _border;
            ScrollViewer sv = new ScrollViewer() { HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled };

            _border.Child = sv;
            sv.Content = _itemsControl;

            SetItemsControlSize();
        }
开发者ID:DarkQuantum,项目名称:WoW-Armory-for-Windows-Phone-8,代码行数:33,代码来源:LongListSelectorGroup.cs


示例8: ShowConnectionError

        private void ShowConnectionError()
        {
            showError = true;
            popup = new Popup();
            popup.Height = Application.Current.Host.Content.ActualHeight;
            popup.Width = Application.Current.Host.Content.ActualWidth;
            popup.VerticalOffset = 30;
            ErrorDialog dialog = new ErrorDialog();
            dialog.Height = Application.Current.Host.Content.ActualHeight;
            dialog.Width = Application.Current.Host.Content.ActualWidth;
            popup.Child = dialog;
            popup.IsOpen = true;
            dialog.ErrorMessage.Text =
                "Oops! An error ocurred when connecting. " +
                "Make sure the configuration is correct and " +
                "retry again in a couple of seconds.";
            dialog.RetryButton.Click += (s, args) =>
            {
                popup.IsOpen = false;
                showError = false;
                ShowIdentityProviders();
            };

            dialog.CloseButton.Click += (s, args) =>
            {
                popup.IsOpen = false;
                Application.Current.Terminate();
            };
        }
开发者ID:kirpasingh,项目名称:MicrosoftAzureTrainingKit,代码行数:29,代码来源:EventsPage.xaml.cs


示例9: PopupButton

		public PopupButton()
		{
			var content = new ContentPresenter();
			content.SetBinding(ContentPresenter.ContentProperty, new Binding("PopupContent") { Source = this });
			var border = new Border()
			{
				CornerRadius = new CornerRadius(5),
				BorderThickness = new Thickness(1),
				Child = content
			};
			border.SetResourceReference(Border.BackgroundProperty, "BaseWindowBackgroundBrush");
			border.SetResourceReference(Border.BorderBrushProperty, "WindowBorderBrush");
			_popup = new Popup()
			{
				AllowsTransparency = true,
				StaysOpen = false,
				Placement = PlacementMode.Bottom,
				PlacementTarget = this,
				DataContext = this,
				Child = border,
			};
			_popup.SetBinding(Popup.IsOpenProperty, "IsChecked");
			_popup.SetBinding(Popup.WidthProperty, "Width");
			SetBinding(PopupButton.IsHitTestVisibleProperty, new Binding("IsOpen") { Source = _popup, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter() });
		}
开发者ID:xbadcode,项目名称:Rubezh,代码行数:25,代码来源:PopupButton.cs


示例10: PromptUser

        /// <summary>
        /// Prompt the user for review
        /// </summary>
        public static void PromptUser()
        {
            Popup popup = new Popup();
            popup.VerticalOffset = App.Current.Host.Content.ActualHeight / 3;
            ReviewPopupControl review = new ReviewPopupControl();
            popup.Child = review;
            popup.IsOpen = true;

            review.btnOk.Click += (s, args) =>
                {
                    MarketplaceReviewTask task = new MarketplaceReviewTask();
                    task.Show();

                    popup.IsOpen = false;
                    DidReview();
                };

            review.btnNo.Click += (s, args) =>
                {
                    numOfRuns = -1;
                    popup.IsOpen = false;
                };

            review.btnNever.Click += (s, args) =>
                {
                    DidReview();
                    popup.IsOpen = false;
                };
        }
开发者ID:vikramkone,项目名称:SuperAlarm,代码行数:32,代码来源:ReviewBugger.cs


示例11: MainPage

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            Browser.Width = Application.Current.Host.Content.ActualWidth;

            // Overlay
            this.popup = new Popup();
            LayoutRoot.Children.Add(popup);

            overlay = new site2App.WP8.Overlay();
            this.popup.Child = overlay;

            _webConfig = ((App)Application.Current).WebConfig;

            // Handle orientation changes
            OrientationChanged += MainPage_OrientationChanged;

            PhoneApplicationService.Current.Activated += Current_Activated;
            PhoneApplicationService.Current.Deactivated += Current_Deactivated;
            PhoneApplicationService.Current.Closing += Current_Closing;

            try
            {
                _currentUrl = (Uri)(userSettings["deactivatedUrl"]);
            }
            catch (System.Collections.Generic.KeyNotFoundException)
            {
            }
            catch (Exception exn)
            {
                Debug.WriteLine(exn.ToString());
            }
        }
开发者ID:jookie,项目名称:Gaj2,代码行数:35,代码来源:MainPage.xaml.cs


示例12: OpenSplashScreen

 // Open splash screen control
 private void OpenSplashScreen()
 {
     this.popup = new Popup();
     this.popup.Child = new SplashScreenControl();
     this.popup.IsOpen = true;
     LoadData();
 }
开发者ID:janijaak,项目名称:PictrGllr,代码行数:8,代码来源:MainPage.xaml.cs


示例13: Show

 public void Show(PopupPassword popupContent)
 {
     _PopupContent = popupContent;
     _Popup = new Popup();
     _Popup.Child = this;
     _Popup.IsOpen = true;
 }
开发者ID:varx,项目名称:WP7-apps,代码行数:7,代码来源:PopupCotainer.xaml.cs


示例14: Info

 public Info(TwitchBot inBot, Popup inCurrentPopup)
 {
     Bot = inBot;
     
     CurrentPopup = inCurrentPopup;
     InitializeComponent();
 }
开发者ID:Sovietmade,项目名称:TwitchChatBot,代码行数:7,代码来源:Info.xaml.cs


示例15: CreatePopup

        public Popup CreatePopup()
        {
            var popup = new Popup
            {
                MinWidth = _textBox.ActualWidth + 25,
                MaxHeight = 100,
                PlacementTarget = _textBox,
                Placement = PlacementMode.Bottom,
                VerticalOffset = 2,
                IsOpen = true,
                StaysOpen = false,
            };

            popup.Closed += PopupOnClosed;

            var popupSource = CreatePopupSource();
            popupSource.PreviewKeyDown += popupSource_PreviewKeyDown;
            popupSource.MouseUp += PopupSourceOnMouseUp;

            popup.Child = popupSource;
            SelectItem(popupSource);
            popupSource.Focus();
            
            return popup;
        }
开发者ID:sk8tz,项目名称:Orc.Controls,代码行数:25,代码来源:DateTimePartHelper.cs


示例16: AutoComplete

		/// <summary>
		/// Initializes a new instance of the <see cref="AutoComplete"/> class.
		/// </summary>
		public AutoComplete( Control value )
		{
			InitializeComponent();

			this.controlUnderAutocomplete = ControlUnderAutoComplete.Create( value );

			this.viewSource = controlUnderAutocomplete.GetViewSource( ( Style )this[ this.controlUnderAutocomplete.StyleKey ] );
			this.viewSource.Filter += OnCollectionViewSourceFilter;

			this.controlUnderAutocomplete.Control.SetValue( Control.StyleProperty, this[ this.controlUnderAutocomplete.StyleKey ] );
			this.controlUnderAutocomplete.Control.ApplyTemplate();

			this.autoCompletePopup = ( Popup )this.controlUnderAutocomplete.Control.Template.FindName( "autoCompletePopup", this.controlUnderAutocomplete.Control );
			this._listBox = ( ListBox )this.controlUnderAutocomplete.Control.Template.FindName( "autoCompleteListBox", this.controlUnderAutocomplete.Control );

			var b = new Binding( "ActualWidth" )
			{
				UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
				Source = this.controlUnderAutocomplete.Control
			};

			this.ListBox.SetBinding( ListBox.MinWidthProperty, b );
			this.ListBox.PreviewMouseDown += OnListBoxPreviewMouseDown;

			this.controlUnderAutocomplete.Control.AddHandler( TextBox.TextChangedEvent, new TextChangedEventHandler( OnTextBoxTextChanged ) );
			this.controlUnderAutocomplete.Control.LostFocus += OnTextBoxLostFocus;
			this.controlUnderAutocomplete.Control.PreviewKeyUp += OnTextBoxPreviewKeyUp;
			this.controlUnderAutocomplete.Control.PreviewKeyDown += OnTextBoxPreviewKeyDown;
		}
开发者ID:micdenny,项目名称:Radical.Windows,代码行数:32,代码来源:AutoComplete.xaml.cs


示例17: btnPrint_Click

        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Chart has been sent for printing...");
            popup = new Popup() { Name = "Popup" };
            border = new Border() { Name = "Border" };
            panel1 = new StackPanel() { Name = "Panel" };
            textblock1 = new TextBlock() { Name = "Textblock" };

            border.BorderBrush = new SolidColorBrush(Colors.DarkGray);
            border.BorderThickness = new Thickness(3.0);

            panel1.Background = new SolidColorBrush(Colors.LightGray);
            textblock1.Text = "Chart has been sent for printing...";
            textblock1.Margin = new Thickness(30.0);
            panel1.Children.Add(textblock1);
            Button button = new Button(){ Content = "OK", Width = 30, Height = 20, Margin = new Thickness(5.0)};
            button.Click +=new RoutedEventHandler(button_Click);
            panel1.Children.Add(button);

            border.Child = panel1;
            popup.Child = border;
            popup.HorizontalOffset = 613;
            popup.VerticalOffset = 375;
            popup.IsOpen = true;
        }
开发者ID:Bezideiko,项目名称:Telerik_QA_Academy,代码行数:25,代码来源:Zooming.xaml.cs


示例18: ShowLoadingPage

 public void ShowLoadingPage()
 {
     this.ApplicationBar.IsVisible = false;
     this.Popup = new Popup();
     this.Popup.Child = new LoadingPage();
     this.Popup.IsOpen = true;
 }
开发者ID:baurmatt,项目名称:WP-29C3,代码行数:7,代码来源:MainPage.xaml.cs


示例19: ItemFlyInAndOutAnimations

 public ItemFlyInAndOutAnimations()
 {
     // construct a popup, with a Canvas as its child
       _popup = new Popup();
       _popupCanvas = new Canvas();
       _popup.Child = _popupCanvas;
 }
开发者ID:Kelin-Hong,项目名称:JobHub_WP,代码行数:7,代码来源:MetroInMotion.cs


示例20: ShowPopup

 /// <summary>
 /// Shows the popup splash screen until authentication processes completes 
 /// with facebook
 /// </summary>
 
 private void ShowPopup()
 {
     this.popup = new Popup();
     this.popup.Child = new Splash();
     this.popup.IsOpen = true;
     StartLoadingData();
 }
开发者ID:rajinikanthg,项目名称:Mobile-Facebook-Drive,代码行数:12,代码来源:MainPage.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Primitives.Selector类代码示例发布时间:2022-05-26
下一篇:
C# Primitives.GeneratorPosition类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap