@@ -36,10 +36,10 @@ private static void OnValueChanged(DependencyObject d, DependencyPropertyChanged
3636
3737 public DemoViewProperty ( )
3838 {
39-
39+ GetExampleXamlContent = GetExampleXamlContent_Default ;
4040 }
4141
42- public DemoViewProperty ( DependencyProperty dependencyProperty , DependencyObject bindingTarget , string groupName = null , DataTemplate dataTemplate = null )
42+ public DemoViewProperty ( DependencyProperty dependencyProperty , DependencyObject bindingTarget , string groupName = null , DataTemplate dataTemplate = null ) : this ( )
4343 {
4444 SetCurrentValue ( PropertyNameProperty , GetDefaultPropertyName ( dependencyProperty ) ) ;
4545
@@ -68,7 +68,7 @@ public DemoViewProperty(DependencyProperty dependencyProperty, DependencyObject
6868
6969 /// <summary>Identifies the <see cref="DataTemplate"/> dependency property.</summary>
7070 public static readonly DependencyProperty DataTemplateProperty = DependencyProperty . Register ( nameof ( DataTemplate ) , typeof ( DataTemplate ) , typeof ( DemoViewProperty ) , new PropertyMetadata ( null ) ) ;
71-
71+
7272 /// <summary>Identifies the <see cref="ItemSource"/> dependency property.</summary>
7373 public static readonly DependencyProperty ItemSourceProperty = DependencyProperty . Register ( nameof ( ItemSource ) , typeof ( IEnumerable ) , typeof ( DemoViewProperty ) , new PropertyMetadata ( null ) ) ;
7474
@@ -197,5 +197,15 @@ public IEnumerable ItemSource
197197 set { SetValue ( ItemSourceProperty , value ) ; }
198198 }
199199
200+
201+ #region XAML Replace Value
202+ public Func < string > GetExampleXamlContent { get ; set ; }
203+
204+ private string GetExampleXamlContent_Default ( )
205+ {
206+ return Value ? . ToString ( ) ;
207+ }
208+ #endregion
209+
200210 }
201211}
0 commit comments