There are instances when the user may not press the button that closes the opened view or tab after navigating and working on it; lets say like an 'Edit' page for instance, etc. How do you ensure that the same page does not open or display twice within the
tab when the user presses the button that navigates to that view again? I would rather it just focuses the "Selected" property of the tab to it. I've hit a wall with this.
Please assist with me a code example of this. I couldn't find a solution to this on any of the threads on here and couldn't find an implementation of this in the source code.
A much less technical problem that I'm having is that I also just can't seem figure out how to set an icon of my choosing for the tiles when I specify a Menu in the StartViewModel. How do I go about setting png. in place of the of the default horizontal dots
you get on the tiles by specifying a ViewAction?
I'm almost at the completion of this project and if I can just sort out these two things I'll be good. I want to thank you for this Framework. Its a real joy to work with and a blessing to my life. I've been programming for only a year now, and sometimes the
easiest of implementations can be a real test for someone with as little experience as I do unfortunately.
Dec 4, 2016 at 5:45 AM
sorry... somehow I missed this post.
You can always look at Shell.Current.Xxx for various things, such as all the "normal views" that are currently open. This way, you can figure out that your view is already open and react accordingly.
For the tile icons: You can set a brush resource on a view action (there is a convenient constructor parameter for this). A brush resource can be an icon or drawing for instance. We actually support out-of-the-box icons (see also:
) which can be set through their resource name. Note: We now also have a StandardIcon property on view-actions that make this easier. If you want to
use your own icons, you can add your own brush resources to the project, give them a name (x:Key) and then use that key as the "brush resource key" in the actions. Again, these brushes can be icons or drawings. They can also be bitmap images (ImageBrush).
They could even be things like videos. So anything WPF supports as brushes can be used.