 |
|
 |
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.06/5 |
|
|
|
 |
|
 |
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 |
|
|
|
 |
|
 |
I am trying to find a sample for a navigational wf in .net 4.0 which uses asp.net web app, just like the "Dating Service" app saple that was published for .net 3.5 whcih used the "DateSiteNavigation" workflow.
Does anyone have a sample in wf 4.0?
Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I want to create auto suggest textbox in my WPF application. In this textbox I want to display the existing user names which matches with the user entered data.
If anyone have idea to solve this, please reply me.
Thanks in advance, N.Divya
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have a folder structure like this....
Project FolderA SubFolderAA Themes Generic.xaml ControlAA1.cs ControlAA2.cs SubFolderAB Themes Generic.xaml ControlAB1.cs FolderB FolderC
I have recently added the folder SubFolderAB and control ControlAB1.cs with a Themes/Generic.xaml file. My control in ControlAB1.cs cannot locate the theme in the new Generic.xaml unless I move the Themes/Generic.xaml to the Project root folder (Project/Themes/Generic.xaml). The controls and styles in SubFolderAA are unaffected by any of this. What could be causing this behaviour?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, I am using the collectionview customSort with an IComparer for very large sets of data. I would like to sort on a background thread and give the user the option to cancel the sort. Can this be achieved using the collectionView? If not then what is the best alternative?
Many Thanks Dan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I am using the WPF combo box in my application. In the combo box, the user can browse through the available items before selecting an item. When user goes through each of these items I want to display a tooltip in a seperate label next to combo box.
So I want to catch that event. Is there such event that fires, when user goes through the items in Combo box before selecting one???
Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
write code on mouse over for each comboboxitem such as Item1 and code as private void cbi1_MouseMove(object sender, MouseEventArgs e) { string val = cbi1.Content.ToString(); TTLabel.Content = val; }
when u write code block for each comboboxitem, u get the value which u want to print in separate label
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Is it possible to bind different enums to one DataGridComboBoxColumn?
I need to display a couple of physical properties like temperatur, pressure, weight in a datagird. All these physical properties have a name, a physical unit and a value.
Public Class physicalProperty
Public Property name() As [Enum] Get .... End Get Set(ByVal value As [Enum]) ... End Property
Public Property unit() As [Enum] Get .... End Get Set(ByVal value As [Enum]) ... End Property
Public Property value() As double Get .... End Get Set(ByVal value As double) ... End Property
End Class
Each row of my datagird should show one physical property. The first column displays the name, the second the unit and the third the value of the phy. property. I would like to be able to change the unit in the datagrid with the help of a combobox. All solutions I found for binding a enum to a datagridComboboxColumn used a ObjectDataProvider to set the itemssource for the datagridCombobox:
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="AlignmentValues"> <ObjectDataProvider.MethodParameters> <x:Type TypeName="namespace:myEnum" /> </ObjectDataProvider.MethodParameters> </ObjectDataProvider>
But I don't have one enum. I have for each physical property one enum ( temperature (K, C, F), pressure (bar, Pa), weight (kg, g)).
Maybee I can use one enum for all physical units and dispaly only the valid ones by filtering?
Is there a way to meet my requirements? reibor
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Well, you're not using the MVVM pattern. You should implement the MVVM pattern when you're using WPF (although you sometimes can take shortcuts and not implement the necessary parts to get the job done). You can learn about MVVM from the links I posted here[^]. So I suggest you create a class PhysicalPropertyViewModel that has the following main properties - a property AvailableUnits that returns the available enum values for the property (to feed the combobox) - and a property SelectedUnit that is bound to the SelectedItem of the combobox when is set, it changes the DisplayValue property value accordingly - a property DisplayValue which is the value to display according to the selected measurement unit The TreeView article is how I initially understood most of the MVVM concept. Go read it and then read the MSDN Magazine article. Then read this reply again. After this, if you don't understand what I mean, tell me and I'll try to be more clear. Have a nice day.
Eslam Afifi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have a FlowDocument within a resource dictionary. I'd like to place a Hyperlink within a Paragraph within the FlowDocument, and then add a Click event to the Hyperlink element. First problem: I'm able to give a Name attribute to the Hyperlink but I don't know how to address it in code-behind. Second problem: if I include a Click event in the Hyperlink, the compiler tells me I have to include a x:Class in the root element of the FlowDocument resource. I don't know what that means or how to express it in XAML.
I would like to have the FlowDocument in an application-level ResourceDictionary because I'd like to be able to access it in multiple places in my application and respond to clicks on the Hyperlink without having to duplicate the FlowDocument in these multiple places. That's ultimately the problem I want to solve. Right now I have duplicated the FlowDocument in multiple places and that is an embarrassing kludge.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
If I understood what you want correctly, you just want a local event handler to that object (you don't want to access the event from the Window or Control that will host the document). Add a a partial class for the dictionary. Write your event handler in that class. Link to that class from the dictionary XAML using x:Class Here is a sample code,
<ResourceDictionary x:Class="ResourcesDemo.Dictionary1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <FlowDocument x:Key="doc"> <FlowDocument.Blocks> <Paragraph> <Hyperlink Click="Hyperlink_click">Say hello</Hyperlink> </Paragraph> </FlowDocument.Blocks> </FlowDocument> </ResourceDictionary>
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows;
namespace ResourcesDemo { public partial class Dictionary1 { private void Hyperlink_click(object sender, RoutedEventArgs e) { MessageBox.Show("Hello, world!"); } } }
Eslam Afifi
modified on Thursday, November 19, 2009 5:47 PM
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
 |
That worked beautifully! Thanks! The reason duplicating the FlowDocument in two different places was a kludge was because the FlowDocument was huge and under constant revision. Imagine the pain of trying to keep the two copies in sync!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I wish to know how can one traverse through items inside a Listbox in WPF. Basically I wants to access the checkbox inside the template.
WPF Code:
<ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Border BorderBrush="#A0A4A8" BorderThickness="0,0,0,1" Height="31" Width="335" > <CheckBox x:Name="chkITM" Content="{Binding GroupName}" Width="335" FontWeight="Bold" Height="31" /> </Border> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Help please.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Using the MVVM pattern can help in virtually all cases avoid stuff like that. Please see this post[^]. But if you really need to get it done the way to described, the ListBox has a property called Items. Then for each item, you can access it's visual tree and search for the element you want by its name using the FindName method (I'm not fully sure about that since I did this kind of stuff only once when I first started learning WPF). P.S. stepping into the debugger and seeing the items' structures using the Immediate Window or a debugger visualizer like Mole[^] can help you get this done quickly.
Eslam Afifi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello, i am looking for the best wpf chart software / tool for wpf. It doesnt matter if it costs or not (or how much). The most important thing is, to customize the charts as much as possible.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
If you need the charts to do dynamic update then check out the D3 project on codeplex: http://dynamicdatadisplay.codeplex.com/Thread/List.aspx
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I have a WCF service and client. I have no issues in creating the WCF proxy and calling all the operation contract but to one operation which returns a DataSet. The dataset is fairly large object, initially it gave Bad Response error and i resolved it by changing the maxBufferPoolSize to "50000000" instead of the default value( i changed all the stuff related to size to "50000000"). But now when i call this particular method it gives the following error
System.ServiceModel.Security.MessageSecurityException: The signature verification failed. Please see inner exception for fault details. ---> System.Security.Cryptography.CryptographicException: Digest verification failed for Reference '#_0'. at System.IdentityModel.Reference.EnsureDigestValidityIfIdMatches(String id, Object resolvedXmlSource) at System.IdentityModel.StandardSignedInfo.EnsureDigestValidityIfIdMatches(String id, Object resolvedXmlSource) at System.ServiceModel.Security.WSSecurityOneDotZeroReceiveSecurityHeader.EnsureDigestValidityIfIdMatches(SignedInfo signedInfo, String id, XmlDictionaryReader reader, Boolean doSoapAttributeChecks, MessagePartSpecification signatureParts, MessageHeaderInfo info, Boolean checkForTokensAtHeaders) --- End of inner exception stack trace ---
Server stack trace: at System.ServiceModel.Security.WSSecurityOneDotZeroReceiveSecurityHeader.EnsureDigestValidityIfIdMatches(SignedInfo signedInfo, String id, XmlDictionaryReader reader, Boolean doSoapAttributeChecks, MessagePartSpecification signatureParts, MessageHeaderInfo info, Boolean checkForTokensAtHeaders) at System.ServiceModel.Security.WSSecurityOneDotZeroReceiveSecurityHeader.ExecuteMessageProtectionPass(Boolean hasAtLeastOneSupportingTokenExpectedToBeSigned) at System.ServiceModel.Security.ReceiveSecurityHeader.Process(TimeSpan timeout) at System.ServiceModel.Security.MessageSecurityProtocol.ProcessSecurityHeader(ReceiveSecurityHeader securityHeader, Message& message, SecurityToken requiredSigningToken, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) at System.ServiceModel.Security.InitiatorSessionSymmetricMessageSecurityProtocol.VerifyIncomingMessageCore(Message& message, String actor, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) at System.ServiceModel.Security.MessageSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState) at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.ProcessIncomingMessage(Message message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState, MessageFault& protocolFault) at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.ProcessReply(Message reply, TimeSpan timeout, SecurityProtocolCorrelationState correlationState) at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Honeywell.PSOS.Data.Provider.WCFPSOSDAService.IDAService.GetUpdatedData(Object& specialMessage, String serverName, String hostName) at Honeywell.PSOS.Data.Provider.WCFPSOSDAService.DAServiceClient.GetUpdatedData(Object& specialMessage, String serverName, String hostName) in D:\cc_view\E311367_Remote_view_R400\Prod_URT\ProfitSuite Operator Station\DataAccess\Honeywell.PSOS.Data.Provider\Service References\WCFPSOSDAService\Reference.cs:line 128 at Honeywell.PSOS.Data.Provider.WebSubscriptionManager.GetData(Boolean bFullData)
I could not able to find, any solution in google or any where. Please let me know how to resolve this. Thanks in advance
This is my web.config file
<system.serviceModel> <services> <service behaviorConfiguration="Honeywell.PSOS.Data.WCFDAService.Service1Behavior" name="Honeywell.PSOS.Data.WCFDAService.DAService"> <endpoint address="" binding="wsHttpBinding" contract="Honeywell.PSOS.Data.WCFDAService.IDAService" bindingConfiguration="endPointBehave" > <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Honeywell.PSOS.Data.WCFDAService.Service1Behavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <wsHttpBinding> <binding name="endPointBehave" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="50000000" maxReceivedMessageSize="50000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="50000000" maxStringContentLength="50000000" maxArrayLength="50000000" maxBytesPerRead="50000000" maxNameTableCharCount="50000000" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" /> <message clientCredentialType="Windows" /> </security> </binding> </wsHttpBinding> </bindings> </system.serviceModel> </configuration>
This is my app.config file
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IDAService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="50000000" maxReceivedMessageSize="50000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="50000000" maxStringContentLength="50000000" maxArrayLength="50000000" maxBytesPerRead="50000000" maxNameTableCharCount="50000000" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" /> <message clientCredentialType="Windows" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://ie11ltj2sts1s.global.ds.honeywell.com/PSOSWCFDA/DAService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDAService" contract="WCFPSOSDAService.IDAService" name="WSHttpBinding_IDAService"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.serviceModel> </configuration>
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Returning a dataset via WCF? That's kinda crapping in the face of SOA a bit, yah? Consider restructuring your data to represent business objects and implement a good SOA and I think you'll find silly problems like this don't occur.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi All,
Can any one tell why the DataMember attribute is applying on class fields rather than Properties in WCF, I am using the Serialization.
Service Code: [System.Runtime.Serialization.DataContract(Namespace = "http://QuickReturns")] public partial class OTA_HotelAvailGetRQHotelAvailRequestDateRange { private string startField; [System.Runtime.Serialization.DataMember(Name = "Start")] public string Start { get{} set{} } } Client Side : OTA_HotelAvailGetRQHotelAvailRequestDateRange dataRange= new OTA_HotelAvailGetRQHotelAvailRequestDateRange(); dataRange.startField= "10";
Thanks and Regards
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The attribute is applied to the Start property, not the startField field. Attributes are placed above the method, class... they describe. But having the DataMember attribute for a field is not wrong. Since you'd be telling WCF that the value of the field is to be serialized. But in your code, the only DataMember attribute is applied to the property.
Eslam Afifi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
i have text box to enter the name, add button,listbox will display the added records,button to save the record. when i entered the name and clicked add button, it will add the data to database and text box will be cleared.
like that i adding some records and those records will be binded to listbox and it will display the records in the list box.
now i am trying to edit the record so i just selecting the record in listbox. by doing that i will get the corresponding data in the same text box(Which i used to enter the data).i binded the listbox selected item to the text box.
then i edited text box and i clicked save button, its saved.
while i saving it i am clearing the text box but due to clearing the text box in save button is clearing the data which is binded in the list box , so the listbox displays the empty data for that record.
Thank's,

|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi there,
I have a WinForm application written in C#. I have added a WPF usercontrol added to the Winform and I want to get the mouse Events passed back to the WinForm.
So you can see in my XAML I have a MouseUp event:
UserControl x:Class="CustomRssFeed.MainWin" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="41" Width="699" Foreground="#FFFFFFFF" Loaded="MainWin_Loaded" Unloaded="MainWin_Unloaded" SizeChanged="MainWin_SizeChanged" MouseUp="UserControl_MouseUp"
and I have a XAML.CS with:
private void UserControl_MouseUp(object sender, MouseButtonEventArgs e) { }
My question is how do I convert the MouseButtonEventArgs e to a friendly WinForm version of MouseEventArgs ???
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
What about subscribing to the event(s) on the ElementHost object instead?
Mark Salsbery Microsoft MVP - Visual C++
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |