I am wondering how to display a XAML page within a tab control that is part of another XAML page. Or, for that matter, if this is even possible. I want to be able to click a button on page1 and be able to view the page2 from within a tab control that is on page1.
Would this be something to be handled within a Frame control? Or something different? Or is there a better approach to this altogether?
I am programming in Silverlight-4.0, C#-4.0 from within Visual Studio 2010.
You could use the navigation framework, but that isn't really what you're asking. You want to know how to put the contents of one file into a tab, while the contents of another file are in the other tab.
A page in silverlight is simply a user control. You can put a usercontrol into the tab just like you would any other control. In order to use a local usercontrol in another xaml file, you'll need to do the following:
Add this to the root element of the page containing the tabs:
xmlns:local="clr-reference.MyApplicationNamespace"
Then you can add this to add the control into the tab:
<local:usercontrolname name="mycontrol" someproperty="value" />
You can check the Silverlight Navgition Framework You can show "frames" inside your control. It also support deep linking, which is the killer feature here..
This is a very good intro - by Tim Heuer
Related
I need to do a master detail layout page in Xamarin which then will be used in child pages.
Please check the screenshot below:
I need to have a header part with button for notifications and a button for context menu plus a header.
What is the best approach how I can create this layout in Xamarin?
I will assume that you want to use Xamarin.Forms, instead of using Xamarin.Android and Xamarin.iOS separately.
One approach would be to use default MasterDetailPage as described here or even better to try it with Shell as described here.
Then, you would need to create your CustomNavigationPage and write a custom renderer for it.
Second approach would be to do some tricks, again creating your CustomNavigationPage with template(so that the navigation bar is always displayed) and that you change content dynamically.
Also, you would need to hide default navigation bar and attach click events to your menu button to really open up the menu.
Hope you got it clearly.
MasterDetailPage already provides nearly all functionality that you have asked for, so in some way your question isn't quite clear as you already mention MasterDetailPage. The only remaining problem I can see is how to set up a custom header, and that is than with NavigationPage.TitleView.
I've bundle of control save in .vcx file but I need to activate it to display it when i switch to different activepage in pageframe.
Could anyone guide me how to code and which kinds of event should i make on page frame switch, click or whatelse UIENABLEEVENT.
Thanks.
First, you might want to click on Help -> Tour for site etiquette and start voting / checking your answers so people know what worked or not that help you and others with similar issues.
Now, back to you question... If you have a form with a pageframe, make sure you have the "Properties" sheet open, it helps to ensure which object you are actually working with until you get more familiar with the IDE.
Once you click on the pageframe control, if you right-click and then select "Edit", that will bring you to the individual PAGE level of the pageframe. Once the PAGE is the basis of the focus you can put any control on it from either the toolbar, or if your project is open and you expand your .VCX class library, you can grab any control and put in on the page.
If you have multiple pages, once you click on the alternate pages, you will see that the first page (or whatever page) is no longer visible and the new page is available for you.
The actual handling of the pages on the pageframe for clicking / focus is automatically handled for you unless you want to do something extra.
Visual Studio WP 2010.
I'm using scrollviewer for text and images on a page, but in design view in VS I can only view the first part of the page which makes placing text and images difficult. I can take a guess and then run the app in the emulator, scroll down to see how far off I am, then go back in design view and try to set margins, height, etc appropriately. Is there another easier way to do this?
Just a guess: During creation set the ScrollViewer's VerticalOffset.
I found the answer elsewhere. In the top section of your xaml find d:DesignHeight="696" and change the 696 to something like 2000, etc. This will extent the viewing area. Anytime you reload or run the application it will default back, but it's easy to reset.
how can i find the specific button on design mode where i have several buttons ie: hundered of buttons so that they all like spaghetti and one button may be under another button or a groupbox (i might be playing with the visibilities ) and i want to see my button number 83 on the design. how can i see him? where is he hiding? :) i use visual studio as an IDE. thanks.
MessageBox.Show(" where is the specific button? i know that he is somewhere on the form but cant distinguish it on the design since its somewhere under something i cant find it");
Use Document Outline (View - Other Windows - Document Outline)
Just pick the button from the tree and voila.
PS: this works for other types of designers (WPF/Silverlight, ASP.NET)
You can access it via the Properties Window. There is a drop-down that will list all of the items in your form in design mode.
Then use the drop-down. The drop-down will list all of the items on your form so you will scroll through the list to find Button number 83.
Images were pulled from MS Visual Studio: The properties Window which contains an explanation of the window.
Have you tried using the properties window?
I'm using Sharepoint 2010 (as a beginner). I need to find the best way to allow a user to create a new page inside a sharepoint site. The page must have an image field which the user can crop when he creates the page.
I have 3 problems concerning this:
How can I allow my user to create the page in a single step. The default behaviour is: create page with Title, Url and Content type and the edit the page layout or the page properties. Is there a way to do this in a single step?
What view should my user use when editing the page? The "Edit page" view, or the "Edit properties"? I don't like the "Edit page" view because... it doesn't look like the right way to do it... BUT, I like the fact that I can use my custom BaseFieldControls in this view. The "Edit properties" look great, BUT, customizing it looks like a nightmare. And, of course, I cannot ask the user to use both views...
One of my requests is to allow the user to upload a sharepoint image for the page, and then to crop tree different sizes using the base image. The big question is: where should I allow my user to do this?
In a webpart inside the "Edit properties" window? - Not very easy to integrate it. It seems almost impossible.
In a custom BaseFieldControl in the "Edit page"? Would be great, but, I don't want the user to use this view.
Create my own Asses Picker aspx page for the "Upload image" field, and replace the default one - _layouts/AssetImagePicker.aspx? Is this even possible?
I dont have an answer for everything but for number 1, maybe:
Check out SPServices. It is a Jquery project which is designed to help people use Jquery on Sharepoint sites. It is really useful for accessing, editing, and writing data is less lines of code than ever before... Unless you are a genius and have SP figured out which most do not.
To be honest, the only way to do things in "1 step" is with javascript anyway...
Hopefully you have heard of Jquery: