SImpleIOC services registration in universal app
Dear all,
I am building an universall app which collect data from an SQLite database.
I am a bit new in SimpleIOC use from MVVMLIght tool kit and run agains different sample but could not find out correct implementation from my case.
My goal is to provide a a service which is collecting data from database tables.
I have actually 2 options design for this :
option 1 : Create a big class called DatabaseService in which I will define all CRUD operation against all my tables
option 2 : Create individual service for each table in my database
Questions :
- What is the best option to go ?
- If option 2 is the prefered one, does that mean that I need to register each of my classes as individual service Inside ViewModelLocator ?
Thanks for those clarification
regards
I would choose the second one, this will make things clear.
>does that mean that I need to register each of my classes as individual service Inside ViewModelLocator ?
Yes, check this: http://stackoverflow.com/questions/9052180/mvvmlight-viewmodellocator-registering-dataservice
Best Regards,
Please remember to mark the replies as answers if they help
Similar Messages
-
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
mujnoHi 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. -
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!... -
Universal app on Windows Phone 10 black screen
Hello,
I received strange feedback that my application has some problems on Windows Phone 10. I can't test this because I don't have any Win10 devices. Can anyone check this app:
https://www.windowsphone.com/en-us/store/app/instabullet/28cffcfa-4568-45e5-820d-fb761b408bdd?signin=true
I have no idea where is the problem. After application starts it loads WebView with login page and on Win10 it is only black screen - at least one user has this problem with Lumia 635. Anyone had similiar problems? It is said that Universal app should work
on Win10 if they work on Win 8.1.It's a simple page with WebView, frameworks used are Unity, MVVM light.
XAML:
<Page
x:Class="PushBulletClient.Views.WebAuthView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:PushBulletClient"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:utils="using:PushBulletClient.Utils"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
DataContext="{Binding WebAuthViewModel, Source={StaticResource Locator}}"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:controls="using:PushBulletClient.Controls"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core">
<Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundColor}">
<Grid.ChildrenTransitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Grid.ChildrenTransitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title Panel -->
<controls:HeaderControl Header="Login" IconSource="{StaticResource LogoImage}"/>
<!--TODO: Content should be placed within the following grid-->
<Grid Grid.Row="1" x:Name="ContentRoot" Margin="19,9.5,19,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid x:Name="GridLoading" Visibility="{Binding State,
Converter={StaticResource StateIsEqualConverter},ConverterParameter=Loading}"
Grid.Row="0" >
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center">
<ProgressBar HorizontalAlignment="Stretch" Background="{StaticResource BackgroundColor}" IsIndeterminate="True" />
<TextBlock HorizontalAlignment="Center" Text="Loading..." />
</StackPanel>
</Grid>
<Grid x:Name="GridDeclined" Visibility="{Binding State,
Converter={StaticResource StateIsEqualConverter},ConverterParameter=Declined}"
Grid.Row="0" >
<StackPanel Orientation="Vertical">
<TextBlock Margin="0,0,0,20" Style="{StaticResource SubheaderTextBlockStyle}" Text="Declined"/>
<TextBlock TextWrapping="Wrap" Text="You must allow access to use Instabullet."/>
<Button Margin="0,10,0,0" Content="Back" Click="ButtonBack_OnClick"/>
</StackPanel>
</Grid>
<WebView Grid.Row="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
x:Name="Navigator"
NavigationStarting="Navigator_OnNavigationStarting"
Visibility="{Binding IsBrowserVisible, Converter={StaticResource BoolToVisibilityConverter}}"
>
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="NavigationStarting">
<core:InvokeCommandAction Command="{Binding NavigationStartingCommand}"
InputConverter="{StaticResource StartingArgsToWebNavigationResultConverter}" />
</core:EventTriggerBehavior>
<core:EventTriggerBehavior EventName="NavigationCompleted">
<core:InvokeCommandAction Command="{Binding NavigationCompletedCommand}"
InputConverter="{StaticResource CompletedArgsToWebNavigationResultConverter}" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</WebView>
</Grid>
</Grid>
</Page>
CS
using System;
using Windows.Foundation;
using Windows.Phone.UI.Input;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using GalaSoft.MvvmLight;
using PushBulletClient.Common;
// The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkID=390556
using PushBulletClient.Contracts.ViewModels;
using PushBulletClient.Contracts.Views;
using PushBulletClient.Models;
using PushBulletClient.Utils;
using PushBulletClient.ViewModels;
namespace PushBulletClient.Views
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class WebAuthView : Page, IView
private NavigationHelper navigationHelper;
private ObservableDictionary defaultViewModel = new ObservableDictionary();
public WebAuthView()
this.InitializeComponent();
this.navigationHelper = new NavigationHelper(this);
this.navigationHelper.LoadState += NavigationHelper_LoadState;
this.navigationHelper.SaveState += NavigationHelper_SaveState;
this.Unloaded += WebAuthView_Unloaded;
HardwareButtons.BackPressed += HardwareButtons_BackPressed;
Navigator.Navigate(new Uri(Consts.AppUri));
void WebAuthView_Unloaded(object sender, RoutedEventArgs e)
HardwareButtons.BackPressed -= HardwareButtons_BackPressed;
/// <summary>
/// Gets the <see cref="NavigationHelper"/> associated with this <see cref="Page"/>.
/// </summary>
public NavigationHelper NavigationHelper
get { return this.navigationHelper; }
/// <summary>
/// Gets the view model for this <see cref="Page"/>.
/// This can be changed to a strongly typed view model.
/// </summary>
public ObservableDictionary DefaultViewModel
get { return this.defaultViewModel; }
/// <summary>
/// Populates the page with content passed during navigation. Any saved state is also
/// provided when recreating a page from a prior session.
/// </summary>
/// <param name="sender">
/// The source of the event; typically <see cref="NavigationHelper"/>
/// </param>
/// <param name="e">Event data that provides both the navigation parameter passed to
/// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
/// a dictionary of state preserved by this page during an earlier
/// session. The state will be null the first time a page is visited.</param>
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
/// <summary>
/// Preserves state associated with this page in case the application is suspended or the
/// page is discarded from the navigation cache. Values must conform to the serialization
/// requirements of <see cref="SuspensionManager.SessionState"/>.
/// </summary>
/// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
/// <param name="e">Event data that provides an empty dictionary to be populated with
/// serializable state.</param>
private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
#region NavigationHelper registration
/// <summary>
/// The methods provided in this section are simply used to allow
/// NavigationHelper to respond to the page's navigation methods.
/// <para>
/// Page specific logic should be placed in event handlers for the
/// <see cref="NavigationHelper.LoadState"/>
/// and <see cref="NavigationHelper.SaveState"/>.
/// The navigation parameter is available in the LoadState method
/// in addition to page state preserved during an earlier session.
/// </para>
/// </summary>
/// <param name="e">Provides data for navigation methods and event
/// handlers that cannot cancel the navigation request.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
Navigator.Refresh();
this.navigationHelper.OnNavigatedTo(e);
protected override void OnNavigatedFrom(NavigationEventArgs e)
this.navigationHelper.OnNavigatedFrom(e);
#endregion
public ViewModelBase ViewModel
get { return this.DataContext as ViewModelBase; }
private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
if (Navigator.CanGoBack)
Navigator.GoBack();
e.Handled = true;
private void Navigator_OnNavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
if (args.Uri.AbsolutePath.Contains("blank"))
Navigator.Navigate(new Uri(Consts.AppUri));
private void ButtonBack_OnClick(object sender, RoutedEventArgs e)
Navigator.Navigate(new Uri(Consts.AppUri));
There is also logic in ViewModel which doesn't contain any specific logic. -
Launch Services can't find app
I have installed the program Macspice which has the ability to set the text editor helper application via the bundle code. However, when the edit command is used in Macspice, the error message "launch services can't find app textedit" appears. Does the code need to be entered manually somewhere? I have already tried resetting launch services per an article by Dr. Smoke to no avail. I am, of course, a new Mac user and would appreciate any help. Thanks.
Hi, mloggins. Welcome to the Discussions.
I presume you are referring to my "Resetting Launch Services" FAQ.
This sounds like an issue with Macspice, not Launch Services. I suggest you contact the developer.
I presume you're running the Universal Binary of Macspice and that you have TextEdit installed in the Applications folder where it should be. If you moved TextEdit.app, put it back in /Applications.
One thought: If you provided the name of the text editor by typing it, vs. selecting it from an open/save-type dialog, be sure to type TextEdit or TextEdit.app or /Applications/TextEdit.app (full path) and not textedit as UNIX is case-sensitive.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X
Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
I may receive some form of compensation, financial or otherwise, from my recommendation or link. -
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-PeterOfficially 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 -
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 ProfessionalHere'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 -
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. -
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 KomatlapalliBasically 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 -
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? -
Use a C++ WinRT Component with external LIB in a C# Universal App
Hello,
I created two projects : a C++ WinRT Component project and a C# Universal app that references directly the C++ project.
If I call a method from my class in the C++ Windows Runtime Component project from C# it's working fine.
I got the following error in the C# Universal App project when I reference an external LIB in the C++ project : "Additional information: The specified module could not be found. (Exception from HRESULT: 0x8007007E)".
Do I need to reference somehow the LIB (I got a DLL with the LIB too) in the C# project too?
Thanks,
Adrien.Hi Adrien,
What do you mean by "reference an external LIB in the C++ project", the C++ project you mentioned here is a normal C++ project?
As I know we have to check the option support in Windows Store App.
--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. -
Why would I need to use LiveCycle Data Services in a Flex app?
I cannot figure out what additional functionality is provided by using LiveCycle Data Services in my Flex apps. I cannot get a clear understanding of how using LiveCycle Data Services would benefit my applications. Does someone out there use LiveCycle Data Services? If so, what do you do with it in Flex?
Thanks!- data push for publish/subscribe implementations
User has to do nothing to get updated information. You push it to their machine when new data is available, like Yahoo finance updated quotes.
- data paging
You don't want to display one million rows in your datagrid at once. Get a batch of data, if the user scrolls down, get the next batch, etc.
- server side clustering
One server does not get overloaded. High traffic sites have their large number of concurrent connections managed more efficiently.
- JMS services
JMS is a powerful technology for messaging throughout an application, and LCDS makes it much easier.
- RTMP tunneling
Allows the use of the RTMP protocol in LiveCycle Data Services applications. Makes it easier to traverse firewalls and proxies appropriately that currently prevent direct RTMP client connections to the server.
If this post answered your question or helped, please mark it as such. -
Need to revert a universal app to iphone in iTunes connect
The question is can we replace a Universal App with and Iphone app in iTunes connect and what are the steps. In this case the iPhone app is the app the Universal app replaced in the first place.
Our client claims you cannot replace a Universal app with an iPhone app but we cannot tell if that is a message they got from trying to do it in the store or hearsay.
Background:
Our client had another developer (actually a few even before that) deliver an IOS universal app that was upgrade from the iPhone app already in the store. It was built starting witht the code base for that original iPhone app in the store.
Unfortunately the developer had serious bugs in the iPhone version of the universal app that were missed by the client.
More unfortunate is that the client replaced the iPhone app in the store with the Uuniversal app without QA and so with the improperly functioning iPhone part.
They since took the universal app out of the store.
We have the source for the original iPhone version and thought we could simply build that and replace the broken universal app.UPDATE: Ignore this is from 2010 and pre-dates Universal app type.
Although the original poster has not replied back this is a hackish tease for a solution:
Want to downgrade from an Universal app to just an ipad app..
http://stackoverflow.com/questions/3277945/want-to-downgrade-from-an-universal-a pp-to-just-an-ipad-app
First make sure you change that setting both for the project and your target, if it is still unchanged just manually edit project.pbxproj in the xcode project bundle changing all occurences of TARGETED_DEVICE_FAMILY = "1,2" to TARGETED_DEVICE_FAMILY = "1"
also Minimum OS Requirements is determined by the deployment sdk setting (IPHONEOS_DEPLOYMENT_TARGET in the aforementioned file) , not affected by LSMinimumSystemVersion -
Non-Universal Apps won't launch on Intel Macs with Unsanity's App Enhancer
I just got a new Intel MacBook Pro and ran into a problem with lauching non-Universal apps. When I tried to launch them, their icon would bounce once or twice in the dock, and then nothing. After many hours and a call to Apple support without any luck, I started searching tis support forum, and found an old post with something about a problem with Unsanity's products (WindowShade & others). It turns out that their Application Enhancer component was the problem. Unsanity claims it is due to a bug in OS X that Apple hasn't fixed yet. Be that as it may, Unsanity has been very responsible in providing a fix, located in the App Enhancer Preference Pane under System Prefs. Just open the prefs and push on the button labled "Rosetta Troubleshooting". That problem solved.
Unfortunately, App Enhancer still seems to wreak havoc with Palm's HotSync Manager.
Janet
MBP 17" Mac OS X (10.4.8)You will find that Unsanity's "fix" doesn't always work. If you install FruitMenu you will find many PPC apps fail to launch regardless of the fix. In that case open APE and turn FruitMenu off temporarily. Also click on the Excluded Apps tab and drag the PPC app you want to run into the list box.
Finally, if that doesn't help (although it should) then open the Terminal and at the prompt enter the following command line pressing return at the end:
sudo killall translated
You will be asked to authenticate by entering your admin password. It will not be echoed.
Why reward points?(Quoted from Discussions Terms of Use.)
The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.
Maybe you are looking for
-
Passing data between forms in Release 2
I have one large form that I need to split into several forms on different tabs in a page, so they can be displayed and updated independently. I have seen some talk about using wwa_api_module_session to do so in 3.0.9. Does this work in 9.0.2? Does a
-
Just bought Photoshop Elements 13. I have a Macbook Pro that meets all the requirements. I have installed and reinstalled the program but it just keeps crashing. The program will load, when I choose the expert tab and try to open more than one fil
-
I have two pages, one with a few controls and the toher that should ouput a table. When I pass the variable data between pages I am getting a 404 error. When I hard code in the where clause I pull back the correct data. What am I doing wrong. The cod
-
Tab strip push button text change for user-exit screen
Hi experts How can I change the text of Tab strip push button which is maitained by screen user-exit.Such as I maintained the user exit MEREQ001,In the screens of TCODE me51n there have a subscreen named "CUSTOMER DATA",Now I want change the text.
-
HT4623 iPhone needs to be restored from sync. can I disconnect and finish later?
My iPhone needs to be restored from sync. can I disconnect and finish later? Apparently something didn't work and I haven't yet found the answer. Afraid my iPhone has been wiped.