Winforms c# outlook like Interface - c#-4.0

I have already asked the same question but in regards with MDI Application design. Now just for R&D purpose so that we can go with 2 solutions to our user. Can somebody plz help me out...
We are developing an OutLook Style Application using C# Winforms. In that application we are using Microsoft Table Control. Which is what we need to show our UI. In the left hand pane we have menu and in the right hand we are displaying our UserControl. Like CustomerManager. This UserControl is doing Adding, Updating, Deleting ect etc but we want to put the common action buttons, Like Add,Delete,Save on the top toolbar.
So far so good, Now what we need to acheve is regardless of UserControl. What ever UserControl is loaded in the MainForm's TableControl. When the save button is clicked it should process the data on that UserControl. Obviously we will write the logic of the Save Action on each UserControl.
Please help...
Regards
Shanx

I may advice you the Krypton Toolkit. You will write an Outlook style app in seconds.

For all who ended up here like me in search of a free toolkit: As Vulkanino suggested to use Krypton, I loooked it up.
This is now open source Freeware and can be found unter: Krypton Toolkit

Create a Base user control that contains your Add, Delete, Save methods and events. Then create every other functional control that inherits from the Base control.
When you action the main toolbar buttons, you can safely cast each user control in your given container, to the Base user control.
Some MSDN links you might want to read up on:
http://msdn.microsoft.com/en-us/library/44a9ty12(VS.80).aspx
http://msdn.microsoft.com/en-us/library/ms173149(VS.80).aspx

Related

Who is calling VisualStateManager.GoToState behind the scenes?

I am a newbie to xaml and windows app dev so sorry if this question might seem silly.
I created a textbox and in the designer I right clicked it and selected edit template=>edit a copy and put it into my custom dictionary.
In the control template for this textbox I saw visual states like disabled,focused and so on. And I modified them and run the mobile app and observed that my changes work like changing border color when textbox is focused.
But in order for this to work somebody has to call
VisualStateManager.GoToState("Focused")
when the textbox is focused so who is calling this because I don't see any visual transitions in the control template so how is this happening?
The code in the control itself is calling VisualStateManager.GoToState(...) .
When you start implementing your own custom controls, you might subscribe to events you have available and transition states based on your own logic. Here is an example of a custom control with its own two custom states.
https://github.com/xyzzer/WinRTXamlToolkit/blob/master/WinRTXamlToolkit/Controls/WatermarkTextBox/WatermarkTextBox.cs
XAML is a compiled language, and if you've looked extra close, what happens under the hood, is that the class behind your xaml has the same namespace as your xaml code.
This means (for no practical purpose) that compiling your program turns all of that XAML into C# code before then going over to MSIL and eventually execute as a binary program.
Much of the state changes that happen are event based, and TextBox, like all other user controls, will transmit a message and listen to messages. The Page that contains the TextBox will probably be the one that transmits a state change whenever one of it's children gets focus, and as a good control, the TextBox listens for this event and reacts to it.

Form into a form with Tizen

I started using Tizen SDK to develop a native app. And I have to make a form into a form. Actually, it works, but I've some bugs with it. I mean, the footer bar is bugged, when I click on an item from the footer. The app crash immediatly...
Do you know how to resolve it ?
Thanks
I don't think it a good choice to make a Form into a Form. If you want reuse UI form, it's better to use Panel instead.
Here is description of Panel from dev guide.
Tizen::Ui::Controls::Panel class is a general rectangular container that you can use to group UI controls, or even other panels. Panels can be used to create a custom background for a defined area, or for organizing and aligning UI controls. However, by default, the look-and-feel of a panel does not differ from its surrounding Tizen::Ui::Controls::Form control.

XPages templating dialog boxes

I am currently on a project redesigning an existing traditional domino web application to XPages. This application contains a web form with quite a lot of helper dialog boxes. Also notifications and validation and confirmation is done through dialogboxes.
I know I can create a custom control for each dialog box and add it to the Xpage and call the show. I even managed to load it dynamically using a dynamic content control with a facet for each dialog. Since the dialog cc contains a show() in the onClientLoad. It is easy to open a dialog by switching the content of the dynamic content control.
Still, adding all these custom controls to my XPages feels inefficient and really clutters the design tab. What's your take?
I would prefer setting the content of the dialog dynamically (Like in traditional domino you would define a form for each dialog). Is that possible?
If not is it possible to load a custom control dynamically (Like using a computed subform)?
Also for confirmation boxes I need the OK button to execute different code for each confirm. What would be the best way to implement that? Add custom parameter "functionOnOk" to the "dlgConfirm" custom control and evaluate that in the submit button?
PS: I am still using panels with dojoType=dijit.DialogBox, but will change those to extlib dialog boxes. For the confirm and messageboxes I am now using client side dijit.Dialogs with mark-up in code, but I would like the markup in XPages as well.
I know there are issues with panels with dijit.Dialog, because Dojo moves the dialog in the DOM, which prevents any SSJS in the dialog running. I don't know if that's also an issue with dijit.DialogBox, but I suspect it could be. Jeremy Hodge did some code to workaround that.
However, I would strongly recommend using the Extension Library control. Client-side dijit.Dialogs are likely to be much more difficult to code and will not allow any SSJS interaction. I'm not aware of any Dojo properties not available in the Extension Library control, and the Extension Library control also allows you to open or close the dialog both in CSJS or SSJS. It also allows you to specify an area to refresh on close.
In terms of the properties, preload is there purely to speed up showing. Are you using the refreshOnShow property? This ensures the URL or content is refreshed each time the dialog is shown. The Extension Library chapter on dialogs has a table covering all the properties. You can set the URL to point to another XPage or another web page. This may allow you to use the Dynamic Content control to pass parameters to switch the content that should appear.
In terms of the code behind the OK button, if you use the Extension Library dialog, you have all the functionality you would have outside the dialog.

Design-time support on composite control

I'm creating a specific DataGridView control that includes two scrollbars so that I can control their size and visibility. So, I have created a User control that contains the DataGridView and the two scrollbars inside a 2x2 TableLayoutPanel.
The issue I'm facing is that when I add my control to a Windows Form, I can't set my DataGridView's DataSource or define the column styles from the design view, because the link that I use for that when I use a common DataGridView (that little white arrow appearing on the top right side of the DataGridView) is not appearing.
While doing some testing, I saw that if I inherit my control from DataGridView, that link appears. But if I do that, I guess that I can only extend the functionality for the DataGridView, but I need my control to be a composite control.
So, that's my question: how can I get those design-time capabilities on my custom control? I am specially interested on the columns layout and the datasource.
Best regards.
If you are doing a usercontrol (a control that has an .ascx codebehind file) there seems to be no way to control this:
How to hide the inner controls of a UserControl in the Designer?
If you are doing a WebControl (a class that inehrits from WebControl with no .ascx file) you may create your own designer and maybe somehow output the designers of both conrols. Have a look at: http://msdn.microsoft.com/en-us/library/12yydcke.aspx it explains how to create a webcontrol and its desgner.
Some things with usercontrols/webcontrols seem to be easy but are hard to implement...
Hope this helps!

SharePoint 2007 - add additional menu to Global Navigation in a Master Page

In the source code for a master page, there is a section that has the following ASP.NET item: . This contains the "Welcome (User Name)" and Site Actions menus.
How do I create an additional menu that is similar to the look and feel of the Welcome menu? I've tried to create Front End HTML that behaves similar to the out of the box SharePoint menus, but it isn't quite right. I would prefer to utilize an ASP.NET or SharePoint control that acts similar to the SharePoint menu if that is possible.
For example, is <SharePoint:AspMenu> the appropriate control to use?
Thanks,
Robert
i am sure you will get better answer than this but just wanted to point what i have done to do this
i have added javascript library (JQuery) (for some other reason ) and when time come to do this thing i just added a JQuery code that creates another item in the navigation list with appropriate style and css class with the needed link and caption.
You could try another instance of the PersonalActions control with a custom GroupId. But when the control is rendered, it might also say "Welcome, [User]" just like the original.

Resources