Search Results

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

Page 22/180 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Beginner question: What is binding?

    - by JDelage
    Hi, I was trying to understand the difference between early and late binding, and in the process realized that the concept of binding is nebulous to me. I think I understand that it relates to the way data-as-a-word-of-memory is linked to type-as-a-set-of-language-features but I am not sure those are the right concepts. Also, how does understanding this deeply help people become better programmers? Please note: This question is not "what is late v. early binding" or "what are the trade-offs between the 2". Those already exist here. Thanks, JDelage

    Read the article

  • asp.net mvc custom model binding in an update entity scenario

    - by mctayl
    Hi I have a question about model binding. Imagine you have an existing database entity displayed in a form and you'd like to edit some details, some properties eg createddate etc are not bound to the form, during model binding, these properties are not assigned to the model as they are not on the http post data or querystrong etc, hence their properties are null. In my controller method for update , Id just like to do public ActionResult Update( Entity ent) { //Save changes to db } but as some properties are null in ent, they override the existing database fields which are not part of the form post data, What is the correct way to handle this? Ive tried hidden fields to hold the data, but model binding does not seem to assign hidden fields to the model. Any suggestions would be appreciated

    Read the article

  • Silverlight Binding: User controls inside datagrid.

    - by Eric
    I have a DataGrid in my silverlight app that has a few columns. A couple basic columns bound with no issues. One column has a UserControl in it and the XAML is as follows: <data:DataGridTemplateColumn Header="" CanUserSort="True" Width="107"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <local:StaticPageEnlistment EnlistmentName="{Binding SiteName}" Width="400" Height="150"/> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> </data:DataGridTemplateColumn> So I have a public property that's a string called EnlistmentName that I have bound to the SiteName value. I use this same "{Binding SiteName}" in all my other colums with no issues, why can't the user control accept the same binding string?

    Read the article

  • WPF textblock binding question.

    - by the empirical programmer
    I'm trying to get my head around the whole MVVM thing and binding. I have a ViewModel class which has a property that is another class. I want to bind to a (string) property of that class to the text of a textblock. I set the ViewModel as my data context for my window\page. And then do this: <TextBlock Text="{Binding ElementName=myAddressClass, Path=StreetName}" /> But this does not work. The text is empty. I can expose the StreetName directly as below and this works: <TextBlock Text="{Binding Path=StreetName}" /> So am I doing something wrong in the first example. It seems simple enough ... am I just confuse about what an elementname is or should be set to? thanks

    Read the article

  • How do you escape parentheses in a Binding indexer

    - by Chris S
    I have the following XAML: <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource MyDataKey}}"> <TextBox Name="_myId" Text="{Binding MyDictionary[(Textbox.Name)]" /> </Grid> But it thinks the key in my dictionary is called "(Textbox.Name)", instead of "_myId". The format below works, where I have a property in my class called "_myId": <TextBox Name="_myId" Text="{Binding (Textbox.Name)" /> I've tried using ^ and \ to escape the brackets. Is this syntax supported? I'm trying to avoid duplication of the name in two attributes.

    Read the article

  • Programmatic binding in Silverlight

    - by MojoFilter
    I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help. When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is running. The declarative bindings from my xaml seem ok, but I'm doing something wrong when I create my bindings in C#. I'm hoping that there is something blindingly obvious I'm missing. Here's a typical binding that gets crushed: TextBlock tb = new TextBlock(); Binding b = new Binding("FontSize"); b.Source = this; tb.SetBinding(TextBlock.FontSizeProperty, b);

    Read the article

  • Binding to an XElement

    - by twreid
    I need help binding to an XElement. Basically I am making a editor for certain elements in a web.config and I extract them as XElements and my View binds to a Collection of DataItems which has a property that contains my XElement. When I do Text="{Binding Path=Data, Mode=OneWay, NotifyOnSourceUpdated=True}"/> I get all the text of the Element, but If I try Text="{Binding Path=Data.Elements[], Mode=OneWay, NotifyOnSourceUpdated=True}"/> It doesn't work the TextBox is empty. I am trying to find a way to Template different sections dynamically to make them easier to edit instead of editing raw XMl.

    Read the article

  • JBoss: Adding a New Binding for a New Service

    - by mlaverd
    Hello, Warning: I'm a J2EE newbie. I have a server application that receives TLS connections containing Protocol Buffers messages. I'd like to port it to J2EE to take advantage of all its powerful features. Is there a way to add a binding that would have TLS enabled and would speak to my piece of code for interpreting and handling the request's data? If so, how? Thanks in advance!

    Read the article

  • Horrorble performance using ListViews with nested objects in WPF

    - by Christian
    Hi community, like mentioned in the title I get a horrible performance if I use ListViews with nested objects. My scenario is: Each row of a ListView presents an object of the class Transaction with following attributes: private int mTransactionID; private IBTTransactionSender mSender; private IBTTransactionReceiver mReceiver; private BTSubstrate mSubstrate; private double mAmount; private string mDeliveryNote; private string mNote; private DateTime mTransactionDate; private DateTime mCreationTimestamp; private BTEmployee mEmployee; private bool mImported; private bool mDescendedFromRecurringTransaction; Each attribute can be accessed by its corresponding property. An ObservableCollection<Transaction> is bound to the ItemsSource of a ListView. The ListView itself looks like the following: </ListView.GroupStyle> <ListView.View> <GridView> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.ToSave" Width="80"> <GridViewColumnHeader Name="GVCHLoadedToSave" Style="{StaticResource ListViewHeaderStyle}">Speichern</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <CheckBox Name="CBListViewItem" IsChecked="{Binding Path=Transaction.ToSave, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></CheckBox> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.TransactionDate" Width="80"> <GridViewColumnHeader Name="GVCHLoadedDate" Style="{StaticResource ListViewHeaderStyle}">Datum</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding ElementName=DPDate, Path=Text}" Style="{StaticResource GridBlockStyle}"/> <toolkit:DatePicker Name="DPDate" Width="{Binding ElementName=GVCHDate, Path=ActualWidth}" SelectedDateFormat="Short" Style="{StaticResource GridEditStyle}" SelectedDate="{Binding Path=Transaction.TransactionDate, Mode=TwoWay}" SelectedDateChanged="DPDate_SelectedDateChanged"/> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Sender.Description" Width="120"> <GridViewColumnHeader Name="GVCHLoadedSender" Style="{StaticResource ListViewHeaderStyle}">Von</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Sender.Description}" Style="{StaticResource GridBlockStyle}"/> <ComboBox Name="CBSender" Width="{Binding ElementName=GVCHSender, Path=ActualWidth}" SelectedItem="{Binding Path=Transaction.Sender}" DisplayMemberPath="Description" Text="{Binding Path=Sender.Description, Mode=OneWay}" ItemsSource="{Binding ElementName=Transaction, Path=SenderList}" Style="{StaticResource GridEditStyle}"> </ComboBox> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Receiver.Description" Width="120"> <GridViewColumnHeader Name="GVCHLoadedReceiver" Style="{StaticResource ListViewHeaderStyle}">Nach</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Receiver.Description}" Style="{StaticResource GridBlockStyle}"/> <ComboBox Name="CBReceiver" Width="{Binding ElementName=GVCHReceiver, Path=ActualWidth}" SelectedItem="{Binding Path=Transaction.Receiver}" DisplayMemberPath="Description" Text="{Binding Path=Receiver.Description, Mode=OneWay}" ItemsSource="{Binding ElementName=Transaction, Path=ReceiverList}" Style="{StaticResource GridEditStyle}"> </ComboBox> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Substrate.Description" Width="140"> <GridViewColumnHeader Name="GVCHLoadedSubstrate" Style="{StaticResource ListViewHeaderStyle}">Substrat</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Substrate.Description}" Style="{StaticResource GridBlockStyle}"/> <ComboBox Name="CBSubstrate" Width="{Binding ElementName=GVCHSubstrate, Path=ActualWidth}" SelectedItem="{Binding Path=Transaction.Substrate}" DisplayMemberPath="Description" Text="{Binding Path=Substrate.Description, Mode=OneWay}" ItemsSource="{Binding ElementName=Transaction, Path=SubstrateList}" Style="{StaticResource GridEditStyle}"> </ComboBox> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Amount" Width="80"> <GridViewColumnHeader Name="GVCHLoadedAmount" Style="{StaticResource ListViewHeaderStyle}">Menge [kg]</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Amount}" Style="{StaticResource GridBlockStyle}"/> <TextBox Name="TBAmount" Text="{Binding Path=Transaction.Amount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="{Binding ElementName=GVCHAmount, Path=ActualWidth}" Style="{StaticResource GridTextBoxStyle}" /> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.DeliveryNote" Width="100"> <GridViewColumnHeader Name="GVCHLoadedDeliveryNote" Style="{StaticResource ListViewHeaderStyle}">Lieferschein Nr.</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.DeliveryNote}" Style="{StaticResource GridBlockStyle}"/> <TextBox Name="TBDeliveryNote" Text="{Binding Path=Transaction.DeliveryNote, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="{Binding ElementName=GVCHDeliveryNote, Path=ActualWidth}" Style="{StaticResource GridEditStyle}" /> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Note" Width="190"> <GridViewColumnHeader Name="GVCHLoadedNote" Style="{StaticResource ListViewHeaderStyle}">Bemerkung</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Note}" Style="{StaticResource GridBlockStyle}"/> <TextBox Name="TBNote" Text="{Binding Path=Transaction.Note, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="{Binding ElementName=GVCHNote, Path=ActualWidth}" Style="{StaticResource GridEditStyle}" /> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn core:SortableListView.SortPropertyName="Transaction.Employee.LastName" Width="100"> <GridViewColumnHeader Name="GVCHLoadedEmployee" Style="{StaticResource ListViewHeaderStyle}">Mitarbeiter</GridViewColumnHeader> <GridViewColumn.CellTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Path=Transaction.Employee.LastName}" Style="{StaticResource GridBlockStyle}"/> <ComboBox Name="CBEmployee" Width="{Binding ElementName=GVCHEmployee, Path=ActualWidth}" SelectedItem="{Binding Path=Transaction.Employee}" DisplayMemberPath="LastName" Text="{Binding Path=Employee.LastName, Mode=OneWay}" ItemsSource="{Binding ElementName=Transaction, Path=EmployeeList}" Style="{StaticResource GridEditStyle}"> </ComboBox> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> As you can see in the screenshot the user got the possibility to change the values of the transaction attributes with comboboxes. Ok now to my problem. If I click on the "Laden" button the application will load about 150 entries in the ObservableCollection<Transaction>. Before I fill the collection I set the ItemsSource of the ListView to null and after filling I bind the collection to the ItemsSource once again. The loading itself takes a few milliseconds, but the rendering of the filled collection takes a long time (150 entries = about 20 sec). I tested to delete all Comboboxes out of the xaml and i got a better performance, because I don't have to fill the ComboBoxes for each row. But I need to have these comboboxes for modifing the attributes of the Transaction. Does anybody know how to improve the performance? THX

    Read the article

  • How to read from path in wpf comboboxitem and write into path of binding

    - by Chrik
    Hi, I tried to make up an example to show my problem. My combobox has a list of objects as itemssource. In my example it's a list of Persons. In the combobox i want to show the first name and the last name of the person. But i want to save the last name of the person in the "owner" property of the house-object. My guess was that i bind the SelectedValue to my property and the SelectedValuePath to the name of the property in the comboboxitem. I already googled and tried a view other versions but nothing worked. If i use SelectedItem instead of SelectedValue with the same binding at least the value of the "tostring" function get's written in the property. Sadly that solution doesn't fit in the Rest of my Program because i don't want to override "ToString". The Xaml: <Window x:Class="MultiColumnCombobox.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" x:Name="window"> <Grid> <ComboBox Height="23" Margin="72,12,86,0" Name="ComboBox1" VerticalAlignment="Top" SelectedValue="{Binding CurrentHouse.Owner, ElementName=window, Mode=TwoWay}" SelectedValuePath="LastName" ItemsSource="{Binding PersonList, ElementName=window, Mode=Default}"> <ComboBox.ItemTemplate> <DataTemplate> <WrapPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=FirstName}" Padding="10,0,0,0" /> <TextBlock Text="{Binding Path=LastName}" Padding="10,0,0,0" /> </WrapPanel> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> <Button Height="23" Click="PrintButton_Click" HorizontalAlignment="Left" Margin="12,0,0,9" Name="PrintButton" VerticalAlignment="Bottom" Width="75">Print</Button> </Grid> The C# using System.Collections.Generic; using System.Windows; using System; namespace MultiColumnCombobox { public partial class Window1 : Window { private List _PersonList = new List(); public List PersonList { get { return _PersonList; } set { _PersonList = value; } } private House _CurrentHouse = new House { Owner = "Green", Number = "11" }; public House CurrentHouse { get { return _CurrentHouse; } } public Window1() { InitializeComponent(); PersonList.Add(new Person {FirstName = "Peter", LastName = "Smith"}); PersonList.Add(new Person {FirstName = "John", LastName = "Meyer"}); PersonList.Add(new Person {FirstName = "Fritz", LastName = "Green"}); } private void PrintButton_Click(object sender, RoutedEventArgs e) { MessageBox.Show(CurrentHouse.Owner + ":" + CurrentHouse.Number); } } public class House { public string Owner { get; set; } public string Number { get; set; } } public class Person { public string FirstName { get; set; } public string LastName { get; set; } } } Maybe someone has an idea, Christian

    Read the article

  • Powershell IIS7 Snap in Assign SSL certificate to https binding

    - by El Bauldo
    As part of our automated build procedure we are trashing and reconstructing our IIS site with powershell scripts. Once i have created the AppPool and the website complete with binding information I want to set the SSL certificate for the https binding. I can't find any concrete examples onl;ine anywhere that demonstrate this. Any ideas? Looking for a benevolent powershell god...

    Read the article

  • WPF DataGrid and Avalon TimePicker binding problem

    - by Jorge Vargas
    I'm using a the WPF DataGrid from the wpf toolkit and a TimePicker from AvalonControlsLibrary to insert a collection of TimeSpans. My problem is that bindings are not working inside the DataGrid, and I have no clue of why this isn't working. Here is my setup: I have the following XAML: <Window x:Class="Views.TestMainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpf="http://schemas.microsoft.com/wpf/2008/toolkit" xmlns:a="http://schemas.AvalonControls/AvalonControlsLibrary/Controls" SizeToContent="WidthAndHeight" MinHeight="250" MinWidth="300"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <GroupBox Grid.Row="0"> <GroupBox.Header> Testing it: </GroupBox.Header> <wpf:DataGrid ItemsSource="{Binding Path=TestSpans}" AutoGenerateColumns="False"> <wpf:DataGrid.Columns> <wpf:DataGridTemplateColumn Header="Start"> <wpf:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <a:TimePicker SelectedTime="{Binding Path=., Mode=TwoWay}" /> </DataTemplate> </wpf:DataGridTemplateColumn.CellEditingTemplate> <wpf:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding}" /> </DataTemplate> </wpf:DataGridTemplateColumn.CellTemplate> </wpf:DataGridTemplateColumn> </wpf:DataGrid.Columns> </wpf:DataGrid> </GroupBox> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1"> <a:TimePicker SelectedTime="{Binding Path=SelectedTime, Mode=TwoWay}" /> </StackPanel> </Grid> And this is my ViewModel: Imports System.Collections.ObjectModel Namespace ViewModels Public Class TestMainWindowViewModel Private _selectedTime As TimeSpan = DateTime.Now.TimeOfDay Public Property SelectedTime() As TimeSpan Get Return _selectedTime End Get Set(ByVal value As TimeSpan) _selectedTime = value End Set End Property Private _testSpans As ObservableCollection(Of TimeSpan) = New ObservableCollection(Of TimeSpan) Public Property TestSpans() As ObservableCollection(Of TimeSpan) Get Return _testSpans End Get Set(ByVal value As ObservableCollection(Of TimeSpan)) _testSpans = value End Set End Property Public Sub New() _testSpans.Add(DateTime.Now.TimeOfDay) _testSpans.Add(DateTime.Now.TimeOfDay) _testSpans.Add(DateTime.Now.TimeOfDay) End Sub End Class End Namespace I'm starting this window in application.xaml.vb like this: Class Application ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException ' can be handled in this file. Protected Overrides Sub OnStartup(ByVal e As System.Windows.StartupEventArgs) MyBase.OnStartup(e) Dim window As Views.TestMainWindow = New Views.TestMainWindow window.DataContext = New TestMainWindowViewModel() window.Show() End Sub End Class

    Read the article

  • Binding to a dictionary in Silverlight with INotifyPropertyChanged

    - by rip
    In silverlight, I can not get INotifyPropertyChanged to work like I want it to when binding to a dictionary. In the example below, the page binds to the dictionary okay but when I change the content of one of the textboxes the CustomProperties property setter is not called. The CustomProperties property setter is only called when CustomProperties is set and not when the values within it are set. I am trying to do some validation on the dictionary values and so am looking to run some code when each value within the dictionary is changed. Is there anything I can do here? C# public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); MyEntity ent = new MyEntity(); ent.CustomProperties.Add("Title", "Mr"); ent.CustomProperties.Add("FirstName", "John"); ent.CustomProperties.Add("Name", "Smith"); this.DataContext = ent; } } public class MyEntity : INotifyPropertyChanged { public event PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged; public delegate void PropertyChangedEventHandler(object sender, System.ComponentModel.PropertyChangedEventArgs e); private Dictionary<string, object> _customProps; public Dictionary<string, object> CustomProperties { get { if (_customProps == null) { _customProps = new Dictionary<string, object>(); } return _customProps; } set { _customProps = value; if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("CustomProperties")); } } } } VB Partial Public Class MainPage Inherits UserControl Public Sub New() InitializeComponent() Dim ent As New MyEntity ent.CustomProperties.Add("Title", "Mr") ent.CustomProperties.Add("FirstName", "John") ent.CustomProperties.Add("Name", "Smith") Me.DataContext = ent End Sub End Class Public Class MyEntity Implements INotifyPropertyChanged Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged Private _customProps As Dictionary(Of String, Object) Public Property CustomProperties As Dictionary(Of String, Object) Get If _customProps Is Nothing Then _customProps = New Dictionary(Of String, Object) End If Return _customProps End Get Set(ByVal value As Dictionary(Of String, Object)) _customProps = value RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("CustomProperties")) End Set End Property End Class Xaml <TextBox Height="23" Name="TextBox1" Text="{Binding Path=CustomProperties[Title], Mode=TwoWay}" /> <TextBox Height="23" Name="TextBox2" Text="{Binding Path=CustomProperties[FirstName], Mode=TwoWay}" /> <TextBox Height="23" Name="TextBox3" Text="{Binding Path=CustomProperties[Name], Mode=TwoWay}" />

    Read the article

  • WPF: Binding to commands in code behind

    - by sofri
    Hi, I have an WPF Microsoft Surface Applikation and I'm using MVVM-Pattern. I have some buttons that are created in code behind. And I would like to bind commands to them but I only know how that works in the XAML like this: <Custom:SurfaceButton Command="{Binding SaveReservationCommandBinding, Mode=OneWay}"/> But I cannot do it like this because my buttons do not exist in the XAML, only in the code behind. So how would a command binding like that works in code behind?

    Read the article

  • C# WCF client configuration for X509 secured web service over https

    - by Kam
    Hi guys I been pulling my hair out for the past few days trying to connect to a web service using .Net 3.5 and WCF (have also tried using WSE 3.0) without much luck. The web service is hosted by a 3rd party and we can access via https. They also make use of X509 certificates for security, to sign the message. I've been given some basic info and am able to connect and test the service using SOAP UI 3.5 without any problems, so we know that this is not the issue. Just trying to get it done in code! I've added the X509 certificate into the certificate store using the mmc snap-in, and using tracing and logging i can see that the message is being signed, just unable to see which part i have got wrong. Any healp GREATLY appreciated :) I've been given an offline WSDL file, which I have imported in as a service reference is VS 2008. My calling code looks like so, simple enough: ServicePointManager.ServerCertificateValidationCallback = delegate(object sender,X509Certificate certificate,X509Chain chain, SslPolicyErrors sslErrors) { return true; }; GatewayClient gateway = new GatewayClient(); CheckStatusResponse response = gateway.CheckLineStatus(); And my config looks like so: <basicHttpBinding> <binding name="Gateway_1.0" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="Certificate" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> <customBinding> <binding name="Gateway_1"> <security authenticationMode="CertificateOverTransport" includeTimestamp="true" messageProtectionOrder="SignBeforeEncrypt"> <localClientSettings maxClockSkew="12:00:00" replayWindow="12:00:00" sessionKeyRolloverInterval="12:00:00" timestampValidityDuration="12:00:00" /> <localServiceSettings maxClockSkew="12:00:00" sessionKeyRolloverInterval="12:00:00" timestampValidityDuration="12:00:00" /> <secureConversationBootstrap /> </security> <textMessageEncoding messageVersion="Soap11" /> <sslStreamSecurity requireClientCertificate="true" /> <httpsTransport hostNameComparisonMode="WeakWildcard" /> </binding> </customBinding> <wsHttpBinding> <binding name="Gateway_1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <security mode="TransportWithMessageCredential"> <message clientCredentialType="Certificate" negotiateServiceCredential="false" establishSecurityContext="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://XXX.XX.XXX.XX/SOAP" behaviorConfiguration="ClientCertificateBehavior" binding="wsHttpBinding" bindingConfiguration="Gateway_1" contract="B2BService.Gateway" name="Gateway_1_HTTPSPort"> <identity> <dns value="ext.test.com" /> </identity> </endpoint> </client> <behaviors> <endpointBehaviors> <behavior name="ClientCertificateBehavior"> <clientCredentials> <clientCertificate findValue="mycertificate.com" storeLocation="CurrentUser" storeName="Root" x509FindType="FindBySubjectName" /> <serviceCertificate> <authentication certificateValidationMode="PeerOrChainTrust" /> </serviceCertificate> </clientCredentials> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> Regardless of which config I use, the code fails for one reason or another, causing internal server errors, Error processing message for security, Undefined 'badEncoding' resource property, or expected http URI given https, and a few other! Been going round and round a bit, and I am sure it is very simple once the cofig is set :( I'm sure I've missed loads out, let me know if seeing the SOAP UI generated envelope and the currect WCF generated envelope will help. many thanks. Kam

    Read the article

  • Two way binding settings problem.

    - by Jamie
    Hi, I am having a problem using two way binding with a listpicker. I am able to set the value using c# but not in the SelectedItem=".." in xaml. The binding is returning the correct value (and is a value in the listpicker) as i have texted it by assigning the text to a textblock. When the page loads, the binding used on the listpicker causes a System.ArgumentOutOfRangeException The code i am using to set it is: // Update a setting value. If the setting does not exist, add the setting. public bool AddOrUpdateValue(string key, Object value) { bool valueChanged = false; try { // If new value is different, set the new value if (settingsStorage[key] != value) { settingsStorage[key] = value; valueChanged = true; } } catch (KeyNotFoundException) { settingsStorage.Add(key, value); valueChanged = true; } catch (ArgumentException) { settingsStorage.Add(key, value); valueChanged = true; } catch (Exception e) { Console.WriteLine("Exception occured whilst using IsolatedStorageSettings: " + e.ToString()); } return valueChanged; } // Get the current value of the setting, if not found, set the setting to default value. public valueType GetValueOrDefault<valueType>(string key, valueType defaultValue) { valueType value; try { value = (valueType)settingsStorage[key]; } catch (KeyNotFoundException) { value = defaultValue; } catch (ArgumentException) { value = defaultValue; } return value; } public string WeekBeginsSetting { get { return GetValueOrDefault<string>(WeekBeginsSettingKeyName, WeekBeginsSettingDefault); } set { AddOrUpdateValue(WeekBeginsSettingKeyName, value); Save(); } } And in the xaml: <toolkit:ListPicker x:Name="WeekStartDay" Header="Week begins on" SelectedItem="{Binding Source={StaticResource AppSettings}, Path=WeekBeginsSetting, Mode=TwoWay}"> <sys:String>monday</sys:String> <sys:String>sunday</sys:String> </toolkit:ListPicker> The StaticResource AppSettings is a resource from a seperate .cs file. <phone:PhoneApplicationPage.Resources> <local:ApplicationSettings x:Key="AppSettings"></local:ApplicationSettings> </phone:PhoneApplicationPage.Resources> Thanks in advance

    Read the article

  • In Haskell, what does it mean if a binding "shadows an existing binding"?

    - by Alistair
    I'm getting a warning from GHC when I compile: Warning: This binding for 'pats' shadows an existing binding in the definition of 'match_ignore_ancs' Here's the function: match_ignore_ancs (TextPat _ c) (Text t) = c t match_ignore_ancs (TextPat _ _) (Element _ _ _) = False match_ignore_ancs (ElemPat _ _ _) (Text t) = False match_ignore_ancs (ElemPat _ c pats) (Element t avs xs) = c t avs && match_pats pats xs Any idea what this means and how I can fix it? Cheers.

    Read the article

  • Get textbox binding in wpf datagridtemplatecolumn

    - by klawusel
    Hi I have a wpf datagrid containing multiple datagridtemplatecolumns, which all are build up from a datatemplate which contains a textbox. Now I want to get the binding of the textbox (I have a reference to the template column which textbox's binding I woukld like to determine). Alternatively it would be nice to return the X:Name of the template column Any hints? Regards klaus

    Read the article

  • WPF Inner Property Binding not updating.

    - by Matthew Kruskamp
    I have an INotifyProperty item that I have bound to a wpf control. <local:ScrollingSelector DataContext="{Binding Path=SelectedScreen.VisualizationTypes}" Grid.ColumnSpan="2" Grid.Column="3" Margin="0,0,0,0" Grid.Row="1"/> If I change the SelectedScreen property to a different control the binding still assumes the first control. Why is this? Is there an easy work-around?

    Read the article

  • Silverlight Two Way Data Binding on Key Up

    - by kouPhax
    Is there a way to fire a two way data bind when the key up event fires in Silverlight. Currently I have to lose focus on the textbox to get the binding to fire. <TextBox x:Name="Filter" KeyUp="Filter_KeyUp" Text="{Binding Path=Filter, Mode=TwoWay }"/>

    Read the article

  • WCF + Add a Binding Extension via Code

    - by FlySwat
    I'm trying to figure out a way to add a binding extension to an endpoint via code, instead of through configuration files. Ideally I want it to simply be an attribute I place on the service method. So far it seems like the only thing that isn't exposed publicly is the binding extensions.

    Read the article

  • Add a Binding Extension via Code

    - by FlySwat
    I'm trying to figure out a way to add a binding extension to an endpoint via code, instead of through configuration files. Ideally I want it to simply be an attribute I place on the service method. So far it seems like the only thing that isn't exposed publicly is the binding extensions.

    Read the article

  • WPF ControlTemplate and Binding

    - by Vinjamuri
    In the below code, MousePressImage is a dependency property of class ButtonControl. The following Binding doesn't work.. Appreciate your help in solving this issue.. Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=MousePressImage}"/> -- I create the ButtonControl like this. <local:ButtonControl Height="48" Width="160" MouseOverImage="pack://application:,,,/Recipe_06_13;component/Resources/Over.bmp" MousePressImage="pack://application:,,,/Recipe_06_13;component/Resources/Press.bmp" DisableImage=" "> </local:ButtonControl>

    Read the article

  • Force Binding Update Silverlight

    - by Matt
    How can I force my objects DataContext bindings to update? I'm using an event on a grid, and binding updates are not being processed before my event fires. Any cheap tricks to get around this? In the end I can always do things the old manual way of getting the values from my textboxes and updating my object, but it'd be nice to have binding do it for me.

    Read the article

  • Binding Bitmapimge to Image in Wpf?

    - by Rev
    This is a simple Question (lets see) I want to bind bitmap image to Image. For doing this in cs code u must write this line. this.leftImage.Source = new BitmapImage(new Uri(@"C:\a.bmp")); But I want make Binding from resources. Because In release time resources became part of project.exe file and if you make binding from file(Mean set Image.source with Image file address), you must always put image file in the same address(disaster programing) :)

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >