question

ThomasGoessiStepAheadSchweizAG-9495 avatar image
0 Votes"
ThomasGoessiStepAheadSchweizAG-9495 asked ·

VSSDK Howto Fill MRUList into MRUListBox

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:MruListBox
     ItemsSource="{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




vs-general
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

According to this link, it seems your issue is solved, feel free to let me know if you have any other concern. Have a nice day.


0 Votes 0 ·

0 Answers