Пример #1
0
        public string GetHeaderText()
        {
            var be = HeaderTextBlock.GetBindingExpression(TextBlock.TextProperty);

            be?.UpdateTarget();
            return(HeaderTextBlock.Text);
        }
Пример #2
0
 public ShowList()
 {
     InitializeComponent();
     HeaderTextBlock.SetBinding(TextBlock.TextProperty, new Binding("HeaderText")
     {
         Source = this
     });
     ItemsSource = new ObservableCollection <string>();
     ItemsSource.CollectionChanged += ItemsSource_CollectionChanged;
 }