using System.Diagnostics; using System.Windows; using System.Windows.Controls; namespace BeWo.View.Controls.Utils { public partial class HelpInfoControl : UserControl { public static readonly DependencyProperty UrlProperty = DependencyProperty.Register("Url", typeof(string), typeof(HelpInfoControl), new PropertyMetadata(null)); public string Url { get => (string)GetValue(UrlProperty); set => SetValue(UrlProperty, value); } public static readonly DependencyProperty HelpToolTipProperty = DependencyProperty.Register("HelpToolTip", typeof(string), typeof(HelpInfoControl), new PropertyMetadata("Hilfe aufrufen")); public string HelpToolTip { get => (string)GetValue(HelpToolTipProperty); set => SetValue(HelpToolTipProperty, value); } public HelpInfoControl() { InitializeComponent(); } private void btn_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrWhiteSpace(Url) && Url.StartsWith("http")) Process.Start(new ProcessStartInfo(Url) { UseShellExecute = true }); } } }