public RichViewWindow() { this._RichViewControl = new RichViewControl(); this._RichViewControl.SetBinding(RichViewControl.ItemsSourceProperty, new Binding { Mode = BindingMode.OneWay, Source = this, Path = new PropertyPath("RichViewItemsSource") }); this.BubbleMsgs = new ObservableCollection <BubbleMsg>(); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); this._RichViewControl = this.GetTemplateChild("PART_RichViewControl") as RichViewControl; }