?? bindingtoctrl.xaml.cs
字號:
using System;
using System.Collections.Generic;
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.Shapes;
namespace DTSample
{
public partial class BindingToCtrl : System.Windows.Window
{
public BindingToCtrl()
{
InitializeComponent();
}
BindingClass BindPath = new BindingClass("I'm a textBox", 100);
private void Onload(Object sender, EventArgs e)
{
MyTextBox.DataContext = BindPath;
MyTextBlock.DataContext = BindPath;
}
private void OnClick(object sender, RoutedEventArgs e)
{
BindingExpression be = MyTextBox.GetBindingExpression(TextBox.TextProperty);
be.UpdateSource();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -