Which nuget package contains the TreeView class for UWP promised in https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.treeview ?
I thought it was coming in W10 Fall Creators Update but I have that and I can't find TreeView, TreeViewNode, etc.
I am referencing Microsoft.NETCore.UniversalWindowsPlatform v6.0.1 and NETStandard.Library v2.0.1 in my UWP project.
Update 01/05/2018
TreeView control is available in April 2018 Update
Old Post
TreeView control is not available in Fall Creators Update
The TreeView control has been removed, but will be back soon in the next release of Windows and the Preview SDK.
Source: Windows 10 SDK Preview Build 16257 and Mobile Emulator Build 15235 Released
Update:
TreeView control is now available in Windows 10 SDK Preview Build 17061 or above
Check the API Updates and Additions section in Windows 10 SDK Preview Build 17061 now available blog
public class TreeView : Control
public sealed class TreeViewCollapsedEventArgs
public sealed class TreeViewExpandingEventArgs
public class TreeViewItem : ListViewItem
public sealed class TreeViewItemInvokedEventArgs
public class TreeViewItemTemplateSettings : DependencyObject
public class TreeViewList : ListView
public class TreeViewNode : DependencyObject
public enum TreeViewSelectionMode
public class TreeViewItemAutomationPeer : ListViewItemAutomationPeer, IExpandCollapseProvider
public class TreeViewListAutomationPeer : SelectorAutomationPeer
Related
I have a Visual Studio Package where items are dynamically added to the menu bar. However, only the fixed entries are shown because the extension is not loaded correctly.
The package is only loaded when you click on a fixed entry. But it should be loaded at the start of the studio.
I tried everything with ProvideAutoLoad, the dynamic items are not shown. I don't know why. What is the problem ?
I hope someone can help me here
thx
[ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExists_string, PackageAutoLoadFlags.BackgroundLoad)]
should be enough to automatically load a package on Visual Studio startup.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using System.Windows.Forms;
namespace VSIXOpenSCE
{
[PackageRegistration(UseManagedResourcesOnly = true)]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")]
[ProvideMenuResource("Menus.ctmenu", 1)]
[Guid(MenuControlPackage.PackageGuidString)]
[ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExists_string, PackageAutoLoadFlags.BackgroundLoad)]
public sealed class MenuControlPackage : Package
{
public const string PackageGuidString = "f5c6cb4a-bb86-48e4-92e6-f0ee6de2de3a";
public MenuControlPackage()
{
// Inside this method you can place any initialization code that does not require
// any Visual Studio service because at this point the package object is created but
// not sited yet inside Visual Studio environment. The place to do all the other
// initialization is the Initialize method.
}
#region Package Members
/// <summary>
/// Initialization of the package; this method is called right after the package is sited, so this is the place
/// where you can put all the initialization code that rely on services provided by VisualStudio.
/// </summary>
protected override void Initialize()
{
base.Initialize();
MenuControl.Initialize(this);
}
#endregion
}
}
I have been struggling with the new ASP.NET Identity trying to extend it to do my next web application, I have opend a new empty web project in Visual Studio 2013 Profissional, and added MVC 5 assembly as usual.
I have write the following in VB.NET (Code-First)
Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema
Imports Microsoft.AspNet.Identity.EntityFramework
Imports System.Data.Entity
Partial Public Class MyAppContext
Inherits IdentityDbContext(Of User)
Public Sub New()
MyBase.New("ConnStr")
End Sub
Public Overridable Property Items As DbSet(Of Item)
End Class
Partial Public Class User
Inherits IdentityUser
<Required>
Public Property Name As String
Public Property Items As ICollection(Of Item) = New HashSet(Of Item)
End Class
Partial Public Class Item
<Key> <DatabaseGenerated(DatabaseGeneratedOption.Identity)>
Public Property ID As Integer
<Required>
Public Property Name As String
<Required>
Public Property UserID As String
<ForeignKey("UserID")>
Public Overridable Property User As User
End Class
I think the code is very straight-forward, i am trying to create "User" class that inherit from "IdentityUser" and adding a one-to-many relationship with another class called "Item", and of course I have to extend the generic class "IdentityDbContext(Of User)".
Then I want to add a controller with the views for my "User" and "Item" classes using the scaffolding option "MVC 5 Controller with views, using Entity Framework".
Error There was an error running the selected code generator: 'Value cannot be null. Parameter name: codeType'
I want you to know that this is a clean setup for visual studio 2013, a clean project, and also the scaffolding works very good for the current model without the Identity inheritance thing.
Please let me know if you have successfully reproduce the problem on your machines.
I wanted to let you know that after i have converted the exact code to C# it worked!...
It seems that this is a vb.net related problem (something with the built-in t4 templetes).
So this is a bug, and i will assume this is the answer.
If somebody found a workaround for this, please post and I will accept it as the answer.
Is it possible to get DLL's names and version information from a appmanifest.xml which resides in a VS2010 project corresponding to a PRISM Module ?
My Silverlight 4 application loads on demand all modules listed in the modules catalog. I guess this means that it has downloaded all the modules corresponding XAP files, appmanifest.xml files – to load the necessary resources (DLL’s, etc)
So, at this point, how can I access DLL's names and if possible DLL's version number of every module from within my "main" Silverlight project ??
Thanks for your feedback!
You can do this in the ModuleInit.cs of each PRISM module. Somewhat like:
public class ModuleInit : IModule
{
private readonly IUnityContainer _container;
private readonly IRegionManager _regionManager;
public ModuleInit(IUnityContainer container, IRegionManager regionManager)
{
_container = container;
_regionManager = regionManager;
// Add this assembly details to a global collection
Global.ClientAssemblies.Add(GeneralHelper.GetAssemblyInfo(System.Reflection.Assembly.GetExecutingAssembly()));
}...
Helper function:
public static string GetAssemblyInfo(Assembly assembly)
{
return assembly.ToString();
}
I am developing a Windows Phone 7 app and am using the MVVM pattern. I have a need to pass a parameter to the contructor of the ViewModel for a page. All my datacontexts and binding are done in XAML. Through my research I've seen that I need to do so using a dependency injector such as NInject.
Here's a little detail on whats going on:
I have a page with a ListPicker that lists various tasks. Each task has a unique TaskID. When an item is selected I need to open another page that will show the selected Tasks detail. My ViewModel and binding is all done and works if I use a static TaskID in the ViewModel but of course I need to use a variable.
I've setup NInject in the project and the various classes needed such as ViewModelLocator and my NInjectModule as shown here:
public class LighthouseNInjectModule : NinjectModule
{
public override void Load()
{
this.Bind<TaskViewModel>().ToSelf().WithConstructorArgument("TaskID", 2690);
}
}
Note that I have hardcoded a TaskID here and using this code this value properly gets injected into my constructor. Of course, this is hardcoded and I need to get the TaskID for the selected ListPicker item. I know how to get the selected ID from the ListPicker but how do I make NInject aware of it so when my class constructor is run it will have the correct value?
Here is the basic definition of my ViewModel class showing use of the Injector attribute.
public class TaskViewModel : INotifyPropertyChanged
{
[Inject]
public TaskViewModel(int TaskID)
{
//run function to get data using TaskID
}
}
WithConstructorArgument has another oveload that accepts a lazy evaluated Func<Context, object>.
I have a main Silverlight Shell project, which calls several Silverlight Module projects.
I need to pass parameters to my module projects through constructors.
Can anybody help me to solve this?
"Ask and yea shall receive" is the IOC motto :)
Prism uses injection via the UnityContainer. When a module is loaded it will resolve any registered interfaces specified in the constructor of the module.
Just specify an interface to an object that you have previously registered as a singleton and it will be passed to with any module. Place all your settings/parameters in that singleton.
If you need more information, just ask.
Register an object with the container.
class MyBootStrapper : UnityBootstrapper
{
protected override void ConfigureContainer()
{
base.ConfigureContainer();
this.Container.RegisterInstance(typeof(IMyInterface), new MyInterfaceImpl());
}
}
Now, the module constructor happily receives that object.
class ContentModule : IModule
{
private readonly IMyInterface _myInterfaceImpl;
public ContentModule(IMyInterface myInterfaceImpl)
{
_myInterfaceImpl = myInterfaceImpl;
}
#region IModule Members
//
#endregion
}
Courtesy: TrueBlueAussie