Search Results

Search found 4490 results on 180 pages for 'binding'.

Page 25/180 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • WPF Show Open TabItem Names in a List View

    - by mr justinator
    I'm trying to display a list of open tab names in a listview or listbox (recommendations?). Been going through the different type of binding options and I'm able to bind to a single tab name but it displays vertical instead of horizontal. Here is my XAML: <ListView DockPanel.Dock="Left" Height="352" Name="listView1" Width="132" ItemsSource="{Binding ElementName=RulesTab, Path=Name}" IsSynchronizedWithCurrentItem="True" FlowDirection="LeftToRight" HorizontalAlignment="Left" HorizontalContentAlignment="Left" DataContext="{Binding}"> Any pointers would be greatly appreciated as I'd like to be able to see a list of all the tabs open and then double click on one to bring the tab into focus. Many thanks!

    Read the article

  • MVVM User Control Issue

    - by Burt
    I have a problem with commands in an MVVM application (I am only learning MVVM so go easy). MyClassViewModel is set to the datacontext for MainForm1, MyList is bound to UserControl1 datacontext and each item in the list is represented by UserControl2. I am trying to fire MyCommand in UserControl2 using the following: <CheckBox IsChecked="{Binding MyBool}" Command="{Binding Path=MyCommand}" CommandParameter="{Binding}"> I get the following error in the output: System.Windows.Data Error: 39 : BindingExpression path error: 'MyCommand' property not found on 'object' ''MyObject'' From this error I know that WPF is looking for the command in the object bound to the UserControl2 what I really need is for it to look for the command in the MainForm1 datacontext (MyClassViewModel). Is it possible to bubble up commands like this and if so how is it done? Is bubbling up the command a good solution?

    Read the article

  • Setting a "dependency property" in code

    - by Matt B
    I'm on a roll today... I have the following code delaring a dependency property inside a class called ActionScreen: #region Dependency Properties & Methods public string DescriptionHeader { get { return (string)GetValue(DescriptionHeaderProperty); } set { SetValue(DescriptionHeaderProperty, value); } } // Using a DependencyProperty as the backing store for DescriptionHeader. This enables animation, styling, binding, etc... public static readonly DependencyProperty DescriptionHeaderProperty = DependencyProperty.Register("DescriptionHeader", typeof(string), typeof(ActionScreen), new UIPropertyMetadata("xxx")); #endregion I bind to this property in my Xaml as so: <GridViewColumn DisplayMemberBinding="{Binding Description}" Header="{Binding DescriptionHeader}" Width="350" /> Now I want to be able to set the parameter from my code behind when I recieve an event - but it's not working: public string DescColText { set { this.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate() { DescriptionHeader = value; })); } }

    Read the article

  • How to? WCF customBinding over Https

    - by user663414
    Hi all, I'm trying to setup a WCF service for internal use, on our external facing web-farm (we dont have a web farm internally, and I need this service to have failover and load-balancing). Requirements: PerSession state, as we need the service to retain variable data for each session. HTTPS. After lots of googling i've read I needed to create a customBinding, which I've done, but not sure if it is correct. Larger message size, as one of the parameters is a byte[] array, which can be a max of 5mb. no requirement to manually edit the client-side app.config. ie, I need the Developer to just add the service reference, and then starts using the object without fiddly changing of app.config. Note: I've previously had this service working under HTTP correctly (using wsHttpBinding). I've also had it working under HTTPS, but it didn't support PerSession state, and lost internal variable values each function call. I'm currently getting this error from the test harness: Could not find default endpoint element that references contract 'AppMonitor.IAppMonitorWcfService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. NOTE: The error is arising on an Test Harness EXE, that has the WCF service referenced directly under Service References. This is not the problem of an exe referencing another object, that then references the WCF service, that i've read about. The WSDL is showing correctly when browsing to the URL. Web.Config: <system.serviceModel> <services> <service name="AppMonitor.AppMonitorWcfService" behaviorConfiguration="ServiceBehavior"> <endpoint address="" binding="customBinding" bindingConfiguration="EnablePerSessionUnderHttps" contract="AppMonitor.IAppMonitorWcfService"/> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> </service> </services> <bindings> <customBinding> <binding name="EnablePerSessionUnderHttps" maxReceivedMessageSize="5242880"> <reliableSession ordered="true"/> <textMessageEncoding> <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> </textMessageEncoding> <httpsTransport authenticationScheme="Anonymous" requireClientCertificate="false"/> </binding> </customBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpsGetEnabled="true" httpGetEnabled="false"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> EXE's App.config (auto-generated when adding the Service Reference): <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="CustomBinding_IAppMonitorWcfService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true" /> <security mode="Transport"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> </binding> </wsHttpBinding> </bindings> <client /> </system.serviceModel> </configuration> I'm not sure why the app.config is showing wsHttpBinding? Shouldn't this be customBinding? I really dont want to have to edit the app.config, as this service will be used by dozens of developers, and I want them to just be able to add the Service Reference, and away they go... Using VS2008, .NET 3.51. I think server is IIS7, Win Server 2008, can confirm if needed.

    Read the article

  • how to get TabHeader on trigger

    - by CurlyFro
    i have a tabcontrol. i'm trying to pass the tabcontrol as a parameter to figure out the selected tab item so i can get the tab header name. Binding this doesn't seem to work. ideas? <TabControl Background="#FFF9F9F9" Height="650"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <n:ExecuteCommandAction Command="{Binding UpdateTabCommand}" Parameter="{Binding this}"/> </i:EventTrigger> </i:Interaction.Triggers> in my viewmodel constructor i have: _updateTabCommand = new ActionCommand< TabControl>(UpdateTab); private method: public void UpdateTab(TabControl tabControl) { var tabItem = (TabItem)tabControl.SelectedItem;

    Read the article

  • databinding to self without code

    - by jcollum
    I'm building a UserControl in WPF. The control has two properties, Title and Description, that I'd like to bind to two textblocks. Seems real straightforward, and I got it working, but I'm curious about something. To get it to work I had to add this code: void CommandBlock_Loaded(object sender, RoutedEventArgs e) { this.DataContext = this; } My bindings look like this: <TextBlock Text="{Binding Title}" Width="100" ... /> <TextBlock Text="{Binding Description}" Width="100" ... /> What I'm wondering is how come I couldn't get it to work without the this.DataContext = this; and instead use DataContext="{Binding RelativeSource={RelativeSource Self}}" (in the UserControl element of the markup)? I'm sure I'm missing something about DataContexts but don't know what.

    Read the article

  • RHEL - blocked FC remote port time out: saving binding

    - by Dev G
    My Server went into a faulty state since the database could not write on the partition. I found out that the partition went into Read Only mode. Finally to fix it, I had to do a hard reboot. Linux 2.6.18-164.el5PAE #1 SMP Tue Aug 18 15:59:11 EDT 2009 i686 i686 i386 GNU/Linux /var/log/messages Oct 31 00:56:45 ota3g1 Had[17275]: VCS ERROR V-16-1-10214 Concurrency Violation:CurrentCount increased above 1 for failover group sg_network Oct 31 00:57:05 ota3g1 Had[17275]: VCS CRITICAL V-16-1-50086 CPU usage on ota3g1.mtsallstream.com is 100% Oct 31 01:01:47 ota3g1 Had[17275]: VCS ERROR V-16-1-10214 Concurrency Violation:CurrentCount increased above 1 for failover group sg_network Oct 31 01:06:50 ota3g1 Had[17275]: VCS ERROR V-16-1-10214 Concurrency Violation:CurrentCount increased above 1 for failover group sg_network Oct 31 01:11:52 ota3g1 Had[17275]: VCS ERROR V-16-1-10214 Concurrency Violation:CurrentCount increased above 1 for failover group sg_network Oct 31 01:12:10 ota3g1 kernel: lpfc 0000:29:00.1: 1:1305 Link Down Event x2 received Data: x2 x20 x80000 x0 x0 Oct 31 01:12:10 ota3g1 kernel: lpfc 0000:29:00.1: 1:1303 Link Up Event x3 received Data: x3 x1 x10 x1 x0 x0 0 Oct 31 01:12:12 ota3g1 kernel: lpfc 0000:29:00.1: 1:1305 Link Down Event x4 received Data: x4 x20 x80000 x0 x0 Oct 31 01:12:40 ota3g1 kernel: rport-8:0-0: blocked FC remote port time out: saving binding Oct 31 01:12:40 ota3g1 kernel: lpfc 0000:29:00.1: 1:(0):0203 Devloss timeout on WWPN 20:25:00:a0:b8:74:f5:65 NPort x0000e4 Data: x0 x7 x0 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 38617577 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 283532153 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 90825 Oct 31 01:12:40 ota3g1 kernel: Aborting journal on device dm-16. Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 868841 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: Aborting journal on device dm-10. Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 37759889 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 283349449 Oct 31 01:12:40 ota3g1 kernel: printk: 6 messages suppressed. Oct 31 01:12:40 ota3g1 kernel: Aborting journal on device dm-12. Oct 31 01:12:40 ota3g1 kernel: EXT3-fs error (device dm-12) in ext3_reserve_inode_write: Journal has aborted Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-16, logical block 1545 Oct 31 01:12:40 ota3g1 kernel: lost page write due to I/O error on dm-16 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 12745 Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-10, logical block 1545 Oct 31 01:12:40 ota3g1 kernel: EXT3-fs error (device dm-16) in ext3_reserve_inode_write: Journal has aborted Oct 31 01:12:40 ota3g1 kernel: lost page write due to I/O error on dm-10 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 37749121 Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-12, logical block 0 Oct 31 01:12:40 ota3g1 kernel: lost page write due to I/O error on dm-12 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: EXT3-fs error (device dm-12) in ext3_dirty_inode: Journal has aborted Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 37757897 Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-12, logical block 1097 Oct 31 01:12:40 ota3g1 kernel: lost page write due to I/O error on dm-12 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 283337089 Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-16, logical block 0 Oct 31 01:12:40 ota3g1 kernel: lost page write due to I/O error on dm-16 Oct 31 01:12:40 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:40 ota3g1 kernel: EXT3-fs error (device dm-16) in ext3_dirty_inode: Journal has aborted Oct 31 01:12:40 ota3g1 kernel: end_request: I/O error, dev sdi, sector 37749121 Oct 31 01:12:40 ota3g1 kernel: Buffer I/O error on device dm-12, logical block 0 Oct 31 01:12:41 ota3g1 kernel: lost page write due to I/O error on dm-12 Oct 31 01:12:41 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 Oct 31 01:12:41 ota3g1 kernel: end_request: I/O error, dev sdi, sector 283337089 Oct 31 01:12:41 ota3g1 kernel: Buffer I/O error on device dm-16, logical block 0 Oct 31 01:12:41 ota3g1 kernel: lost page write due to I/O error on dm-16 Oct 31 01:12:41 ota3g1 kernel: sd 8:0:0:4: SCSI error: return code = 0x00010000 df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/cciss-root 4.9G 730M 3.9G 16% / /dev/mapper/cciss-home 9.7G 1.2G 8.1G 13% /home /dev/mapper/cciss-var 9.7G 494M 8.8G 6% /var /dev/mapper/cciss-usr 15G 2.6G 12G 19% /usr /dev/mapper/cciss-tmp 3.9G 153M 3.6G 5% /tmp /dev/sda1 996M 43M 902M 5% /boot tmpfs 5.9G 0 5.9G 0% /dev/shm /dev/mapper/cciss-product 25G 16G 7.4G 68% /product /dev/mapper/cciss-opt 20G 4.5G 14G 25% /opt /dev/mapper/dg_db1-vol_db1_system 18G 2.2G 15G 14% /database/OTADB/sys /dev/mapper/dg_db1-vol_db1_undo 18G 5.8G 12G 35% /database/OTADB/undo /dev/mapper/dg_db1-vol_db1_redo 8.9G 4.3G 4.2G 51% /database/OTADB/redo /dev/mapper/dg_db1-vol_db1_sgbd 8.9G 654M 7.8G 8% /database/OTADB/admin /dev/mapper/dg_db1-vol_db1_arch 98G 24G 69G 26% /database/OTADB/arch /dev/mapper/dg_db1-vol_db1_indexes 240G 14G 214G 6% /database/OTADB/index /dev/mapper/dg_db1-vol_db1_data 275G 47G 215G 18% /database/OTADB/data /dev/mapper/dg_dbrman-vol_db_rman 8.9G 351M 8.1G 5% /database/RMAN /dev/mapper/dg_app1-vol_app1 151G 113G 31G 79% /files/ota /etc/fstab /dev/cciss/root / ext3 defaults 1 1 /dev/cciss/home /home ext3 defaults 1 2 /dev/cciss/var /var ext3 defaults 1 2 /dev/cciss/usr /usr ext3 defaults 1 2 /dev/cciss/tmp /tmp ext3 defaults 1 2 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/cciss/swap swap swap defaults 0 0 /dev/cciss/product /product ext3 defaults 1 2 /dev/cciss/opt /opt ext3 defaults 1 2 /dev/dg_db1/vol_db1_system /database/OTADB/sys ext3 defaults 1 2 /dev/dg_db1/vol_db1_undo /database/OTADB/undo ext3 defaults 1 2 /dev/dg_db1/vol_db1_redo /database/OTADB/redo ext3 defaults 1 2 /dev/dg_db1/vol_db1_sgbd /database/OTADB/admin ext3 defaults 1 2 /dev/dg_db1/vol_db1_arch /database/OTADB/arch ext3 defaults 1 2 /dev/dg_db1/vol_db1_indexes /database/OTADB/index ext3 defaults 1 2 /dev/dg_db1/vol_db1_data /database/OTADB/data ext3 defaults 1 2 /dev/dg_dbrman/vol_db_rman /database/RMAN ext3 defaults 1 2 /dev/dg_app1/vol_app1 /files/ota ext3 defaults 1 2 Thanks for all the help.

    Read the article

  • WPF TabControl - how to preserve control state within tab items (MVVM pattern)

    - by Tim Coulter
    I am a newcomer to WPF, attempting to build a project that follows the recommendations of Josh Smith's excellent article describing The Model-View-ViewModel Design Pattern. Using Josh's sample code as a base, I have created a simple application that contains a number of "workspaces", each represented by a tab in a TabControl. In my application, a workspace is a document editor that allows a hierarchical document to be manipulated via a TreeView control. Although I have succeeded in opening multiple workspaces and viewing their document content in the bound TreeView control, I find that the TreeView "forgets" its state when switching between tabs. For example, if the TreeView in Tab1 is partially expanded, it will be shown as fully collapsed after switching to Tab2 and returning to Tab1. This behaviour appears to apply to all aspects of control state for all controls. After some experimentation, I have realized that I can preserve state within a TabItem by explicitly binding each control state property to a dedicated property on the underlying ViewModel. However, this seems like a lot of additional work, when I simply want all my controls to remember their state when switching between workspaces. I assume I am missing something simple, but I am not sure where to look for the answer. Any guidance would be much appreciated. Thanks, Tim Update: As requested, I will attempt to post some code that demonstrates this problem. However, since the data that underlies the TreeView is complex, I will post a simplified example that exhibits the same symtoms. Here is the XAML from the main window: <TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Docs}"> <TabControl.ItemTemplate> <DataTemplate> <ContentPresenter Content="{Binding Path=Name}" /> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate> <view:DocumentView /> </DataTemplate> </TabControl.ContentTemplate> </TabControl> The above XAML correctly binds to an ObservableCollection of DocumentViewModel, whereby each member is presented via a DocumentView. For the simplicity of this example, I have removed the TreeView (mentioned above) from the DocumentView and replaced it with a TabControl containing 3 fixed tabs: <TabControl> <TabItem Header="A" /> <TabItem Header="B" /> <TabItem Header="C" /> </TabControl> In this scenario, there is no binding between the DocumentView and the DocumentViewModel. When the code is run, the inner TabControl is unable to remember its selection when the outer TabControl is switched. However, if I explicitly bind the inner TabControl's SelectedIndex property ... <TabControl SelectedIndex="{Binding Path=SelectedDocumentIndex}"> <TabItem Header="A" /> <TabItem Header="B" /> <TabItem Header="C" /> </TabControl> ... to a corresponding dummy property on the DocumentViewModel ... public int SelecteDocumentIndex { get; set; } ... the inner tab is able to remember its selection. I understand that I can effectively solve my problem by applying this technique to every visual property of every control, but I am hoping there is a more elegant solution.

    Read the article

  • WCF MustUnderstand headers are not understood

    - by raghur
    Hello everyone, I am using a Java Web Service which is developed by one of our vendor which I really do not have any control over it. I have written a WCF router which the client application calls it and the router sends the message to the Java Web Service and returns the data back to the client. The issue what I am encountering is, I am successfully able to call the Java web service from the WCF router, but, I am getting the following exceptions back. Router config file is as follows: <customBinding> <binding name="SimpleWSPortBinding"> <!--<reliableSession maxPendingChannels="4" maxRetryCount="8" ordered="true" />--> <!--<mtomMessageEncoding messageVersion ="Soap12WSAddressing10" ></mtomMessageEncoding>--> <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12WSAddressing10" writeEncoding="utf-8" /> <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="true" keepAliveEnabled="true" maxBufferSize="65536" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"/> </binding> </customBinding> Test client config file <customBinding> <binding name="DocumentRepository_Binding_Soap12"> <!--<reliableSession maxPendingChannels="4" maxRetryCount="8" ordered="true" />--> <!--<mtomMessageEncoding messageVersion ="Soap12WSAddressing10" ></mtomMessageEncoding>--> <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12WSAddressing10" writeEncoding="utf-8"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> </textMessageEncoding> <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" /> </binding> </customBinding> If I use the textMessageEncoding I am getting <soap:Text xml:lang="en">MustUnderstand headers: [{http://www.w3.org/2005/08/addressing}To, {http://www.w3.org/2005/08/addressing}Action] are not understood.</soap:Text> If I use mtomMessageEncoding I am getting The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. My Router class is as follows: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple, AddressFilterMode = AddressFilterMode.Any, ValidateMustUnderstand = false)] public class EmployeeService : IEmployeeService { public System.ServiceModel.Channels.Message ProcessMessage(System.ServiceModel.Channels.Message requestMessage) { ChannelFactory<IEmployeeService> factory = new ChannelFactory<IEmployeeService>("client"); factory.Endpoint.Behaviors.Add(new MustUnderstandBehavior(false)); IEmployeeService proxy = factory.CreateChannel(); Message responseMessage = proxy.ProcessMessage(requestMessage); return responseMessage; } } The "client" in the above code under ChannelFactory is defined in the config file as: <client> <endpoint address="http://JavaWS/EmployeeService" binding="wsHttpBinding" bindingConfiguration="wsHttp" contract="EmployeeService.IEmployeeService" name="client" behaviorConfiguration="clientBehavior"> <headers> </headers> </endpoint> </client> Really appreciate your kind help. Thanks in advance, Raghu

    Read the article

  • SQL CLR Assembly Error 80131051 when late binding to a registered C# COM .dll

    - by Shanubus
    I must have hit an unusual one, because I can't find any reference to this specific failing anywhere... Scenario: I have a legacy SQL function used to transform(encrypt) data. This function is called from within many stored procedures used by multiple applications. I say this, because the obvious answer of 'just call it from your code' is not really an option (or at least one I'd prefer not explore). The legacy function used sp_OA with an ActiveX dll on SQL2000 to perform its work. The new function is targeted at SQL2008 x64. I am ditching the sp_OA call in favor of CLR assembly; and am getting rid of the ActiveX dll and using a COM+ .dll (3rd party) to perform the same work. This 3rd party COM+ is required to be used based on spec given to me, so can't get rid of this piece either. Problem: After multiple attempts at getting this to work I have eliminated the following approaches 1) Create a Sql Assembly to call the local COM+ directly -- Can't do this as it requires a reference to System.EnterpriseServices. Including this requires that a whole slew of unsupported assemblies be registered which I don't want. The COM+ requires it's methods to be accessed via an Interface, so my attempts at late binding to it directly have not been successful (late binding would allow me to drop the unsupported references). 2) Create a Sql Assembly which references a C# class library that then calls the COM+. -- Same issue as #1; since the referenced dll uses System.EnterpriseServices and will be added as a dependency when referenced in the Sql Assembly, again trying to load all the unsupported libraries 3) Create a Sql Assembly which late binds to an ActiveX COM dll that calls the COM+. -- Worked in my dev environment, but can't go to x64 in production with ActiveX dll's written in VB6 (not to mention I hate backtracking anyway)... again failure... I am now onto an approach that is almost working, with of course one last hangup. I now have -a Sql Assembly that late binds to a C# COM dll, eliminating the need for including System.EnterpriseServices and eliminating the need to reference the C# COM in the SqlAssembly itself. The C# COM does reference System.EnterpriseServices to call the COM+, but since I am late binding to it from the SqlAssembly, I bypass the need for Sql to actually load them as referenced assemblies. Works in debugger.. Works on my dev box when the SqlAssembly dll is referenced in a test console app and called directly Installs to Sql2008 just fine Executing the actual UDF works, but returns no data due to a failure reporting from the late bound dll! So the SqlAssembly is instanciated just fine. It actually fails on it's late binding to the C# COM, which is working from a test console app on the same machine. It appears to be a difference in behavior based on whether called from within the SQL UDF or not. Since it is working on the same box from my console app, I am assuming it's on the SQL side. My steps to install were. --Install the COM+ dll and ensure it can be called successfully (as from with in the console app) --Register the C# COM dll (which calls the COM+) and get it to the GAC (again proofed to be working from console app) --Create my Assymetric Key CREATE ASYMMETRIC KEY SqlCryptoKey FROM EXECUTABLE FILE = 'D:\SqlEx.dll' CREATE LOGIN SqlExLogin FROM ASYMMETRIC KEY SqlExKey GRANT UNSAFE ASSEMBLY TO SqlExLogin GO --Add the assembly CREATE ASSEMBLY SqlEx FROM 'D:\SqlEx.dll' WITH PERMISSION_SET = UNSAFE; GO --Create the function CREATE FUNCTION dbo.f_SqlEx( @clearText [nvarchar](512) ) RETURNS nvarchar(512) WITH EXECUTE AS CALLER AS EXTERNAL NAME SqlEx.[SqlEx.SqlEx].Ex GO With all that done, I can now call my function SELECT dbo.f_SqlEx('test') But get this error in the event log... Retrieving the COM class factory for component with CLSID {F69D6320-5884-323F-936A-7657946604BE} failed due to the following error: 80131051. I can't really provide direct code examples, due to internal security implications; but all the code itself seems to work, I am suspecting perms or something of the like... I just find it odd that I can't find any reference to error 80131051. If someone out there believe some 'indirect' code samples will help, I will be happy to provide. Any assistance is appreciated.

    Read the article

  • Binding to a WPF hosted control's DependencyProperty in WinForms

    - by Reddog
    I have a WinForms app with some elements that are hosted WPF user controls (using ElementHost). I want to be able to bind my WinForm's control property (Button.Enabled) to a custom DependencyProperty of the hosted WPF user control (SearchResults.IsAccountSelected). Is it possible to bind a System.Windows.Forms.Binding to a property managed by a DependencyProperty? Also, since I know the System.Windows.Forms.Binding watches for INotifyPropertyChanged.PropertyChanged events - will a property backed by a DependencyProperty automatically fire these events or will I have to implement and manage the sending of PropertyChanged events manually?

    Read the article

  • Why is WPFToolkit DataGrid so slow when binding?

    - by Schneider
    I have a very simple test application where I have two objects, each with a small collection of items. when I select an object I display its collection in a WPFToolkit DataGrid. The problem is there is a noticeable delay, such that if you press up/down keys to toggle selection between objects you can see it can't keep up. Why is the performance so bad? <Window x:Class="SlowGridBinding.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" Title="MainWindow" Height="350" Width="525"> <StackPanel> <ListBox ItemsSource="{Binding Shops}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True"/> <Controls:DataGrid ItemsSource="{Binding Shops/Vegetables}" AutoGenerateColumns="True"/> </StackPanel> The DataContext is populated with some test classes filled with 50 items of random test data.

    Read the article

  • Ninject Contextual Binding: Where do I get Ninject.Conditions.dll

    - by Twisted
    I've read about ninjects contextual binding here : http://ninject.codeplex.com/wikipage?title=Contextual%20Binding and am trying to get it working in my project. The docs state that I need to add a reference to Ninject.Conditions.Dll which I do not have. Does anybody know where to get this? I've tried over at github : https://github.com/ninject/ninject I used the download link to get the 2.0.1.0 sources and managed to build them but no dll. I found a similar question here : Where can I find ninject.web.mvc.dll? and an answer with a link to a build server. I followed the link and I get a login request for team city. I don't have an account.

    Read the article

  • Connecting to a WCF Service in PHP that has a a NetTCP Binding and a BasicHttpBinding

    - by Justin Dearing
    I have a WCF service. It has multiple clients and three endpoints. The endpoint bindings are nettcp, wsHttp and basicHttp. If I attempt to connect to it via php'd builtin SoapClient class like so: $service = new SoapClient ("http://service.companyname.local:6666/Service/?wsdl", array( "location" => "http://service.companyname.local:6666/Service/Basic", "trace" => true, 'soap_version' => SOAP_1_1 ) ); I get the following: PHP Fatal error: SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://schemas.microsoft.com/soap/tcp' in c:\www\client.php on line 666 Right now my workaround is to save the wsdl manually and remove the nettcp binding. Is there a workaround that will allow me to use the automatically generated wsdl? Can I hide a binding from the wsdl in web.config? Can I generate different wsdls on different bindings. I don't want to deploy two service hosts.

    Read the article

  • Binding to NSTextField Cell not working, edited value resets to default

    - by cygnus6320
    I'm working on a Core Data document application that dynamically creates NSTableColumns. The data cell type may be a checkbox, slider, etc. Programmatically binding to all cell types works, except for NSTextFieldCell. All NSTextFieldCells fail to bind, and after editing they return to their default value. This happens no matter if they're binding to a string, a number (with an NSNumberFormatter applied), or a date (NSDateFormatter applied). I'm using the following format to do all bindings: NSDictionary *textFieldOpts = [NSDictionary dictionaryWithObjectsAndKeys:@"YES", NSContinuouslyUpdatesValueBindingOption, @"YES", NSValidatesImmediatelyBindingOption, nil]; [aCell bind:@"value" toObject:[[entryAC arrangedObjects] objectAtIndex:0] withKeyPath:@"numberData" options:textFieldOpts]; Again, these statements work if the cell type is anything but an NSTextFieldCell. I threw in an observeValueForKeyPath method to log when the value changes... and for other cell types (NSSliderCell for instance) I can see the value changing, but with the NSTextFieldCell, it never, ever updates. Help!

    Read the article

  • Why not allow mutation of the this binding?

    - by gnucom
    Hi Everyone, I'm building a interpreter/compiler for a school project (well now its turning into a hobby project) and an instructor warned me not to allow mutation of the 'this' binding (he said it was gross and made a huge deal about it) but I never learned why this is so... dangerous or bad. I'm very curious about why this is so bad. I figured this sort of feature could be useful in some way or another. I'm wondering if anyone familiar with building languages can tell me what sort of problems mutation on the 'this' binding can cause, and if they know of any cool or useful tricks that one could do if it actually was allowed. Do any languages that you're aware of allow mutation of 'this'? Thanks,

    Read the article

  • Change the null placeholder in a Cocoa binding?

    - by Monolo
    Is there a way to change (for the purpose of localization) the null placeholder in a binding in Cocoa? The bindings are set up in Interface Builder for a popup button. The two-way nature of the bindings as set up in IB is needed, so doing it programmatically is not really appealing. I am aware that the standard way of handling localizations of a nib file is by making one for each language, but since this is the only difference in the whole nib file between the language versions, it seems a bit excessive for a single string. If there is a way to modify a binding created in IB, I was thinning about doing it in the file's owner's awakeFromNib method.

    Read the article

  • Binding Silverlight UserControl custom properties to its' elements

    - by ghostskunks
    Hi. I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'. I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its' number. The content control probably be a TextBox, while label control could be a TextBlock. So I created a UserControl with this basic structure (the values are hardcoded at this stage): <UserControl x:Class="XWord.Square" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" FontSize="30" Width="100" Height="100"> <Grid x:Name="LayoutRoot" Background="White"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <TextBlock x:Name="Label" Grid.Row="0" Grid.Column="1" Text="7"/> <TextBox x:Name="Content" Grid.Row="1" Grid.Column="0" Text="A" BorderThickness="0" /> </Grid> </UserControl> I've also created DependencyProperties in the Square class like this: public static readonly DependencyProperty LabelTextProperty; public static readonly DependencyProperty ContentCharacterProperty; // ...(static constructor with property registration, .NET properties // omitted for brevity)... Now I'd like to figure out how to bind the Label and Content element to the two properties. I do it like this (in the code-behind file): Label.SetBinding( TextBlock.TextProperty, new Binding { Source = this, Path = new PropertyPath( "LabelText" ), Mode = BindingMode.OneWay } ); Content.SetBinding( TextBox.TextProperty, new Binding { Source = this, Path = new PropertyPath( "ContentCharacter" ), Mode = BindingMode.TwoWay } ); That would be more elegant done in XAML. Does anyone know how that's done?

    Read the article

  • Current ways to do data binding in .NET 3.5 with C# 3.0 and WinForms

    - by kryptic
    Hello Everyone, I have an existing C# 3.0 WinForms project with .NET 3.5 that talks to a MySQL database. I would like to use data binding (I'm new to this, so I've been doing all of the UI updates manually) to simplify things. I followed a link from this question to this article which mentions using a DataSet but also follows up with "my view on this topic is strongly in favor of Business Objects." Also that was with .NET 2.0. What are the current methods to use data binding with a WinForms application? What are their advantages in terms of simplicity, how much additional code is necessary, etc. For reference, I use an ORM approach to build objects with public properties from a database. I want to map these properties for each object onto UI elements like TextBoxes. There could be many properties for an object so I want to simplify the code to do this.

    Read the article

  • WPF ListView Data Binding wont synchronize

    - by Aviatrix
    my listview will display only the item that its added by the constructor and it wont add the items that i add dynamically public class PostList : ObservableCollection<PostData> { public PostList() : base() { Add(new PostData("Isak", "Dinesen")); // Add(new PostData("Victor", "Hugo")); // Add(new PostData("Jules", "Verne")); } public void AddToList (string[] data){ string username2, msg; msg = data[0]; username2 = data[1]; Add(new PostData(msg, username2)); } } public class PostData { private string Username; private string Msg; private string Avatar; private string LinkAttached; private string PicAttached; private string VideoAttached; public PostData(string msg ,string username, string avatar=null, string link=null,string pic=null ,string video=null) { this.Username = username; this.Msg = msg; this.Avatar = avatar; this.LinkAttached = link; this.PicAttached = pic; this.VideoAttached = video; } public string pMsg { get { return Msg; } set { Msg = value; } } public string pUsername { get { return Username; } set { Username = value; } } ..... ..... } Xaml <ListView x:Name="PostListView" BorderThickness="0" MinHeight="300" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" VerticalContentAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" IsSynchronizedWithCurrentItem="True" MinWidth="332" SelectedIndex="0" SelectionMode="Extended" AlternationCount="1" ItemsSource="{Binding Source={StaticResource PostListData}}"> <ListView.ItemTemplate> <DataTemplate> <DockPanel x:Name="SinglePost" VerticalAlignment="Top" ScrollViewer.CanContentScroll="True" ClipToBounds="True" Width="333" Height="70" d:LayoutOverrides="VerticalAlignment" d:IsEffectDisabled="True"> <StackPanel x:Name="AvatarNickHolder" Width="60"> <Label x:Name="Nick" HorizontalAlignment="Center" Margin="5,0" VerticalAlignment="Top" Height="15" Content="{Binding Path=pUsername}" FontFamily="Arial" FontSize="10.667" Padding="5,0"/> <Image x:Name="Avatar" HorizontalAlignment="Center" Margin="5,0,5,5" VerticalAlignment="Top" Width="50" Height="50" IsHitTestVisible="False" Source="1045443356IMG_0972.jpg" Stretch="UniformToFill"/> </StackPanel> <TextBlock x:Name="userPostText" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="10.667" Text="{Binding Path=pMsg}" TextWrapping="Wrap"/> </DockPanel> </DataTemplate> </ListView.ItemTemplate> </ListView>

    Read the article

  • Binding scattered/overlapping images to a WPF Canvas

    - by bufferz
    I am porting a GDI application over to WPF, where I displayed several dozen images onto Form, then drew polygons, circles, rectangles, etc over the top of these images using GDI Pens and Brushes. I'm starting to get the hang of WPF binding and would like to store all of these images and markup graphics in my ViewModel. My VM contains an ObservableCollection of my custom DrawingEntitys, DrawingEntity contains DependencyProperties for BitmapSource, Height, Width, CanvasTopLeftY, and CanvasTopLeftX, that I update frequently in the collection. I know my binding is working, I just can't figure out how to bind and draw this collection onto a Canvas. I've played around with ItemsControl and ItemsSource to death, too many different ways to list here. I can display the DrawingEntity.Bitmaps onto the canvas but Canvas.Top won't bind to CanvasTopLeftY in the DrawingEntity, everything is overlapped at 0,0. I think I'm missing an obvious strategy. Any ideas?

    Read the article

  • WPF Binding Collection To ComboBox and Selecting an item

    - by Adam Driscoll
    I've been knocking my head against this for some time now. I'm not really sure why it isn't working. I'm still pretty new to this whole WPF business. Here's my XAML for the combobox <ComboBox Width="200" SelectedValuePath="Type.FullName" SelectedItem="{Binding Path=Type}" Name="cmoBox" > </ComboBox> Here's what populates the ComboBox (myAssembly is a class I created with a list of possible types) cmoBox.ItemsSource = myAssembly.PossibleTypes; I set the DataContext in a parent element of the ComboBox in the code behind like this: groupBox.DataContext = listBox.SelectedItem; I want the binding to select the correct "possible type" from the combo box. It doesn't select anything. I have tried SelectedValue and SelectedItem. When I changed the DisplayMemberPath of the ComboBox to a different property it changed what was displayed so I know it's not completely broken. Any ideas???

    Read the article

  • Binding the property to a control defined inside a listboxitem template

    - by Malcolm
    I have a class called ledgerObject : public class LedgerObject { public ChargeLine ChargeLine{ get; set; } public DelegateCommand Click_hyperbnCommand{ get; private set; } public LedgerObject() { this.Click_hyperbnCommand = new DelegateCommand(click_btn); } private void click_btn(object args) { } } The chargeLine which is the property of this class is itself a class and has some properties in it. So I am binding the datacontext of a listbox to an array of LedgerObject, and I want to bind the textblock control defined inside a listboxitem template to the property of a ChargeLine. Any idea or suggestion will help. I have tried this but not working: <TextBlock Margin="4 0 4 0" Grid.Column="3" Text="{Binding Path=ChargeLine.SimCode}" TextDecorations="Underline" Foreground="Red" />

    Read the article

  • ToolStripComboBox.SelectedItem change does not propagate to binding source

    - by Marius
    My binding is set up as this: _selectXAxisUnitViewModelBindingSource = new BindingSource(); _selectXAxisUnitViewModelBindingSource.DataSource = typeof(SelectXAxisUnitViewModel); _selectedUnitComboBoxBindingSource = new BindingSource(); _selectedUnitComboBoxBindingSource.DataSource = _selectXAxisUnitViewModelBindingSource; _selectedUnitComboBoxBindingSource.DataMember = "AvailableUnits"; _selectedUnitComboBox.ComboBox.DataSource = _selectedUnitComboBoxBindingSource; _selectedUnitComboBox.ComboBox.DisplayMember = String.Empty; _selectedUnitComboBox.ComboBox.ValueMember = String.Empty; _selectedUnitComboBox.ComboBox.DataBindings.Add("SelectedItem", _selectXAxisUnitViewModelBindingSource, "SelectedUnit", true, DataSourceUpdateMode.OnPropertyChanged); // this is a bug in the .Net framework: http://connect.microsoft.com/VisualStudio/feedback/details/473777/toolstripcombobox-nested-on-toolstripdropdownbutton-not-getting-bindingcontext _selectedUnitComboBox.ComboBox.BindingContext = this.BindingContext; The property "AvailableUnits" is a collection of strings and the "SelectedUnit" is a string-property. Now the dropdown list is populated as expected, but when I select and item in the list, the change is not propagated to the binding source. Any idea what I am doing wrong?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >