In ASP.Net when you're using Master Pages, you can provide the page a "MasterPage Type" pre-processor command along these lines:
<%@ MasterType VirtualPath="~/MasterPage.master" %>
This is used to provide you access to methods and properties that are defined in the Master page's codebehind. By default, when you use:
Page.MasterPage
it returns the base MasterPage class. If you have the MasterType defined then it returns it as the type of your defined Master Page [as opposed to doing something like: ctype(Page.MasterPage, MyMasterPage)]
My question is, how can I do something similar for the Identity and Principle objects in my WPF application.
Basically, I have custom Identity and Principle objects (which gather a few extra fields of data) and I don't want to have to explicitly cast them from the exposed interface every time I want to access those extra fields.