Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 15491

Can't Select MRU Recent Files Item Twice

$
0
0

I have an application which uses a RibbonApplicationMenu which I've created using the example at WPF ObservableCollection not updating in ribbon view. This lists the most recently opened files. However it's not possible to select the same item twice. When an item is selected for the first time the selection is highlighted and the file opens using the XAML SelectionChanged event. However if selected again the selection is ignored. The only way around this seems to be to select another item then select the original one.

I suspect I need to set the selected item to null after opening but when I've tried adding a 'SelectedItem' event in the xaml and assigning null to it it doesn't work.

XAML

SelectedValue="{Binding SelectedValue, Mode=TwoWay}"

C#

public object SelectedValue{    get => selectedValue;    set => SetProperty(ref selectedValue, null);}

How can the original selected item be reselected to reopen the file?


Viewing all articles
Browse latest Browse all 15491

Trending Articles



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