Setting a custom property within a WPF/Silverlight page

You can work with normal property without Dependency property if you create a Base class for your Page.

public class BaseWindow : Window
   public string MyProperty { get; set; }
<local:BaseWindow x:Class="BaseWindowSample.Window1" x:Name="winImp"
    MyProperty="myproperty value"
    Title="Window1" Height="300" Width="300">


And it works even though MyProperty is not a Dependency or Attached.

Leave a Comment