How to use *InteractionRequestTrigger* in windows phone?
I can't find this class in assembly Microsoft.Practices.Prism.Interactivity or assembly Microsoft.Practices.Prism. Please, help me to find example code.
Download the Tailspin.Phoneclient project. I think you'll find the dlls in the project. Add references to your project. See this
I found a solution at the codeplex:
<i:Interaction.Triggers>
<i:EventTrigger SourceObject="{Binding SubmitErrorInteractionRequest}" EventName="Raised">
<prismInteractionRequest:MessageBoxAction />
</i:EventTrigger>
</i:Interaction.Triggers>
Related
Mvvmcross version 4.4.0
xamarin forms need Xamanarin.android.support.v4/v7.x version 23.0.0
Download Cachè plugin need Xamarin.android.support.compat version 24.2.1
My app is using xamarin forms so i cant remove it, but i also need to use MvxListView to show an image from url with local:MvxBind="ImageUrl myimage"
so i need download cache plugin, but i cant install it.
Is there any other IMvxImageHelper to use instead of MvvmCross-DownloadCache plugin ? or any other solution ?
*IMPORTANT NOTE-> No code in the Android View.
We use the Xamarin.Forms Plugin FFImageLoading - Fast & Furious Image Loading. It works like a charm and the image loading is much faster than without this plugin. So just take a look at it.
You can find detailed documentation on this github wiki.
Here's a short Xaml example how to use it:
<ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center"
WidthRequest="300" HeightRequest="300"
DownsampleToViewSize="true"
Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg">
</ffimageloading:CachedImage>
I want to create a class library for my Windows 8.1 project, which includes all the views for my app. So I've created the project, but Visual Studio told me that it is not possible to access the StaticResources.
<StackPanel>
<TextBlock
Text="123"
Style="{StaticResource HeaderTextBlockStyle}" />
<TextBlock"
Text="456"
Style="{StaticResource HeaderTextBlockStyle}" />
</StackPanel>
For example 'HeaderTextBlockStyle' was marked in blue and it told me that the resource 'HeaderTextBlockStyle' could not be found. So I can't see my page in the designer, because of the issue.
I can run my app without problems, but how can I get access to the StaticResources?
In Windows 8.1 some things have changed, including the inclusion of the StandarStyles.xaml (it's no longer included explicitly). This guide is very helpful to make the transition: http://blogs.windows.com/windows/b/appbuilder/archive/2013/07/24/windows-8-to-windows-8-1-preview-starting-with-the-xaml-templates.aspx
For your specific problem I recommend you to try:
Style="{ThemeResource HeaderTextBlockStyle}"
i just start developping windows phone apps through using silverlight & windows phone SDK 7.1 frameworks and while i am open a new project for developping an App[lication] bar i noticed that i need a reference [Microsoft.Phone.Shell] well .. i try to add it .. after a multiple of effort of searching i see that i didn't have the .Dll file → [Microsoft.Phone.Shell.dll] in the directory of my installed .Dll files .. so Plz my friends i need an answer or a hint to complete that app ....
What you need to do to be able to use Application Bar are:
Add reference to Microsoft.Phone.dll
Add following two namespaces
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
Then you can use the application bar :
<phone:PhoneApplicationPage
...
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
...
>
...
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True">
<shell:ApplicationBarIconButton IconUri="/Images/button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/button2.png" Text="Button 2"/>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
i have a problem with the dotfuscor.
I'm using a app with localization and i bind the data like:
Text="{Binding Path=Localizedresources.Foo, Source={StaticResource LocalizedStrings}}"
or
Header="{Binding Localizedresources.Today, Mode=OneWay}" DataContext="{StaticResource LocalizedStrings}"
the problem is, that dotfuscator dont likes this and i get the message e.g.:
XamlAnalysis flagged something in Resource Main.g.resources\mainpage.xaml at (111, 55) for the following reasons: Binding expression {Binding Localizedresources.Today, Mode=OneWay} :Could not resolve, may have to manually exclude.
but i dont know how to fix it or even how to exclude this because i dont know in which step the error is like "string encryption".
how to solve this?
Having followed Laurent's upgrade guide http://www.galasoft.ch/mvvm/installing/mangobeta/ to get from an existing MVVMLight WP7 project to a WP71 project. I have changed the references and namespaces corectly. But the EventTrigger is not recognised in the XAML
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<cmd:EventToCommand
Command="{Binding Mode=OneWay, Path=LoadedCommand}"
PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
I get an error on the EventTrigger element.
Has it changed?
I had this exact same problem when I upgrade my application from WP7 to WP7.1(Mango). The problem was the MVVM Light Binaries. You need to upgrade to the WP7.1 Binaries.
Laurent Bugnion ( https://stackoverflow.com/users/12233/lbugnion ) explains how to upgrade the MVVM Light binaries on his website here: http://www.galasoft.ch/mvvm/installing/mangobeta/
These are the essential steps I used to fix my problem:
Download the most recent version from here.
Open and Compile the WP71 project.
Copy the binaries to your MVVM Binary location (in my case C:\Program Files\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries)
Open your project
In the References folder, delete GalaSoft.MvvmLight, GalaSoft.MvvmLight.Extras and System.Windows.Interactivity.
Add the new references from the folder C:\Program Files\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries\WP71.
I had a similar problem after upgrading to Mango. In my case, I had the EventToCommand binding on a MenuItem click, but you seem to have it on some sort of loaded event. You could try using an anonymous delegate in the loaded evcent from the view's code-bhind. Ie:
this.Loaded+=(s,e)=>ViewModel.LoadedCommand.Execute(null);
In my case, I changed from:
<tk:MenuItem Header="Delete Snapshot" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<mvvmLight:EventToCommand Command="{Binding DeleteSnapshotCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem,ElementName=lstSnapshots}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</tk:MenuItem>
to
<tk:MenuItem Header="Delete Snapshot" Command="{Binding DeleteSnapshotCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem,ElementName=lstSnapshots}" />
I have moved on from this issue, by reverting back to pre-mango dev environment.
Not the solution I wanted, but - onwards and forwards.