Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VSSDK Howto Fill MRUList into MRUListBox

$
0
0

I have an MruListBox container in a xaml and I want to fill them with the MruList of the latest used projects in VS2019.

The code I use in the XAML is:

<vs:MruListBoxItemsSource="{Binding Path=Items}"AutomationProperties.AutomationId="MruList"FontFamily="Segoe UI"/>

Now how can I get the MruList, which I want to set to the property Items so that the list is shown.

I tried to get the MruList with the command

IVsWebURLMRU weburlmru =this.GetService(typeof(SVsWebURLMRU)) as IVsWebURLMRU;

and also with

IVsWebURLMRU weburlmru =Package.GetGlobalService(typeof(SVsWebURLMRU)) as IVsWebURLMRU;

and then with

weburlmru.GetURLArray(out object list);

but the array is empty.

I also tried to use an example by Microsoft, where a menu with the last used items are shown, but I think this example was used in an older VisualStudio version. I need them for VS 2019.

Regards, Tom



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>