 |
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers, Chris Maunder
The Code Project Co-founder Microsoft C++ MVP
|
| Sign In·View Thread·PermaLink | 4.31/5 (6 votes) |
|
|
|
 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers, Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
| Sign In·View Thread·PermaLink | 4.27/5 (5 votes) |
|
|
|
 |
|
 |
I want to replace the 'plus', 'minus', 'blank' icons for the expand/collapse button of a TreeViewItem with my own images. Can that be set by defining a style? If so, does anyone have an example?
While on the discussion of element styles, where does one find the default styles and templates applied to various Controls?
modified on Saturday, November 7, 2009 12:21 PM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Already found what I was looking for. For anyone else, this might help: ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/wpf_conceptual/html/6bea1014-2555-425c-9f79-3f31a487bab3.htm
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Dear all,
I need to develop a application with invite fearure.My application ppl need to connect to the gmail contacts list and in the list user can select and invite the ppl.I can write a WCF or webservice client application which will consume gmail webservice.
My question is how to consume the gmail web service.What is the gmail webservice which will expose the contact list.
Please help me in this regard.
Thanks in advance, Srinivas Mateti
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
It's ironic that even if the gmail website doesn't document this, the same people write google, which is sure to find you the info you want.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks for the information...i am nt specific to the gmail...even i want to implement it the same for hot mail and others..if you have hot mail info...please provide..
Thanks, Srinivas Matet
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I am currently developing the application I asked about earlier and when I run (debug mode) the application I get the security exception, So I go to the properties and set the security setting to full trust and that solved the problem. Now when I deploy the application to localhost I get Trust Not Granted so I was wandering how to solve this problem so that I can move on with Implementing the other design items?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
And how can I get rid of it? I've been able to remove the RowHeader on the left side but the upper left hand corner remains.
While I am at it, I've data binded my DataGrid to an observable collection and when the collection is empty, I get a weird error where that upper left hand corner of the DataGrid begins to stretch all the way to the right and locks the program up. It seems to be stuck on a "OnResize" event in according to the disassembly.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Can you post a simple example that shows what you are referring to?
I don't see anything on my DataGrids in the upper left corner, but my property settings could be vastly different than yours.
Mark Salsbery Microsoft MVP - Visual C++
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I'm researching if an idea we had today at a meeting is possible. What we need to do is embed an ASP.NET project inside a WPF app. I'm not talking about a browser feature, the ASP.NET app is not published on any server. The idea is to avoid any server setup. Anyone know if this is possible, or not?
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Why do you want to embed an ASP.NET app inside a WPF one? Could you please elaborate on what you're trying to achieve here?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes. My blog | My articles | MoXAML PowerToys | Onyx
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
It's for demonstration. The idea is to be able to send the customer a few demo web apps. The demos should work out-of-the box without any setup. I know the first idea is to have the demo apps available online, but due to some product specifics, we prefer not to.
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
This is an insane question. You'd have to ship your website code AND make sure IIS was set up, then use a browser control to browse to it. How else could it work. The non retarded way to do this is to have the websites in question on a hidden server, which perhaps has some sort of security built in, to try to make sure that only your WPF app could browse to the sample site.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Thanks for putting this example. But, everywhere I find example of ArrayList containg strings. Is there a way to bind a collection of custom objects?Please advise.
Something like this instead of string collection :
public AlbumCollection GetAlbums() { var albumCollection = new AlbumCollection(); albumCollection.Album.Add(new Album() { Description = "A1 Desc", Name = "A1 Name", Id = 1 }); albumCollection.Album.Add(new Album() { Description = "A2 Desc", Name = "A2 Name", Id = 2 }); albumCollection.Album.Add(new Album() { Description = "A3 Desc", Name = "A3 Name", Id = 3 }); albumCollection.Album.Add(new Album() { Description = "A4 Desc", Name = "A4 Name", Id = 4 }); return albumCollection; }
--------------
public partial class AlbumCollection {
[EditorBrowsable(EditorBrowsableState.Never)] private List<Album> albumField;
[System.Xml.Serialization.XmlElementAttribute("Album")] public List<Album> Album { get { if ((this.albumField == null)) { this.albumField = new List<Album>(); } return this.albumField; } set { this.albumField = value; } } }
public partial class Album {
[EditorBrowsable(EditorBrowsableState.Never)] private List<Document> documentField;
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
[System.Xml.Serialization.XmlElementAttribute("Document")] public List<Document> Document { get { if ((this.documentField == null)) { this.documentField = new List<Document>(); } return this.documentField; } set { this.documentField = value; } } }
Please advise. Thanks Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Do you have an example binding to an AlbumCollection that doesn't work?
I personally make my custom collection classes like this:
public class AlbumCollection : List<Album> { } so AlbumCollection is a collection instead of contains a collection.
Mark Salsbery Microsoft MVP - Visual C++
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I have Rectangle that I want to flip in the X axis, I'm using ScaleTransform. The problem is that i want to use converter for the multi binding, but when i use multi binding the Rectangle doesn't flip. If i use single binding it works.
In the XAML just replay between the binding and the multi binding to see the result.
<Grid > <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <DockPanel > <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <TextBlock Text="FlipX"/> <TextBox x:Name="FlipX" Text="1" Margin="0,0,5,0"/> </StackPanel> </DockPanel> <Grid Grid.Row="1"> <Grid> <Grid Width="100" Height="100" RenderTransformOrigin="0.5, 0.5"> <Grid.RenderTransform> <TransformGroup> <ScaleTransform> <ScaleTransform.ScaleX> <Binding ElementName="FlipX" Path="Text"/> <!----> </ScaleTransform.ScaleX> </ScaleTransform> </TransformGroup> </Grid.RenderTransform> <Rectangle x:Name="MyRect" Fill="LightBlue" > </Rectangle> <TextBlock Text="(0,0)" VerticalAlignment="Top" HorizontalAlignment="Left"/> </Grid> </Grid> <Border Width="100" Height="100" BorderBrush="Black" BorderThickness="2"/> </Grid> </Grid>
The converter for the multi binding is:
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return -1; }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
WCF can be hosted in different hosting environment. I want to which is the safest way to host WCF. Is it IIS or Windows Service. My Requirement is that thw WCF Client should access the service from outside the firewall(ie. via INTERNET). To expose WCF in IIS i need to enable the "Anonymous Access" in IIS, though the message reply & response happens via secured communication via https with Certificate authentication, will this make the system running the IIS open to attack.
In one line, from the hacking/security perspective, IIS is best or Windows service is best for host WCF.
Thanks in advance. Anand
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The choice of hosting environment is also restricted by the binding you use for your WCF service and each has its own advantages and disadvantages.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
You don't need to enable anonymous access in IIS if you change things around a bit. If you use the standard MEX endpoint, you will need it, but you can easily remove this and provide metadata through other options (service behavior metadata settings).
IIS has a nice way of reinitializing your app even if there is a critical exception. If you host via Windows you will need to implement this capability yourself (if needed). Additionally, IIS provides recycling and a number of other features that do not come out of the box with win apps. The important thing to remember is that both mechanisms use the same technology and classes, so one isn't really 'more secure' than the other. It's all a matter of settings, think of IIS as a well written windows host.
That said, if you're looking for supreme customization, I would recommend a windows app, if you're looking for relatively easy deployment and runtime ops, use IIS.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello
I want to write a wcf service where there will be a generic list of object as a parameter and a enum to define the type of object. The generic object can have a single entity or multiple entities. And the entity can be a single Client or a collection of Clients or may be a single Employee or a Collections of Employees and so on. But the problem is wcf service don't take any kind of generic object as a parameter.
Is there any way to this? What I want to do is something like below:
In the Client side the method will be..
public string EmployeeInformation(List<Employee> objEmployee) { try {
string IsSuccess = ""; WCF_Service_Reference objWCFService = new WCF_Service_Reference(); List<Object> objList = objEmployee; IsSuccess = objWCFService.ActionMapping(objList,(int)EnumEntities.Employee); return IsSuccess; } catch() { ----- ------ } }
At the server in WCFService.svc.cs file the implementation of the service should be some thing similar like below:
public string ActionMapping(List<Object> objList, int nEntityInfo) {
(EnumEntities) EnumEnt = (EnumEntities)nEntityInfo;
swicth(EnumEnt) { case EnumEnt.Employee : List<Employee> objEmployee = objList; PerformOperation(objEmployee); break:
case EnumEnt.User: List<User> objUser = objList; PerformOperation(objUser); break;
case EnumEnt.Bank: List<Bank> objBank = objList; PerformOperation(objBank); break;
default: break: } }
The problem is that the service not taking List<Object> objList as a Serialized object which is obvious why. But Is there any way to do the same some how. so that I can use only one service method for all of my entities. Any help or hints would be highly appreciated.
Thanking in Advance Johnny
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The main thing is that the service needs to understand the message structure that it is expecting to receive, otherwise deserialization can't occur properly. The call you mentioned isn't really strongly typed, so you will have trouble getting it to work.
If you had to try, you might look into the KnownType attribute for service contracts, however, I would highly recommend redesigning the service to utilize individual calls for each type, as it is more compliant with SOA standards. Something like:
public string ActionMappingEmployee(Employee[] objList, int nEntityInfo); public string ActionMappingCompany(Company[] objList, int nEntityInfo); public string ActionMappingUser(User[] objList, int nEntityInfo);
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi All,
I am just starting with WPF to implement rich GUI application. I have design in my mind and would like you to give suggestion to make it better.
--------------------------------------------------- dropDown1 dropdown2 dropdown3
----------........---------........--------- ..........|......|.........|......|.........| ..........|......|.........|......|.........| ..........|......|container|......|container| Tree view.|......|..with...|......|..with...| ..........|......|.multiple|......|.multiple| ..........|......|list view|......|list view| ..........|......|.........|......|.........| ..........|......|.........|......|.........| ----------.......-----------......----------- ---------------------------------------------------
Above is the design i would like to implement. How it should work? - a user will select an option from dropDown1 and treeview will be filled with hierarchy of active, pending, closed guests. - When user will select an option from dropDown2/dropDown3 it will fill respective containers with list views (no of list views will be decided at run time by retrieving count from DB so there is requirement that container should pop up scrollbars if listviews crosses the bounds) - Now user will move (drag and drop) guest from treeview to list view.
This is how application would work. I need your suggestion if this would be easy to implement in WPF. Also share your view on this.
Thanks, AksharRoop
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |