You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.8 KiB
C#

2 years ago
using CommonFunc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace XGL.UControl
{
/// <summary>
/// UCCar.xaml 的交互逻辑
/// </summary>
public partial class UCCarL : UserControl
{
public UCCarL()
{
InitializeComponent();
}
public string Text
{
get
{
return (string)GetValue(TextProperty);
}
set
{
SetValue(TextProperty, value);
}
}
public static DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(UCCarL), new PropertyMetadata("", new PropertyChangedCallback(propertyChanged))); //属性默认值
private static void propertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
try
{
var control = d as UCCarL;
control.btnCar.Content = e.NewValue;
}
catch (Exception ex)
{
}
}
private void btnCar_Click(object sender, RoutedEventArgs e)
{
try
{
}
catch (Exception ex)
{
MethodInfo method = (MethodInfo)MethodBase.GetCurrentMethod();
Common.Log.Error(method.DeclaringType.FullName + "-" + method.Name + "\r\n" + ex.Message + "\r\n" + ex.StackTrace);
}
}
}
}