Usage of ApplicationBarIconButton in WP8.1 Universal Apps

I had Code Snip like this
ApplicationBarIconButton b = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
b.Text = "Add" + " " + AppResources.Type;
How to make it work with WP 8.1 Universal Apps
I tried like this 
AppBarButton b=(AppBarButton)AppBar.
b.Text = "Add" + " " + AppResources.Type;
Help me in this issue..
Mohan Rajesh Komatlapalli

In XAML file you should assign name for your AppBarButton for example "b1", and in the codebehind instead Text property use Content property 
b1.Content="Add"+" "+GetType(AppResources).Name;

Similar Messages

  • Is there any event in windows universal app (wp8.1&win8.1) that fires when screen locked and unlocked with in the app?

    Hi All,
    Is there any event in windows universal app (wp8.1&win8.1) that fires when screen locked and unlocked with in the app
    Right now, I am using this below mentioned event
    Window.Current.VisibilityChanged +=
    CurrentWindow_VisibilityChanged;, but it fires even when app relaunches.
    Please anybody help me to solve this issue.

    Thanks for your early reply. but, those are system triggers used in background task. I want an event that fires when screen gets locked. like this...(a networkstatuschangedevent)
    NetworkStatusChangedEventHandler
    networkStatusCallback =
    newNetworkStatusChangedEventHandler(OnNetworkStatusChange);

  • Cannot change access modifiers when overriding 'protected' inherited member 'Windows.UI.Xaml.FrameworkElement.OnApplyTemplate() Error In Wp8.1 Universal Apps

    This Code is Working in WP8.0 but in WP8.1 Universal Apps i got this error.
    public override void OnApplyTemplate()
    base.OnApplyTemplate();
    //Some Statements

    Hi Chinni987,
    The error message seems quite clear, you have duplicate name definition for MyclassName, you may need to check it.
    There also a possibility that something wrong with XAML, sometimes it looks like the environment issue instead of the code issue, try to rebuild your XAML and clean the project, rebuild again to see if helps.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • [Universal Apps] Working around XamlRenderingBackgroundTask restrictions

    Hi,
    I'm still trying to wrap my head around the introduction of the XamlRenderingBackgroundTask for Universal apps. I'm currently planning my next app and I want it to have custom XAML bitmaps on tiles. Now I have a few questions on this:
    All samples and references recommend to write the XamlRenderingBackgroundTask in C++. While I'm generally not opposed to that, I still have a few problems regarding to accessing the app's functionality while rendering the tile. E.g. I want to get
    the newest updates from a server and calculate locally on what I should show on the tile. The same functionality is used within the full app and is written in C#, and I think implementing the whole functionality in C++ would be a lot of work (server
    communication, SQLite and Linq usage). This
    sample here shows one implementation of the XamlRenderingBackgroundTask but it is fairly limited in functionality because it only displays in time.
    I have thought of a two possibilites to work around the XamlRenderingBackgroundTask restrictions and I wanted to get some opinions on what the best way would be:
    Create two background tasks, one in C# and one in C++. The C# background task calculates the data that will be used and stores it locally for the C++ background task.
    The problem here is: Will the memory/CPU quotas hit the limit here? How can I guarantee the sequence (First C#, then C++)?
    Store the C# logic in a WinRT component and reference it from the C++ background task.
    I can't imagine this works, because the C# component will load the CLR runtime and I will hit the memory limit.
    Also I have another question regarding background tasks:
    Are the memory restrictions cummulative or is 16 MB on a 512 MB RAM phone device an upper limit that shall never be exceeded? E.g.:
    I create an image and update the tile which takes 14 MB. If I flush the tile correclty etc. do I again have 16 MB to work with or only the remaining 2 MB?
    The reason I ask is, because I wanted to allow the user to pin multiple (secondary) tiles to the start screen. If I only can create a tile once, it could never update (with XAML images) the other tiles.
    I'd be thankful for any thoughts on this.

    Hey, thanks for the replies so far!
    I don't control the server side, so I can't create the image there and push it to the device.
    I definitely want to create it in a BackgroundTask, otherwise there would be no value to these Live Tiles. Now, I did some digging around and played with the XAMLRenderingBackgroundTask types in both C# and C++. I created a sample app, which monitors
    the memory usage of a C++ and a C# background task and saves the results to files in the pictures library whenever the time zone is changed. You can download the source code here:
    Download solution
    My findings:
    1. If you have two separate Background tasks registered (e.g. one C# and one C++) and both tasks are run at the same time the limit will sum up, e.g. I got 60 MB as a limit and not 30, which is nice :) This means, that I can go ahead with the two
    Background tasks mailbox scenario, which will only result in a small time delay.
    2. Weirdly, it appears that the memory usage of the C# Background task is sometimes lower than the C++ one. Also, I never really got the C++ one below the C# Background task. Both Background tasks inherit from XamlRenderingBackgroundTask,
    but I never really try to render an image, is this the problem? Otherwise, I fail to see the reason why I can't use the XamlRenderingBackgroundTask on low memory devices ...
    Sample results from the tasks:
    C#
    Limit: 40
    Current usage: 3.296875
    Usage after memory allocation: 8.59375
    Concurrent: false
    C++
    Limit: 40
    Current usage: 4.50781
    Usage after memory allocation: 9.63672
    Concurrent: false
    C#
    Limit: 60
    Current usage: 6.0703125
    Usage after memory allocation: 6.4921875
    Concurrent: true
    C++
    Limit: 60
    Current usage: 6.12109
    Usage after memory allocation: 11.6563
    Concurrent: true
    Limit 40 means the debugger is still attached, otherwise the limit is 30 because I have a Lumia 925.
    Any ideas?

  • XmlResolver is not working in Windows Phone 8.1 Universal Apps

    XmlResolver is Working in WP8.0, But when coming to in WP8.1 Universal Apps it is not working.
    XmlReaderSettings settings2 = new XmlReaderSettings
    XmlResolver = new XmlXapResolver()
    Devi Prasad.P

    The XmlXapResolver is not supported in Windows Phone 8.1
    Universal Apps . Try use the XDocument class in Windows Phone 8.1 Universal Apps. 
    I sale myself ONLY half CNY!

  • Can VOIP be integrated into WP8.1 app?

    I am looking for a working VOIP solution for WP8.1 universal app. Windows phone 8 has this
    api, but I cant find anything similar for universal apps. Does anyone have idea about this?

    I think you want this sample:
    https://code.msdn.microsoft.com/windowsapps/Simple-Communication-Sample-eac73290
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Universal app in VB with VS 2013 update4

    Hi,
    is there any way to make a universal app in VS 2013 update4 in VisualBasic?
    Templates in VS are ok, bud only for C#, but i'm interesting to build universal app, but i need code in VB,
    (i C# can be W8.1, or WP8.1 app converted to univesal, but in VB not, there everythińg universal missing :( )
    is there any way to do this?
    Thanks so much.
    Peter

    Hi Peter,
    Thank you for posting in MSDN forum.
    Based on your issue, as far as I know that it is default that there have no universal app template using Visual Basic language in VS 2013 update4.
    In addition, I did some research for this issue from MSDN official document. I know that the universal app project templates that are currently available for C#, Visual C++ and JS, they have a similar set of templates for universal
    apps.
    So we could not make the universal app template using Visual Basic language in VS 2013 update4.
    For more information:
    http://blogs.msdn.com/b/visualstudio/archive/2014/04/14/using-visual-studio-to-build-universal-xaml-apps.aspx
    https://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx
    If you still want to this feature, I suggest you can submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio.
    The Visual Studio product team is listening to user voice there. You can send your idea there and people can vote. If you submit this suggestion, I hope you could post that link here, I will help you vote it.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Universal App: no Application Insights for Windows Phone 8.1 project

    I just created an universal app and installed the Application Insights Tools for Visual Studio extension. It was easy to add AI for the Windows 8.1 project. Unfortunately there is no "Add Application Insights Telemetry to project..." command for
    the Windows Phone 8.1 project. Am I missing something? What might be wrong?
    Thanks
    Hans-Peter

    Officially yes, but you should be able to get it to work:
    • Add Microsoft.ApplicationInsights.WindowsPhone package to the “Phone” project.
    • Add Microsoft.ApplicationInsights.WindowsStore package to the “Store” project.
    • Add <InstrumentationKey/> element to the ApplicationInsights.config files in both Phone and Store projects with the actual instrumentation key of your app. You need to decide whether you want to use single key for both windows and phone apps or separate
    keys.
    • Create a new instance of the TelemetryContext class in the App class in the Shared project and store it in a public static variable for use by the rest of the code in the universal project.
    Jakub Oleksy | Developer | Visual Studio Online

  • How to disable webview cache for Windows Phone 8.1 Runtime universal app?

    Is it possible to disable cache for the Webview control for a Windows Phone 8.1 runtime universal app? My App seems to be remembering the information it received the first time. My app logs me into a service and when I go back to rerun app in the emulator
    (without completing shutting down the emulator) it logs me in automatically rather than giving me the prompt. This behavior is in the NavigationCompleted handler if that helps explain a bit more on where I am hitting this issue.
    If I were to shut off the emulator completely and then restart it then I am prompted for the login name and password again. I have gotten over this cache issue, when I was using the HttpClient in other part of my app, by sending the no-cache in the header
    as:
    client.DefaultRequestHeaders.Add("Cache-Control", "no-cache");
    Can I do something similar for the webview control?
    thanks
    mujno

    Hi mujno,
    As I know currently there is no programmatically way to clean cache for WebView, see Matt's blog:How to clear the WebView cache
    However if you are developing an enterprise app, you should be able to invoke some scripts to clean for you, see this for more information:Brokered
    Windows Runtime Components for side-loaded Windows Store apps
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem with SQLite in Universal App (Windows Phone part)

    Hello,
    I am using Universal Apps project because I want to move myself from Silverlight.
    In Silverlight type of Windows Phone project, it is very easy to work with SQLite either on 8.0 or 8.1.
    But I can't find a way to work with SQLite in Universal project. There is no IsolatedStorage to check if database exist, and if it does not exist, Application will put it in the IsolatedStorage.
    I always get message "No such table: kategorije" where "kategorije" is the name of one table in my database.
    I guess that Application can't find the database.
    Is there any tutorial (I have tried to find it) on how to use SQLite in Universal Apps with custom written querys?
    Development Technician, Microsoft Certified Professional

    Here's a link you can refer to : Using SQLite as local database with Universal Apps
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • Universal Apps and Push Notifications (Question on both Store and Phone app)

    I have a Universal App and trying to implement notifications. I have an Azure Notification Hub and the code in the app.xaml.cs (shared) file that is creating the channel and binding to my notification hub. This all works great for the Windows Store app.
    However, I don't receive any notifications on the Phone app (running in the emulator). I am wondering if this is because the code to create the PushNotificationChannel is only registering once (the Store app) and has the same URI as the phone app. This line
    of code is what I am referring to:
    var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
    Since this is by application, and I am essentially running the same app twice on the same machine, via the phone emulator, is only one URI being generated for this?
    Thanks for any assistance.

    When you created the push notifications in the Azure, you chose the code fr Windows Store, not Windows Phone. as you mentioned you having a universal apps. 
    Hint: Did you enabled push notifications for local testing ?
    This is the 4 steps to have a successful Push notification integration with your app 
    Register your app for push notifications
    Update the service to send push notifications
    Enable push notifications for local testing
    Test push notifications in your app
    For more info please follow this
    link 

  • Cannot load shared 'project' in Windows Universal app after upgrading to Azure SDK 2.6

    I've just installed the
    April 2015 release of the Azure SDK. It is version 2.6 and previously I was on 2.5. Now one of my projects will not load. It is the shared project in a Windows Universal application.
    When I right-click the project and choose 'reload' I get the pop-up error 
    > The method or operation is not implemented
    The output window gives more detail:
    > Things.Shared.shproj : error  : The composition produced a single
    > composition error. The root cause is provided below. Review the
    > CompositionException.Errors property for more detailed information.

    > 1) No exports were found that match the constraint: 
    > ContractName
    Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService
    > RequiredTypeIdentity
    Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService

    > Resulting in: Cannot set import
    > 'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.ProjectReferencesService
    > (ContractName="Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService")'
    > on part
    > 'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService'.
    > Element:
    > Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.ProjectReferencesService
    > (ContractName="Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService")
    > -->  Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService

    > Resulting in: Cannot get export
    > 'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.WireUp
    > (ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.AutoLoad")'
    > from part
    > 'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService'.
    > Element:
    > Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.WireUp
    > (ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.AutoLoad")
    > -->  Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService
    The other parts to the Windows Universal app (the Windows 8.1 project and the Windows Phone 8.1 project) have two Azure NuGet packages installed: Windows Azure Mobile Services 1.3.2 and Windows Azure Storage 4.3.0. (N.B. Those two projects load without issue.)
    This is not a show stopper for me since uninstalling the Azure SDK 2.6 removes the load failure. To uninstall I go via the Control Panel to 'uninstall or change a program' and then uninstall Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.6
    I would like to know how to fix this without uninstalling the Azure SDK 4.6.

    Hi
    Have the same problem and waiting for an answer also.
    Code is like a box of chocolates!...

  • How do I add a XAML page to a Universal App?

    I created a new Blank App. Everything works as it should. Now I want to add a new page. This is the wrong way I'm doing it:
    First, I add a new Blank Page to the Windows Project
    foo.xml.cs
    namespace testapp
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class foo : Page
    public foo()
    this.InitializeComponent();
    Then I add the same class name to the Shared project
    foo.cs
    namespace ZUMOAPPNAME
    class foo
    I modify foo.cs to
    namespace testapp
    public sealed partial class foo
    public void shared()
    win();
    And then add a method to foo.xaml.cs to make it
    namespace testapp
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class foo : Page
    public foo()
    this.InitializeComponent();
    public void win()
    shared();
    The win method can call the shared method.
    However, for the shared method, the compiler gives me this error:
    The name 'win' does not exist in the current context
    What's the proper way to add a new page?

    Hi Greg,
    Take a look at my blog entry
    Strategies for sharing code in XAML-based Universal apps
    As Magnus notes, all parts of a partial class need to be in the same namespace to be part of the same class. ZUMOAPPNAME.foo and testapp.foo are unrelated classes.
    It's not clear exactly what you're trying to do here, but a common pattern is to have different Xaml for the Windows and WindowsPhone projects but to share data. A good way to do that is to create the new page with the same name (for example: "foo")
    in both the Windows and WindowsPhone projects. This will add a foo.xaml and foo.xaml.cs file in each and will define the foo class in both foo.xaml.cs files.
    You can then add a foo.cs file in the shared project with your shared functions:
    Shared/Foo.cs:
    namespace testapp
    public sealed partial class foo
    public void shared()
    do_shared_stuff();
    do_plat_specific_stuff();
    And call it from the platform specific functions:
    Windows\foo.xaml.cs:
    namespace testapp
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class foo : Page
    public foo()
    this.InitializeComponent();
    shared();
    public void do_platform_specific_stuff()
    // do windows stuff
    You can use this to mix and match as much as you'd like. If you have very straigtforward UI you may be able to copy the entire .Xaml and .Xaml.cs into the shared directory or you may have platform specific Xaml but share the Xaml.cs file. In most cases you'll
    have a mix of platform specific xaml and code and shared code.

  • How to use the code written in App.Xaml.cs in Windows Phone 8 in Windows Phone 8.1 Universal Apps

    i have a App.xaml.cs file in Windows Phone 8.0 , amd i want to use the code in that file to make work with App.xaml.cs file in Windows Phone 8.1 Universal Apps
    My Windows Phone 8 App.xaml.cs file is like as below
    namespace OnlineVideos
    public partial class App : Application
    #region Initialization
    public static dynamic group = default(dynamic);
    public static dynamic grouptelugu = default(dynamic);
    public static ShowList webinfo = default(ShowList);
    public static WebInformation webinfotable = new WebInformation();
    AppInitialize objCustomSetting;
    IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
    DispatcherTimer timer;
    IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
    public static bool AdStatus = false;
    public App()
    UnhandledException += Application_UnhandledException;
    if (System.Diagnostics.Debugger.IsAttached)
    Application.Current.Host.Settings.EnableFrameRateCounter = true;
    //RootFrame.UriMapper = Resources["UriMapper"] as UriMapper;
    AppSettings.NavigationID = false;
    objCustomSetting = new AppInitialize();
    timer = new DispatcherTimer();
    Constants.DownloadTimer = timer;
    InitializeComponent();
    InitializePhoneApplication();
    #endregion
    #region "Private Methods"
    void StartDownloadingShows()
    timer.Interval = TimeSpan.FromSeconds(10);
    timer.Tick += new EventHandler(timer_Tick);
    timer.Start();
    void timer_Tick(object sender, EventArgs e)
    try
    BackgroundWorker worker = new BackgroundWorker();
    worker.DoWork += new DoWorkEventHandler(StartBackgroundDownload);
    worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
    worker.RunWorkerAsync();
    catch (Exception)
    void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    if (AppSettings.StopTimer == "True")
    timer.Stop();
    AppSettings.StopTimer = "False";
    async void StartBackgroundDownload(object sender, DoWorkEventArgs e)
    switch (AppSettings.BackgroundAgentStatus)
    case SyncAgentStatus.DownloadFavourites:
    if (AppSettings.DownloadFavCompleted == false && AppSettings.SkyDriveLogin == true)
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    timer.Stop();
    ReStoreFavourites reStoreFav = new ReStoreFavourites();
    await reStoreFav.RestorefavFolder(ResourceHelper.ProjectName);
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.UploadFavourites;
    timer.Start();
    else
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.UploadFavourites;
    break;
    case SyncAgentStatus.UploadFavourites:
    bool result = Task.Run(async () => await Storage.FavouriteFileExists("Favourites.xml")).Result;
    if (AppSettings.SkyDriveLogin == true && result)
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    timer.Stop();
    UploadFavourites upLoad = new UploadFavourites();
    await upLoad.CreateFolderForFav(ResourceHelper.ProjectName);
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.DownloadParentalControlPreferences;
    timer.Start();
    else
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.DownloadParentalControlPreferences;
    break;
    case SyncAgentStatus.RestoreStory:
    if (AppSettings.DownloadStoryCompleted == false && AppSettings.SkyDriveLogin == true && (ResourceHelper.ProjectName == "Story Time" || ResourceHelper.ProjectName == "Vedic Library"))
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    timer.Stop();
    RestoreStory restore = new RestoreStory();
    //if (ResourceHelper.ProjectName == "Story Time")
    await restore.RestoreFolder("StoryRecordings");
    //else
    // await restore.RestoreFolder("VedicRecordings");
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.UploadStory;
    timer.Start();
    else
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.UploadStory;
    break;
    case SyncAgentStatus.UploadStory:
    if (AppSettings.SkyDriveLogin == true && (ResourceHelper.ProjectName == "Story Time" || ResourceHelper.ProjectName == "Vedic Library"))
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    timer.Stop();
    UploadStory st = new UploadStory();
    //if (ResourceHelper.ProjectName == "Story Time")
    await st.CreateFolder("StoryRecordings");
    //else
    // await st.CreateFolder("VedicRecordings");
    Deployment.Current.Dispatcher.BeginInvoke(() =>
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.DownloadFavourites;
    timer.Start();
    else
    AppSettings.BackgroundAgentStatus = SyncAgentStatus.DownloadFavourites;
    break;
    default:
    ShowDownloader.StartBackgroundDownload(timer);
    break;
    #endregion
    #region "Application Events"
    private void pop_Opened_1(object sender, EventArgs e)
    DispatcherTimer timer1 = new DispatcherTimer();
    timer1.Interval = TimeSpan.FromSeconds(5);
    timer1.Tick += timer1_Tick;
    timer1.Start();
    void timer1_Tick(object sender, EventArgs e)
    (sender as DispatcherTimer).Stop();
    Border frameBorder = (Border)VisualTreeHelper.GetChild(Application.Current.RootVisual, 0);
    Popup Adc = frameBorder.FindName("pop") as Popup;
    Adc.IsOpen = false;
    private void Application_Launching(object sender, LaunchingEventArgs e)
    SQLite.SQLiteAsyncConnection conn = new SQLite.SQLiteAsyncConnection(Constants.DataBaseConnectionstringForSqlite);
    Constants.connection = conn;
    AppSettings.AppStatus = ApplicationStatus.Launching;
    AppSettings.StopTimer = "False";
    objCustomSetting.CheckElementSection();
    SyncButton.Login();
    if (AppSettings.IsNewVersion == true)
    AppSettings.RatingUserName = AppResources.RatingUserName;
    AppSettings.RatingPassword = AppResources.RatingPassword;
    AppSettings.ShowsRatingBlogUrl = AppResources.ShowsRatingBlogUrl;
    if (ResourceHelper.AppName == Apps.Online_Education.ToString() || ResourceHelper.AppName == Apps.DrivingTest.ToString())
    AppSettings.QuizRatingBlogUrl = AppResources.QuizRatingBlogUrl;
    AppSettings.LinksRatingBlogUrl = AppResources.LinksRatingBlogUrl;
    AppSettings.ShowsRatingBlogName = AppResources.ShowsRatingBlogName;
    AppSettings.LinksRatingBlogName = AppResources.LinksRatingBlogName;
    if (ResourceHelper.AppName == Apps.Online_Education.ToString() || ResourceHelper.AppName == Apps.DrivingTest.ToString())
    AppSettings.QuizLinksRatingBlogName = AppResources.QuizLinksRatingBlogName;
    Constants.UIThread = true;
    group=OnlineShow.GetTopRatedShows().Items;
    grouptelugu = OnlineShow.GetRecentlyAddedShows().Items;
    Constants.UIThread = false;
    StartDownloadingShows();
    private void Application_Activated(object sender, ActivatedEventArgs e)
    AppSettings.AppStatus = ApplicationStatus.Active;
    if (ResourceHelper.AppName == Apps.Kids_TV_Pro.ToString())
    AppSettings.ShowAdControl = false;
    private void Application_Deactivated(object sender, DeactivatedEventArgs e)
    AppSettings.AppStatus = ApplicationStatus.Deactive;
    AppState.RingtoneStatus = "TombStoned";
    private void Application_Closing(object sender, ClosingEventArgs e)
    AppSettings.AppStatus = ApplicationStatus.Closing;
    private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
    FlurryWP8SDK.Api.LogError("Error at Application_UnhandledException in App.xaml.cs", e.ExceptionObject.InnerException);
    if (System.Diagnostics.Debugger.IsAttached)
    System.Diagnostics.Debugger.Break();
    else
    Exceptions.SaveOrSendExceptions("Exception in Application_UnhandledException Method In App.xaml.cs file.", e.ExceptionObject);
    e.Handled = true;
    return;
    #endregion
    #region Phone application initialization
    public PhoneApplicationFrame RootFrame { get; private set; }
    // Avoid double-initialization
    private bool phoneApplicationInitialized = false;
    // Do not add any additional code to this method
    private void InitializePhoneApplication()
    if (phoneApplicationInitialized)
    return;
    // Create the frame but don't set it as RootVisual yet; this allows the splash
    // screen to remain active until the application is ready to render.
    RootFrame = new PhoneApplicationFrame();
    if (App.Current.Resources["AdVisible"] as string == "True")
    RootFrame.Style = App.Current.Resources["RootFrameStyle"] as Style;
    RootFrame.ApplyTemplate();
    RootFrame.Navigated += CompleteInitializePhoneApplication;
    // Handle navigation failures
    RootFrame.NavigationFailed += RootFrame_NavigationFailed;
    // Ensure we don't initialize again
    phoneApplicationInitialized = true;
    //NonLinearNavigationService.Instance.Initialize(RootFrame);
    private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
    if (System.Diagnostics.Debugger.IsAttached)
    System.Diagnostics.Debugger.Break();
    else
    Exceptions.SaveOrSendExceptions("Exception in RootFrame_NavigationFailed Method In App.xaml.cs file.", e.Exception);
    e.Handled = true;
    return;
    // Do not add any additional code to this method
    private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
    // Set the root visual to allow the application to render
    if (RootVisual != RootFrame)
    RootVisual = RootFrame;
    // Remove this handler since it is no longer needed
    RootFrame.Navigated -= CompleteInitializePhoneApplication;
    #endregion
    Mohan Rajesh Komatlapalli

    Basically you are asking as how to port silverlight to Xaml (RT). Go one by one converting each API from silverlight to XAML, like IsolatedStorage isn't there in RT, so look for its alternative etc.
    See here the namespace/class mappings : Windows Phone Silverlight to Windows Runtime namespace and class mappings
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • Bind Pivot SelectedIndex causes app random crash in WP 8.1 universal app [MVVM Light]

    I have an universal app for WP 8.1 with a page and a Pivot in it. The "SelectedIndex" property of the pivot is bind to a property in the VM like this (code in MainViewModel.cs):
    public object SelectedPivotIndex
    get { return this.selectedPivotIndex; }
    set
    if (this.selectedPivotIndex == value) return;
    this.selectedPivotIndex = value;
    RaisePropertyChanged(() => SelectedPivotIndex);
    Page code:
    <Pivot x:Name="ContentPivot"
    x:Uid="ContentPivot"
    SelectedIndex="{Binding SelectedPivotIndex, Mode=TwoWay}"
    >...</Pivot>
    The problem is from time to time i'm having app crash (in App.xaml.cs): "Unhandled exception" with type "COMEXCEPTION". This crash stop if I remove the bind of the "SelectedIndex" in the xaml, but I cannot understand
    why it ocurs. Sometimes even the debugger is not shown and the app closes without any error information. BTW I'm using MVVM Light, so the "glue" between the view (page) and the VM is set in the page:
    <Page
    DataContext="{Binding Source={StaticResource Locator}, Path=Main}"
    >
    EDIT:
    I'm able to reproduce the crash with this behavior: Open app, navigate to another page, come back to the pivot page (several times) and flip throught the pivotitems.

    I've solved the problem with a workaround. In page code behind:
    private void ContentPivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
    var vm = this.DataContext as IPivotable;
    if (vm != null)
    vm.OnPivotItemChange(this.ContentPivot.SelectedIndex);
    The interface:
    public interface IPivotable
    void OnPivotItemChange(int pivotIndex);
    And finally the VM:
    public void OnPivotItemChange(int pivotIndex)
    try
    if (pivotIndex == 0)
    // Do stuff here...
    catch (Exception e)
    That's all, thanks for the... help?

Maybe you are looking for

  • Issues with Contacts on Z10

    Hi everyone, I have some headaches with the Contacts function on my Z10. Some useful advice on how to resolve these would be greatly appreciated: (1) Some of my contacts repeat themselves massively and at random within my Contacts list.  For example,

  • "Option" Command On Reboot To External Drive

    My MBP runs Leopard 10.5.6 and I have an older SATA drive from a MBP running Tiger. In fact it's the old drive out of my MBP prior to my Leopard upgrade. Typically, with other drives all I needed to to access the "old" drive was to put it in a 2.5";

  • In Firefox Bookmarks Menu, no "ORGANIZE BOOKMARKS" populates

    Greetings all, On my Macbook, I have Firefox and all of my bookmarks are contained within. I am attempting to export my bookmarks from Firefox, and then import them into my Safari browser. I have read just about every Firefox tutorial, and am still h

  • Cropping pictures in iOS issue

    Hello, I would like to know if somebody else experience the following issue: After cropping a photo using the native iOS photo application, the images are being sent as "original" size either by email, dropbox, etc.. I also connected my iPhone via US

  • Document management for home use

    Hello, I am going to / wanting to scan all documents (bills, insurance stuff, tax, ...) that I receive and want to archive it on my machine. For that I'm looking for some document management system suitable for home use. While I'm not afraid of some