This is a migrated thread and some comments may be shown as answers.

RadPhoneApplicationFrame and Caliburn.Micro

5 Answers 81 Views
PhoneApplicationFrame
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Albert
Top achievements
Rank 2
Albert asked on 10 Feb 2012, 02:27 PM
Hello, i want to use the RadPhoneApplicationFrame with Caliburn Micro:
if i initialize RootFrame in App.xaml like this:
RootFrame = new RadPhoneApplicationFrame();
CM's INavigationService RootFrame property type is PhoneApplicationFrame 

if i renew RootFrame property in AppBootstrapper, View --> ViewModel databinding doen't work :(
but CM's INavigationService RootFrame property type is RadPhoneApplicationFrame 

public class AppBootstrapper : PhoneBootstrapper
{
    private PhoneContainer container;
 
    private new PhoneApplicationFrame RootFrame { get; set; }
 
    protected override void Configure()
    {
        RootFrame = new RadPhoneApplicationFrame();
        container = new PhoneContainer(RootFrame);
 
        container.RegisterPhoneServices();
        container.PerRequest<MainViewModel>();
    }
}

5 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 13 Feb 2012, 03:41 PM
Hi Albert,

Can you please send us a runnable project where we can debug the problem.

The difference between the RadPhoneApplicationFrame and PhoneApplicationFrame is that the content of the Telerik frame is a RadTransitionControl.

This may be a reason for your problem with Caliburn, but we want to make sure that we will address the correct problem. Please send us a very simple sample project where your problem is identified.

Greetings, Valentin.Stoychev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Albert
Top achievements
Rank 2
answered on 13 Feb 2012, 04:08 PM
There is a sample code
0
Accepted
Valentin.Stoychev
Telerik team
answered on 14 Feb 2012, 11:06 AM
Hello Albert,

The problem is in the AppBootstrapper - here is the updated working version. Please let us know if you need more help.
public class AppBootstrapper : PhoneBootstrapper
    {
        private PhoneContainer container;
 
        private PhoneApplicationFrame rootFrame;
        private new PhoneApplicationFrame RootFrame {
            get
            {
                if (this.rootFrame == null)
                {
                    this.rootFrame = new RadPhoneApplicationFrame();
                }
                return this.rootFrame;
            }
            set
            {
                this.rootFrame = value;
            }
        }
 
        protected override void Configure()
        {
            // Here i wanna init Rad frame, but if u uncomment this code, data binding and navigation does not work
 
            container = new PhoneContainer(RootFrame);
 
            container.RegisterPhoneServices();
            container.PerRequest<MainViewModel>();
            container.PerRequest<SecondViewModel>();
 
            AddCustomConventions();
        }
 
        protected override object GetInstance(Type service, string key)
        {
            return container.GetInstance(service, key);
        }
 
        protected override IEnumerable<object> GetAllInstances(Type service)
        {
            return container.GetAllInstances(service);
        }
 
        protected override void BuildUp(object instance)
        {
            container.BuildUp(instance);
        }
 
        public static void AddCustomConventions()
        {
        }
 
        protected override PhoneApplicationFrame CreatePhoneApplicationFrame()
        {
            return RootFrame;
        }


Regards, Valentin.Stoychev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Albert
Top achievements
Rank 2
answered on 14 Feb 2012, 12:32 PM
Thanks, Valentin
0
Derek
Top achievements
Rank 1
answered on 14 Mar 2012, 11:49 PM
This is what I do:

protected override PhoneApplicationFrame CreatePhoneApplicationFrame()
       {
           return new RadPhoneApplicationFrame();
       }
Tags
PhoneApplicationFrame
Asked by
Albert
Top achievements
Rank 2
Answers by
Valentin.Stoychev
Telerik team
Albert
Top achievements
Rank 2
Derek
Top achievements
Rank 1
Share this question
or