Is there any book or links that I can read some tutorial about the WPF ribbon control. I need to get some basics . Also can any one recommend good book in WPF or a starter kit.
Thanks.
I am thinking of using McClim for an application, where can I find a tutorial that covers buttons, keyboard/mouse I/O, drawing images, etc. STFW for mcclim tutorial and clim tutorial didn't help much. Any pointers?
If such a tutorial doesn't exist, please point that out and I';; try to RTFM (maybe eventually write such a tutoriial)
In most of the cases we usually creates a private variable and its corresponding public properties and uses them for performing our functionalities.
Everyone has different approach like some people uses properties every where and some uses private variables within a same class as they are private and opens it to be used by external environment by using properties.
Suppose I takes a scenario say insertion in a database.
I creates some parameters that need to be initialized.
I creates 10 private variables and their corresp public properties
which are given as
private string name;
public string Name
{
get{return name;}
set{name=value;}
}
and so on. In these cases mentioned above, what should be used internal variables or properties.
And in those cases like
public string Name
{
get{return name;}
set{name=value>5?5:0;} //or any action can be done. this is just an eg.
}
In such cases what should be done.
I wonder if the following script can be optimized somehow. It does write a lot to disk because it deletes possibly up-to-date rows and reinserts them. I was thinking about applying something like "insert ... on duplicate key update" and found some possibilities for single-row updates but I don't know how to apply it in the context of INSERT INTO ... SELECT query.
CREATE OR REPLACE FUNCTION update_member_search_index() RETURNS VOID AS $$
DECLARE
member_content_type_id INTEGER;
BEGIN
member_content_type_id := (SELECT id FROM django_content_type WHERE app_label='web' AND model='member');
DELETE FROM watson_searchentry WHERE content_type_id = member_content_type_id;
INSERT INTO watson_searchentry (engine_slug, content_type_id, object_id, object_id_int, title, description, content, url, meta_encoded)
SELECT 'default',
member_content_type_id,
web_member.id,
web_member.id,
web_member.name,
'',
web_user.email||' '||web_member.normalized_name||' '||web_country.name,
'',
'{}'
FROM web_member INNER JOIN web_user ON (web_member.user_id = web_user.id) INNER JOIN web_country ON (web_member.country_id = web_country.id)
WHERE web_user.is_active=TRUE;
END;
$$ LANGUAGE plpgsql;
EDIT: Schemas of web_member, watson_searchentry, web_user, web_country: http://pastebin.com/3tRVPPVi.
(content_type_id, object_id_int) in watson_searchentry is unique pair in the table but atm the index is not present (there is no use for it).
This script should be run at most once a day for full rebuilds of search index.
I have a table of about 450 rows that I would like to display in a graphical list for users to view or modify the line items. The users would be selection options from comboboxes and selecting check boxes etc.
I have found a listview class that extends the basic listview to allow for embeding objects but it seems kind of slugish when I load all the rows into it.
I have used a datagridview in the past for comboboxes and checkboxes, but there was a lot of time invested in getting that up and running...not a big fav of mine.
I am looking for sugestions how I can do this with minimal overhead.
thanks
c#, vs2008, .net 2.0, system.windows.forms
Hi
In a repeater control can we achive both sorting and grouping together, If possiple plz guide me the way.
If not, what is the best control to obtain just sorting and grouping.
Thank You
I have this class that contains vars for db connection;
Public Shared s As String
Public Shared con As String = WebConfigurationManager.ConnectionStrings("foo").ToString()
Public Shared c As New SqlConnection(con)
Public Shared x As New SqlCommand(s, c)
I import this to my page like this;
Imports DBVars
I'm then able to access these vars from my page.
But if I try to import them into a user control the variables are not available. Am I making an error or is this expected?
Thanks.
i have about 50 labels that are each just barely big enough to fit the letter x in them. the labels are on a report. i need to align all the labels very precisely.
is there an easier way to do this than trusting my eyes?
How can i get same functionality in windows forms as in the next example. When i have two links one beneath, and when i click first link a panel is visibleunder it and next link is shifted. When i click again the panel is invisible and second link shifted back.
<script type="text/javascript">
function toggleDivState(divName)
{
var ctl = window.document.getElementById(divName);
if (ctl.style.display == "none")
ctl.style.display = "";
else
ctl.style.display = "none";
}
</script>
<a href="javascript:toggleDivState('poll<%# Eval("ID") %>');">
<div style="display: none;" id="poll<%# Eval("ID") %>">
I have read McCarthy's 1960 paper on LISP and found no reference to anything that's similar to user-defined macros or normal order evaluation. I was wondering when marcos first appeared in programming language history (and also in Lisp history):
When was the idea of user-defined code transformation (before interpretation or compilation) first described (theoretically)?
What was the first programming language implementation to have Lisp-like macros (by "Lisp-like" I mean "using a readable Turing-complete language to do code-transformation")? (including non-Lisps -- Forth for example is quite old, but I'm not sure if the first Forth implementation already had "IMMEDIATE")
What was the first Lisp dialect to have macros?
Thank you!
This is a very strange problem and i really dont have a clue whats causing it.
What is supposed to happen is that a call to the BLL then DAL returns some data via a linq SPROC call. The retunred IMultipleResults object is processed and all results stored in a hashtable.
The hashtable is stored in session and then the UI layer uses these results to dynamically generate some gridviews.
Easy you would think.
But if i run the code i dont get any gridviews. If i take out the call to the BLL and DAL the gridviews appear but with nothing in them?
Why is it the page renders correctly when i take out the call to get the data?
Thanks.
Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine.
/// <summary>
/// Auto complete settings
/// </summary>
[System.ComponentModel.DesignerSerializationVisibility (System.ComponentModel.DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty),
Category("Data"), Description("Auto complete settings"), NotifyParentProperty(true)]
public AutoCompleteLookupSettings AutoComplete { private set; get; }
I also have a ParameterCollection that is really related to the auto complete settings, currently this collection resides off the control itself like so :
/// <summary>
/// Parameters for any data lookups
/// </summary>
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty)]
public ParameterCollection Parameters { get; set; }
What i would like to do is move the parameter collection inside of the AutoCompleteSettings as it really relates to my autocomplete, i have tried this but to no avail..
I would like to move from
<cc1:TextField ID="TextField1" runat='server'>
<AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" />
<Parameters>
<asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" />
</Parameters>
</cc1:TextField>
To
<cc1:TextField ID="TextField1" runat='server'>
<AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" >
<Parameters>
<asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" />
</Parameters>
</AutoComplete>
</cc1:TextField>
Consider the feature in Visual Studio 2010 for snippets in the HTML Source view of a web page.
type a control name in plaintext with no markup or brackets!
... e.g. hyperlink.
Then hit Tab
Your web control has been auto-completed for you. It's up to you to fill in the other details that you need.
This works for form as well:
<form action="default.aspx" method="post">
</form>
This looks like a real time saver. This is supported in WebForms and ASP.NET MVC projects.
What other snippets are available in Visual Studio 2010 in the Source view of a page?
I need to be able to add items to a listbox inside of a thread. Code is below.
1. ref class Work
2. {
3. public:
4. static void RecieveThread()
5. {
6. while (true)
7. {
8. ZeroMemory(cID, 64);
9. ZeroMemory(message, 256);
10. if(recv(sConnect, message, 256, NULL) != SOCKET_ERROR && recv(sConnect, cID, 64, NULL) != SOCKET_ERROR)
11. {
12. ID = atoi(cID);
13. String^ meep = gcnew String(message);
14. lbxMessages->Items->Add(meep);
15. check = 1;
16. }
17. }
18. }
19. };
I get the error Error: a nonstatic member reference must be relative to a specific object on line 14. Is there any way to get it to let me do that? Because if I try to use String^ meep; outside of that Thread it doesn't contain anything. It works PERFECT when I use it within the thread but not outside of it. I need to be able to add that message to the listbox. If anyone can help I would appreciate it.
I'm wondering about the famous MSN chat clients conversation windows! I'm sure there must be alot of different aspects but I'd like to focus on those little sliding panes. For instance where the pictures of the people in the conversation is displayed. When you click the collapse button the pictures dissapear and the panel gracefully slides in, and when you click it again to expand, it slides out and the pictures are smoothly faded in. How would one go about customly drawing a control in WinForms that had simmilar behaviour?
i have a textbox array using that i create 20 text boxes in runtime,
i need to get the focus if a particular text box(if i press downarrow
in keyboard how to get the key down of a particular text box it can be
3rd text box).
I have looked around on the net and cant find an answer to my query.
I would really appreciate if someone could provide a good answer without down rating this post.
In Lisp car, cdr are used on data mode like '(whatever here) which makes sense to me.
Now, in the book Land of Lisp the author is explaining how to build a text engine and suddenly he uses the following description to make a function.
(defun describe-location (location nodes)
(cadr (assoc location nodes)))
Can I ask why is he doing a cadr on a list and how come it provides a response and not an error? shouldn't it be a data mode i.e with a quote in front of the opening bracket '(whatever here)?
and also why is he using assoc as in (assoc location nodes) and not (assoc 'garden *nodes*)
Isn't the second correct way to use assoc ? I may be missing the big picture and as such would really appreciate someone explaining these key points please.
Many thanks!
Hi,
I have an address control which display the contact info of the person.
so it displays something like
1234, street
City, CA 12345
Now i want to give user flexibility to create format out of it.
For ex someone might want to display address as,
street, City, Country
OR
Just display their emails:
[email protected][email protected]
Any good ideas on how to it or similar examples?
thanks
Hi,
In designing an XForm interface to an XML database (using eXist and XSLTForms), I'd like to include an input control for an optional element. The XML data records already exist and while some contain the optional element, others don't. To update a record, I'm using the existing XML record as the model instance. The problem is that the form control is not displayed when the optional element is not present, which is logical, but presents a problem when a user wants to add data to the optional element.
To be more explicit, here's an example data record, data.xml:
<a>
<b>content</b>
</a>
with RNC schema:
start =
element a {
element b { text },
element notes { text }?
}
XForms model:
<xf:model>
<xf:instance xmlns="" src="data.xml"/>
<xf:submission id="save" method="post" action="update.xq" />
</xf:model>
And control:
<xf:input ref="/a/notes">
<xf:label>Notes (optional): </xf:label>
</xf:input>
The problem is that the 'Notes' input control is simply not displayed.
An obvious solution is to add a trigger button to allow the user to insert the element if needed, but it is preferable to just have the input control appear, and be empty.
My question is: is there some subtle combination of lesser-know attributes/binds/multiple instances/xpath expressions that will cause the control to always be displayed?
Thanks
I am stuck on how to pass data from one control to another. If I have a listbox control and the Contol Item contains a datatemplate which renders out 5 fields ( first name, last name, email, phone and DOB) all of which come from an observable collection. How can I allow the user to select a listbox item and have the valuesbe stored within a new listbox control?
Is this done through the creation of a new collection or is there a more simple way to bind these values to a new control?
thank you,
I am building a winforms application, i have two comboboxes which have the same datasource, the datasource is a DataTable. Now, when I select a value in one comboBox, the value of another comboBox is changed too. Is there a way make it change without affecting the other?