I have an application for the windows store that I need to make emulate the tabs like Internet Explorer. The problem is that I have one control and it won't load into both the AppBar and the main view.
Is there a way to setup the CacheMode in the constructor of the control and then pull a bitmap from the BitmapCache and load that in the tab view in the AppBar? Or am I going about this the wrong way. I don't want to use two different controls due to it being a hack I want this to work with one control.
I am writing this application in C# and XAML.
Any help is appreciated.
A control can only have one parent in all popular XAML technologies, so you can't put it in two places.
You can use RenderTargetBitmap
to take a screenshot of a control and put it elsewhere in your layout, but there are plenty of problems with that
Your best bet might really be to have two copies of the same control. You can create a UserControl
to encapsulate any functionality and properties and reuse that control in multiple places easily. If you reference an image by URI - the platform should automatically share the resources for the image used in multiple controls.