In my Windows Phone app,I want to turn my current page unable in gray and show a textbox in foreground - silverlight

Like the title said,how may i turn the grid(or page) and the components in it into background gray and unable and show a new component in foreground.
It's a common effect in the web page,but i cannot do that with a xaml.
Please answer in detail better with sample code if you do.Thanks in advance.

Here's an example of using a Popup to display a UserControl when a Page is navigated to. The OnNavigatedTo function creates a popup, binds a Click event to the UserControl, and then shows the UserControl over the entire page. If the correct password is entered, ("password" in the example) the control disappears. You'll need to modify it for your own requirements, but it should definitely get you started.
https://skydrive.live.com/redir.aspx?cid=ef08824b672fb5d8&resid=EF08824B672FB5D8!343

You'll want to use the VisualStateManager and create some animation transitions to switch between the old and new components. I won't paste the code here for brevity, but if you check out:
http://visualstudiomagazine.com/articles/2011/07/22/wcmob_visual-states.aspx
You'll see a simple example of switching between two UI components on a single page within a Windows Phone 7 PhoneApplicationPage. In your scenario, you'd use this paradigm to create 2 animation storyboards, one for showing an overlay control and one for settings the 'disabled' property on the main grid.

Related

WPF: Adorner + Popup = Modal Popup

So here's the idea of it...
I have an application that I am designing with WPF. It has a Main Window with a frame inside to navigate through pages. The navigation aspect is done through the window (kind of like a template with a footer that has the navigation controls) and the pages have the individual content. On certain pages I would like to have an ADD (+) button that causes a popup that has a form inside to add personal information to the database (First name, last name, address, .etc) While this popup is open I would not like them to be able to access any other part of the application until they press OK or CANCEL. I'd like to be able to call this popup from the individual pages unless there is another workaround.
Any ideas or assistance would be appreciated!
some wpf popups Here and Here.

Implement SlideGroup as part of Form [DevExpress]

I would like the Windows UI style SlideGroup on my WinForms page but dont want to go through the nonsense of having a document manager taking up my whole form. I simply want a few buttons at the top of my form and then a slideGroup at the bottom. On button press switch the slideview to the corresponding document.
As far as I know the SlideGroup is available only as a content container within WindowsUIView, which is a part of the DocumentManager component. Content containers can be easyly added in the related section of the WindowsUIView Designer. The SlideGroup component is not a Control itself, thus it is impossible to use SlideGroup without a DocumentManager.
Please also review the following: How to create SlideGroup container.
If you want to use the Windows UI buttons itself you can use the WindowsUIButtonsPanel control.

Customizing Navigation Buttons' Bar in MS Access Form

I am creating a form in MS Access. My form appears to the user in form of a modal pop-up box. At the bottom of the form we get Navigation Buttons, New Entry (which I have disabled), Filter and Search Options.
I want to customize this Navigation Button Bar. For example, I do not want 'Record' word to appear at the left most position in this bar.
I have been searching ways to do the same. I am not sure if the same can be achieved, but still hopeful.
Thanks in anticipation.
Jay
You can disable Navigation Buttons in form properties, which means the bar does not appear and in Access 2007 and 2010, you can set the Navigation Caption, which means you can have something instead of "Record", but you cannot customize the bar itself.
If you must have custom navigation, disable the bar and add your own navigation options.
You can change the Record into something else, but not customize the other bits of the navigation bar as far as I know.
Will show as:
If you want to go further than that, you may be able to intercept windows messages and change the wording on the fly, but that would complex and certainly a lot of work for not much.
On the other hand you could simply not show the navigation bar and create your own navigation using buttons and a bit of VBA instead.

Google like SearchBox in Silverlight

I've created a Google like SearchBox control in Silverlight. That means, as I type in the box, a DropDownListBox appears just below the SearchBox, showing all the items that match with the text I've typed in searchbox so far (i.e AutoComplete feature), exactly like this:
Now, I want to add a functionality to it : I want to make the DropDownListBox to disappear, as soon as user clicks outside it, or anywhere on the screen. I cannot handle MouseLeftButtonDown (or any such event) in other controls, to accomplish this, because users can click anywhere, including non-silverlight region. Can anybody suggest me what should I do to achieve this?
So my question basically is:
How to know if user has just clicked and the click event occurred outside a particular control?
Please note that AutoCompleteBox doesn't serve my purpose. So I cannot use it.
I have a feeling that working with LostFocus event can solve your problem.
I guess this question is a bit old, but i just stumble upon trying to do the same and finding a solution. This is what i did
Created a Border with All Margins -500, this will cover the full screen essentially.
On Click Behaviour of this Border, the dropdown section of SearchBox
is collapsed.
Adjust z-Index of Border just below the SearchBox and DropDown
section, so clicking on SearchBox or DropDown wouldn't close it.
Set Border Visibility Collapsed, and make it visible when DropDown is Visible.
I hope it helps someone who is looking for the similar problem.

WPF menu like control showing when clicking a control ;) How?

I have an application that connects to a server. In the status bar I show the connection status, and on a click I want to open a "menu like" subcontrol over the status showing control where more detailed connection information is shown (like: user name, server name, ping delay, disconnect / reconnect button).
This should basically look like an inverse menu - and when the user clicks outside of that area, the outside click should be suppressed (not triggering anything), but the detail info box should disappear.
I am a little at a loss here - first time I am to do something like that in WPF.
Which control would be advisable as base here? So far I have a custom control for the status bar - but basically it renders as a text box. Note tha the popup is not a menu - it should show a detailed view of the control, so I do not think I can reuse any existing control.
any Hints how to accomplish this?
Thanks in advance.
Two controls to look into:
1. Expander (this could work, but be carefull, it can shift your other controls
2. Button with template. Make a controltemplate for a button that includes a Popup item. This item can then be bound to a set of triggers/events in the button or in the wider form. I hope this helps :)

Resources