View Single Post
Old 01-11-2006   #7 (permalink)
Michael Latta


 
 

Re: Inheriting from custom made page in xaml

Thanks,

I will give that a try when I get a chance. Your example was very clear.

Michael


<Thomas Andersen> wrote in message
news:eLHCLvpEGHA.3820@TK2MSFTNGP12.phx.gbl...
> Hi Michael,
>
> Here is how I did mine:
> _________
> 1st file DetailPageBase.cs:
> ---
> using System;
> using System.Collections.Generic;
> using System.Text;
>
> namespace Common.WinFX.Pages
> {
> public class DetailPageBase: System.Windows.Controls.Page
> {
> }
> }
> _________
> 2nd file ContactPersonDetail.xaml:
> ---
> <?Mapping XmlNamespace="Local" ClrNamespace="Common.WinFX.Pages"
> Assembly="Common.WinFX" ?>
> <LocaletailPageBase x:Class="Contact.WinFX.ContactPersonDetail"
> xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
> xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"
> Title="ContactPersonDetail"
> xmlns:Local="Local">
> <Grid>
> </Grid>
> </LocaletailPageBase>
> _________
> 3rd file ContactPersonDetail.xaml.cs:
> ---
> using System;
> using System.Windows;
> using System.Windows.Controls;
> using System.Windows.Data;
> using System.Windows.Documents;
> using System.Windows.Media;
> using System.Windows.Media.Imaging;
> using System.Windows.Navigation;
> using System.Windows.Shapes;
> using Common.WinFX.Pages;
>
> namespace Contact.WinFX
> {
> /// <summary>
> /// Interaction logic for ContactPersonDetail.xaml
> /// </summary>
>
> public partial class ContactPersonDetail : DetailPageBase
> {
> public ContactPersonDetail()
> {
> InitializeComponent();
> }
> }
> }
>
> Hope you can figure out the example.
>
> --
> Best regards,
> Thomas Andersen
>
>
> "Michael Latta" <lattam@mac.com> wrote in message
> news:OkDb9fjEGHA.532@TK2MSFTNGP15.phx.gbl...
>> Rob,
>>
>> My attempts so far to define a page or in my case a window with a base
>> class other than the WPF class have failed. It complains that the
>> generated .g.cs partial class has a different base class than my code
>> behind partial class. Can you point me at a sample that does this?
>>
>> Michael
>>
>>
>> "Rob Relyea [MSFT]" <Rob.Relyea@microsoft.nospam.com> wrote in message
>> news:uTCUflVEGHA.1288@TK2MSFTNGP09.phx.gbl...
>>> Yes that is a by design limitation for v1.
>>>
>>> If we do enable this in the future, how would you like the content of
>>> the first page to work in the subclassed page?
>>> We'd like to understand your scenario.
>>>
>>> Today, you can make the base class in a programming language and then
>>> build the subclasses with markup.
>>>
>>> Thanks,
>>> Rob Relyea
>>> WPF Program Manager
>>> http://longhornblogs.com/rrelyea
>>>
>>> <Thomas Andersen> wrote in message
>>> news:e4FQrVTEGHA.336@TK2MSFTNGP14.phx.gbl...
>>>> <Thomas Andersen> wrote in message
>>>> news:%23bI8$QTEGHA.2036@TK2MSFTNGP14.phx.gbl...
>>>>> Can this be try? That seems like a wierd limitation?
>>>>
>>>> Ups, should say:
>>>> Can this be right? That seems like a wierd limitation?
>>>>
>>>> --
>>>> Thomas Andersen
>>>>
>>>
>>>

>>
>>

>
>



My System SpecsSystem Spec