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


C# Controls.HyperlinkButton类代码示例

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


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

示例1: HyperlinkButtonAutomationPeer

		public HyperlinkButtonAutomationPeer (HyperlinkButton owner)
			: base (owner)
		{
			owner.Click += (s, a) => {
				RaiseAutomationEvent (AutomationEvents.InvokePatternOnInvoked);
			};
		}
开发者ID:shana,项目名称:moon,代码行数:7,代码来源:HyperlinkButtonAutomationPeer.cs

示例2: OnNavigatedTo

        // 当用户导航到此页面时执行。
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            //Add MainPage
            {
                HyperlinkButton lHyperLinkButton = new HyperlinkButton();
                lHyperLinkButton.Content = "重要部件到货信息";
                lHyperLinkButton.NavigateUri = new System.Uri("ProductManagerMain", UriKind.Relative);
                lHyperLinkButton.Style = Application.Current.Resources["LinkStyleMenu"] as Style;
                lHyperLinkButton.TargetName = "ProductManagerContentFrame";
                ProductManagerMenu.Children.Add(lHyperLinkButton);
                lHyperLinkButton.Click += HyperLinkButton_Click;

            }

            ProductManagerViewModel productManagerViewModel = this.DataContext as ProductManagerViewModel;
            foreach (ISubMenu lSubMenu in productManagerViewModel.SubMenuList)
            {
                HyperlinkButton lHyperLinkButton = new HyperlinkButton();
                lHyperLinkButton.Content = lSubMenu.Content;
                lHyperLinkButton.NavigateUri = new System.Uri(lSubMenu.NavigateUri, UriKind.Relative);
                lHyperLinkButton.Style = Application.Current.Resources["LinkStyleMenu"] as Style;
                lHyperLinkButton.TargetName = "ProductManagerContentFrame";
                ProductManagerMenu.Children.Add(lHyperLinkButton);
                lHyperLinkButton.Click += HyperLinkButton_Click;
            }
        }
开发者ID:YHTechnology,项目名称:ProjectManager,代码行数:27,代码来源:ProductManager.xaml.cs

示例3: UpdateCurrentPageIndicatorPosition

        private void UpdateCurrentPageIndicatorPosition(HyperlinkButton button)
        {
            GeneralTransform gt = button.TransformToVisual(MenuContainer);
            Point offset = gt.Transform(new Point(0, 0));

            CurrentPageIndicator.Margin = new Thickness(offset.X + button.ActualWidth / 2 - 7.5, 0, 0, 0);
        }
开发者ID:felixthehat,项目名称:Limo,代码行数:7,代码来源:AssociationStaffView.xaml.cs

示例4: PopupMessageWithAction

 public PopupMessageWithAction(PopupMessageType messageType, string message, string leftButtonText, string rightButtonText, Action leftButtonAction, Action rightButtonAction, Action noButtonAction, HyperlinkButton hyperLink)
     : base(messageType, message, leftButtonText, rightButtonText, hyperLink)
 {
     this.LeftButtonAction = leftButtonAction;
     this.RightButtonAction = rightButtonAction;
     this.NoButtonAction = noButtonAction;
 }
开发者ID:CodeObsessed,项目名称:drumbleapp,代码行数:7,代码来源:PopupMessageWithAction.cs

示例5: AssociationsContainerView

        public AssociationsContainerView(AssociationUser associationUser)
        {
            InitializeComponent();

            Manager = associationUser;            

            this.Loaded += new RoutedEventHandler(AssociationsContainerView_Loaded);

            CloseButton = new HyperlinkButton();
            CloseButton.Content = "Close X";
            CloseButton.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            CloseButton.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            CloseButton.Margin = new Thickness(0, 20, 20, 0);

            if (AssociationProfileContainer.Children.Count == 0)
            {
                view = KernelContainer.Kernel.Get<AssociationsView>();
                viewModel = KernelContainer.Kernel.Get<AssociationsViewModel>();
                viewModel.AssociationManagerId = Manager.Id;
                AssociationsViewModel.IsStaffApp = true;
                view.DataContext = viewModel;

                (view.FindName("LayoutRoot") as Grid).Children.Add(CloseButton);

                AssociationProfileContainer.Children.Add(view);
            }
        }
开发者ID:felixthehat,项目名称:Limo,代码行数:27,代码来源:AssociationsContainerView.xaml.cs

示例6: AddExample

 private void AddExample(StackPanel owner, string title, string src)
 {
     var bt = new HyperlinkButton();
     bt.Content = title;
     bt.Click += GetHandlerForExample(src);
     owner.Children.Add(bt);
 }
开发者ID:fabriceleal,项目名称:Multitasks,代码行数:7,代码来源:MainPage.xaml.cs

示例7: HyperlinkMatchesUri

		private static bool HyperlinkMatchesUri(string uri, HyperlinkButton link)
		{
			var queryStart = uri.IndexOf('/', Math.Min(uri.Length, 1));
            if (queryStart < 0)
            {
                queryStart = uri.IndexOf('?');
            }

            if (queryStart > 0)
            {
                uri = uri.Substring(0, queryStart);
            }

			if (link.CommandParameter != null &&
				uri.Equals(link.CommandParameter.ToString(), StringComparison.InvariantCultureIgnoreCase))
			{
				return true;
			}

			var alternativeUris = LinkHighlighter.GetAlternativeUris(link);
			if (alternativeUris != null && alternativeUris.Any(alternative => uri.Equals(alternative, StringComparison.InvariantCultureIgnoreCase)))
			{
				return true;
			}

			return false;
		}
开发者ID:925coder,项目名称:ravendb,代码行数:27,代码来源:MainPage.xaml.cs

示例8: CreateBaseLink

        Inline CreateBaseLink(string content, string contextHeader, string contextTag, MenuItem customButton = null)
        {
            var link = new HyperlinkButton
            {
                Content = content,
                FontSize = Text.FontSize,
                FontWeight = Text.FontWeight,
                FontStretch = Text.FontStretch,
                FontFamily = Text.FontFamily,
                TargetName = contextTag,
                Margin = new Thickness(-10, -5, -10, -8)
            };

            link.Click += new RoutedEventHandler(link_Click);

            MenuItem item = new MenuItem
            {
                Header = contextHeader,
                Tag = contextTag,
                Foreground = new SolidColorBrush(Colors.Black)
            };
            item.Click += new RoutedEventHandler(CopyLink);

            ContextMenu menu = new ContextMenu();
            menu.Items.Add(item);
            if (customButton != null)
                menu.Items.Add(customButton);

            ContextMenuService.SetContextMenu(link, menu);

            InlineUIContainer container = new InlineUIContainer();
            container.Child = link;
            return container;
        }
开发者ID:rafaelwinter,项目名称:Ocell,代码行数:34,代码来源:DMView.xaml.cs

示例9: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/EcosCab;component/Controls/ucDeviceInfo.xaml", System.UriKind.Relative));
     this.linkDeviceService = ((System.Windows.Controls.HyperlinkButton)(this.FindName("linkDeviceService")));
 }
开发者ID:KonstantinKolesnik,项目名称:EcosHub,代码行数:8,代码来源:ucDeviceInfo.g.i.cs

示例10: AdvancedMessageBox_Click

        private void AdvancedMessageBox_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton hyperlinkButton = new HyperlinkButton()
            {
                Content = "Más información.",
                HorizontalAlignment = HorizontalAlignment.Left,
                NavigateUri = new Uri("http://javiersuarezruiz.wordpress.com/", UriKind.Absolute)
            };

            TiltEffect.SetIsTiltEnabled(hyperlinkButton, true);

            ListPicker listPicker = new ListPicker()
            {
                Header = "Recordar en:",
                ItemsSource = new string[] { "5 minutos", "10 minutos", "15 minutos" }
            };

            StackPanel stackPanel = new StackPanel();
            stackPanel.Children.Add(hyperlinkButton);
            stackPanel.Children.Add(listPicker);

            CustomMessageBox messageBox = new CustomMessageBox()
            {
                Title = "Recordatorio",
                Caption = "Programar Windows Phone",
                Message = "Realizar ejemplo del control CustomMessageBox",
                Content = stackPanel,
                LeftButtonContent = "Aceptar",
                RightButtonContent = "Cancelar",
                IsFullScreen = (bool)FullScreenCheckBox.IsChecked
            };

            messageBox.Dismissing += (s1, e1) =>
            {
                if (listPicker.ListPickerMode == ListPickerMode.Expanded)
                {
                    e1.Cancel = true;
                }
            };

            messageBox.Dismissed += (s2, e2) =>
            {
                switch (e2.Result)
                {
                    case CustomMessageBoxResult.LeftButton:
                        // Acción.
                        break;
                    case CustomMessageBoxResult.RightButton:
                    case CustomMessageBoxResult.None:
                        // Acción.
                        break;
                    default:
                        break;
                }
            };

            messageBox.Show();
        }
开发者ID:rwecho,项目名称:Windows-Phone-Samples,代码行数:58,代码来源:MainPage.xaml.cs

示例11: PlaceHyperlinkPrimitive

 public static HyperlinkButton PlaceHyperlinkPrimitive(Grid Container, int Col, int Row)
 {
     HyperlinkButton hyperlink = new HyperlinkButton();
     hyperlink.SetValue(Grid.ColumnProperty, Col);
     hyperlink.SetValue(Grid.RowProperty, Row);
     hyperlink.Style = (Style)Application.Current.Resources["CellHyperLink"];            
     Container.Children.Add(hyperlink);
     return hyperlink;
 }
开发者ID:nilavghosh,项目名称:VChk,代码行数:9,代码来源:PrimitiveHelper.cs

示例12: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/DataVisualizationOnWindowsPhone;component/MainPage1.xaml", System.UriKind.Relative));
     this.myChart = ((System.Windows.Controls.DataVisualization.Charting.Chart)(this.FindName("myChart")));
     this.hyperlinkButton1 = ((System.Windows.Controls.HyperlinkButton)(this.FindName("hyperlinkButton1")));
 }
开发者ID:jasdeepg,项目名称:PredictShakti,代码行数:9,代码来源:MainPage1.g.i.cs

示例13: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SpikeSilverlightApplication;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.chButton = ((System.Windows.Controls.Button)(this.FindName("chButton")));
     this.tabBTn = ((System.Windows.Controls.HyperlinkButton)(this.FindName("tabBTn")));
 }
开发者ID:suparna619,项目名称:Spikes,代码行数:10,代码来源:MainPage.g.i.cs

示例14: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/test;component/SecongPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.Hyperlink = ((System.Windows.Controls.HyperlinkButton)(this.FindName("Hyperlink")));
 }
开发者ID:AegeanApp,项目名称:Aegean-App-V1,代码行数:10,代码来源:SecongPage.g.i.cs

示例15: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MetalXmas2010;component/FeedbackDialog.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.OKButton = ((System.Windows.Controls.Button)(this.FindName("OKButton")));
     this.CancelButton = ((System.Windows.Controls.HyperlinkButton)(this.FindName("CancelButton")));
 }
开发者ID:dotjosh,项目名称:MetalXmas2011,代码行数:10,代码来源:FeedbackDialog.g.i.cs


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