SelectionMode property is not found in ListPicker.We included reference to Microsoft.Phone.Controls.Toolkit in our project and also included
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
in the xaml page.But we are not able to give SelectionMode=Multiple
Thank you
Make sure you have the latest version, previous versions didn't have a SelectionMode property
Related
Could you tell me what I am doing wrong? I've downloaded and installed extension MVVMCross available on https://www.mvvmcross.com/. I've installed it using Tools/Extensions and Updates in VisualStudio 2017 environment. When I created new MVVMCross Multi-Page Xamarin Forms Application then for two existing pages, all works perfectly.
I next needed to add ContentPage, but I have a problem since my new Xamarin Forms ContentPage is not correct: file *.cs is visible in my solution but *.xaml is hidden.
The version of MVVMCross and MVVMCross.binding (core, forms, platform) are 5.2.1 and Xamarin.Forms is 2.3.4.270 and Xamarin.Essentials is 1.5.2.
Could anyone explain to me why I can't add a new page? Thank you in advance.
All steps attached as screens...
Yes Lucas Zhang - MSFT, you may be right. It looks like a problem with version of Xamarin.Forms or MVVMCross. I'm not sure what more? I had version 15.7.xx of VS2017. After creating new MVVMCross Multi-Page Xamarin.Forms application I have versions: MVVMCross (all libraries) 5.2.1, Xamarin.Forms 2.3.4.270. Then I've not got any errors but I couldn't add new ContentPage.
Below all my steps which I made myself to resolve this problem:
I've installed VS2019 too, but it has not resolved the problem.
I've updated Xamarin.Forms to the latest stable version 4.6.0.726 but I had on both version of VS the same problem after updating:
Error NETSDK1022 Duplicate 'EmbeddedResource' items were included. The .NET SDK includes 'EmbeddedResource' items from your project directory by default.
I've read the article on Stack Overflow about this but I couldn't fix the problem.
But then it was possible to add correct new ContentPage.
In my opinion, the best solution is to update Xamarin.Forms and fix the problem with Duplicate Resource. If you know what to do for this, tell me please.
Finally, I've back to my old version of VS2017 and I've updated it to the latest version 15.9.22. Now, I can create ContentPage and application works but from my point of view doesn't work perfectly. I can add picture to this comment but in my Solution after adding new Page I have two separate files in Page folder: *xaml, *.cs. They don't have connection like other pages (like on the screen below). But it works.
I think if I update Xamarin.Forms and I fix Duplicate Resource problem, It will work perfectly.
I had a lot of problem after updating Xamarin.Forms therefore I've returned and I've installed update of VS2017.
It would be perfect to describe how we can fix similar problems :-)
An exception is thrown when setting "ItemContainerStyle" to "StaticResource TreeViewItemStyle" which is defined in generic.xaml. The message indicates the style is using "Windows.UI.Xaml.Controls.TreeViewItem" rather than "Microsoft.UI.Xaml.Controls.TreeViewItem".
I removed ItemContainerStyle assignment to confirm that it is the line causing the exception.
<ControlTemplate TargetType="muxcontrols:TreeView">
<muxcontrols:TreeViewList x:Name="ListControl"
ItemTemplate="{StaticResource TreeViewItemDataTemplate}"
ItemContainerStyle="{StaticResource TreeViewItemStyle}">
The problem seems obvious, but a proper solution evades me. To leverage the style, do I start prepending "muxcontrols:" in the generic.xaml file? This seems like a bad idea. Do I need to recreate the style and behaviors separately?
I tried (min build 17763 and target build 17134) to eliminate version problems, but it seems I need 17763 for both. Even though, I am not setting ItemsSource. I'm trying the technique used in the docs: "learn.microsoft.com/en-us/windows/uwp/design/…" for the Music Library TreeView sample. My real project's min version is 16299.
So, the issue was clear. The TreeView control is introduced from build 17134. If you're using the platform APIs, you need to make sure that your project's target version is 17134 or higher. Since you said you want to set ItemsSource. ItemsSource and its related APIs require Windows 10, version 1809 (SDK 17763) or later, so you need to make your project's target version is 17763.
Then, you could directly use the TreeView control like the following:
<TreeView></TreeView>
If you're using Windows UI Library APIs, you need to follow the Getting started with the Windows UI Library
document to download and install the Windows UI Library. Please note:
Important: To use WinUI 2.1, your project’s Min version must be 14393 or higher and the Target version must be 17763 or higher.
Then, if you want to use the TreeView control in WinUI library, in your XAML page, add a reference at the top of your page
xmlns:controls="using:Microsoft.UI.Xaml.Controls"
On the XAML page, you could directly input the following:
<controls:TreeView></controls:TreeView>
Hi I got following error
I added reference from phone.controls.assembly.toolkit but it doesnt work
The tag 'LongListSelector' does not exist in XML namespac 'clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit'.
When you add a new reference to your library, or in this case, your toolkit, you must also add a reference in your XAML code.
For eg:
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
So in your XAML page, go right to the top, you will see a couple lines like the one above.
type xmlns:toolkit="LINK TO YOUR TOOLKIT"
When you type xmlns, intellisense will automatically prompt you to a list of available references. You can scroll down to find it.
Make sure you add a unique name like 'toolkit' or 'tool' after xmlns. So to access the LongListSelector, all you have to do is type
<toolkit:LongListSelector />
i wanted to implement charts in my silverlight app.
i have installed SL4 in my VS.
The problem is i m not getting the chartingToolkit:Chart control in my xaml page.
Gives error saying control not found .
Did i forget to add any references?
or did my installation went wrong?
do i have to download any other plugin?
Thanks
Sajad
chartings controls are from the Silverlight toolkit, you need to install it first.;)
http://silverlight.codeplex.com/
i have added the assemblies as mentioned by Xin.
System.Windows.Controls.DataVisualization.Toolkit,
System.Windows.Controls.Toolkit
System.Windows.Controls.Toolkit.Internals
But my problem was actually solved by adding this to namespace area.
xmlns:toolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
and then i could use toolkit:Chart
:)
I'm trying to add a WrapPanel to my app, up to now I found that WrapPanel is only available through SilverLight Toolkit here http://silverlight.codeplex.com/releases
I've downloaded it and installed it, but now what do I do?
I assumed that a reference needed to be added but I can't think of what to add.
Add a reference to Microsoft.Phone.Controls.Toolkit.dll. The WrapPanel control is in the Microsoft.Phone.Controls namespace.
In your page/user control, add the following XML namespace declaration:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
Then you can add instances of <toolkit:WrapPanel /> in your XAML.